Robinlovelace / Creating-maps-in-R

Introductory tutorial on graphical display of geographical information in R.
https://cran.r-project.org/other-docs.html
568 stars 341 forks source link

Typo #20

Closed Deleetdk closed 9 years ago

Deleetdk commented 9 years ago

Now we can clearly see that the stations points overlay the boroughs. The problem is that the spatial extent of stations is great than that of lnd. We will create a spatially determined subset of the stations object that fall inside greater London. This is clipping.

Deleetdk commented 9 years ago

Load the package with . It is worth noting that the base plot() function requires less data preparation but more effort in control of features. qplot() and ggplot() from ggplot2 require some additional work to format the spatial data but select colours and legends automatically, with sensible defaults.

Robinlovelace commented 9 years ago

Many thanks @Deleetdk for reporting these typos. Let us know if you find any other issues. Hope the tutorial is of use!

Deleetdk commented 9 years ago

The most annoying thing when reading it was that the code used in the tutorial was not in the R files in the folder, so I had to continuously copy and paste. Maybe it's somewhere I didn't look?

I also want to say thanks for this, it led me to do a good study on London Borough's, which is entering peer review soon. :)

The reason I am reading the tutorial is that I am looking for a way to visualize data I have on countries of the Americas and states/departments of the US, Mexico, Brazil and Colombia. Do you know of a dataset of polygons for these areas? For countries and the US, presumably fairly easy to find, but for the rest?

FelipeSBarros commented 9 years ago

Hi, @Deleetdk. I'm following this tutorial too. Bacause of that I saw your comment about Brazil spatial data... You can find it on: Brazilian Environmental Ministry or Brazilian geographical and statistics Intitution. Hope you can find what you need. @Robinlovelace , thanks for the material! It helped me with gIntersection! Best regards

Deleetdk commented 9 years ago

Thanks. Perhaps one can export the rest from Google Maps/Earth. E.g. one can look up each unit. https://www.google.nl/maps/place/Caquet%C3%A1,+Colombia/@1.12963,-73.8139759,8z/data=!3m1!4b1!4m2!3m1!1s0x8e218b98d53b56ef:0x629f2cff66910677?hl=en

Robinlovelace commented 9 years ago

Many thanks for the feedback @Deleetdk and @FelipeSBarros, really glad it's of use. Your comments really help keep the code/text correct, clear and up-to-date.

One thing that would really help us to continue working on this is if I get credit for it: please cite the tutorial in your publications if you get a chance - this is the citation I recommend:

Lovelace, Robin, and James Cheshire. "Introduction to visualising spatial data in R." (2014).

Good luck with mapping North and South Americas!

Robinlovelace commented 9 years ago

@Deleetdk please see here for the R code associated with the tutorial: https://github.com/Robinlovelace/Creating-maps-in-R/blob/master/R/intro-spatial.R