Nightlights, Contours, and Rgooglemap

October 14, 2010

(This article was first published on Steven Mosher's Blog, and kindly contributed to R-bloggers)

I am continuing the investigation of nightlights using some additional packages from Cran. Here we add Rgooglemaps to the mix. Rgooglemaps is a neat tool that gives you a simple ( needs better docs) interface to the static map server. Perhaps, I’ll modify the code to my likeing, so For now I use it as delivered. Lets recap the issue. Station positions ( Lat lon) from GHCN inventory are not precise. Consequently, the nightlights you read may not be accurate. To show that I’ve collected stations where the Lat/Lon of the station is Dark, but where the surrounding area ( radius of about 55km) contains urban stations.  First off some basic stats:

Next, we look for those stations that have no urban lights within a 55km radius. Rural cells, as I term it:

And then we look at the mixed cells. Cells where the station lat/lon is dark, but urban lights are in the “hood” Recall that “rural is defined as a DN ( radiance number) of less than 10. What we see is that within the “mixed” cells we have situations were the rural location is close to urban locations. And the question is “how close” and is the station really at the location in the inventory or is it really in a close by urban site.

At this stage the work is exploratory, getting tools together and refining an analysis approach. One issue is the registration of nightlights. More on that later, lets just look at some charts: A nightlights contour, “S” marks the station spot.

The map above is drawn by accessing the static map server. And I can Zoom

To leave a comment for the author, please follow the link and comment on their blog: Steven Mosher's Blog. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...


Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training


CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)