One stop shop for Exchange, Transform, Load – best reason for making maps with R πΊ
One stop shop for Exchange, Transform, Load – best reason for making maps with R πΊ
While the R programming may not be considered a GIS map making program, it does one thing exceptionally well – exchange, transform and load data onto map. It really is a one stop shop. A few lines of code handles it all, and the code can be reused from map to map.
Traditionally before I got into R, I would manually download data, clean it in LibreOffice Calc aka Excel then link it in QGIS to a shapefile. That’s a lot of clicking and repetitive work that can easily be automated and repeated in R Studio, and run over and over again. Often in a fraction of the time, sometimes even less if I’m just updating the map with the latest days data or just making minor transformation of the data.
But with R it’s one stop shopping. You can often the load the data directly into R by either using read_csv on an internet dataset like from data.ny.gov, then process it in the same pipeline using mutate or summarize, join the data using inner_join, then plot it directly on the map using ggplot. No flipping through windows, mingling datatypes manually, clicking through join options or style options in QGIS. The default palettes and options in ggplot are often attractive, and needing only minor adjustment in codes.
And generally I’m happy with the output of ggplot for map making. Usually the output is consistent and easy to read, although sometimes things like title strings get chopped off and I need to adjust the parameters. But it’s just code and usually just requires me to change a line or two of the code before proceeding. The output is SVG, and often very good quality, with files small and easy to compress as compressed SVG for sharing on the blog.