Most, if not all, paper topics will benefit from finding books and articles discussing (and giving code for) relevant techniques. Common examples in the past have been text mining and web scraping. Another example is analyzing spatial data. There are R functions for a full range of geographic modeling, including both analysis and display. Several groups are planning to look at Airbnb or other data where space is important.
- Here are several recent simple tutorials on basic spatial analysis in R:
- http://www.datasciencecentral.com/profiles/blogs/map-the-life-expectancy-in-united-states-with-data-from-wikipedia. The first one is really elementary. The actual map takes only 6 lines of ggplot.
- https://realdataweb.wordpress.com/2017/04/22/using-r-as-a-gis/ Slightly more complex.
- https://github.com/Pakillo/R-GIS-tutorial/blob/master/R-GIS_tutorial.md#othergis. This one is more advanced. First part covers using Google map information as your canvas. Later sections cover drawing on those maps.
- This page recommends ggmaps package. I have zero experience with ggmaps, but it produced the above bike-route map in 3 lines of ggplot2 code, including one line to import the map itself from Google. http://eriqande.github.io/rep-res-web/lectures/making-maps-with-R.html. The author claims:
You might be able to get better looking maps at some resolutions by using shapefiles and rasters from naturalearthdata.com but ggmap will get you 95% of the way there with only 5% of the work!
- For more depth, here are some books, downloadable from UCSD. Generally you will only need a few chapters
- Displaying Time Series, Spatial, and Space-Time Data with R by Oscar Perpiñán Lamigueir
- Applied Spatial Data Analysis with R, 2nd edition, Roger S. Bivand, Edzer Pebesma, Virgilio Gómez-Rubio
For sources on text mining, web scraping, and other special topics, see information on this page and elsewhere on this blog. Supplemental Readings – still valid in 2017
From the datasciencecentral page:
ggplot(states, aes(x = long, y = lat, group = group, fill = le_black)) +
geom_polygon(color = “white”) +
scale_fill_gradient(name = “Years”, low = “#ffe8ee”, high = “#c81f49”, guide = “colorbar”, na.value=”#eeeeee”, breaks = pretty_breaks(n = 5)) +
labs(title=”Life expectancy in African American”) +
Updated June 7, 2017