3 Maps and Spatial Visualization
Spatial data is central to many of our tasks as Data Scientists. Identifying patterns, correlations and relationships between those patterns delivers opportunities for delivering new services. Imagine predicting common routes for travellers this morning, and dynamically routing public transport to meet those needs. Fundamental to the Data Scientist is the ability to process, visualize and then model spatial data. Done right maps can be a very effective communications tool. Numerous R packages work together to bring us a sophisticated mapping and spatial analysis capability.
library(ggplot2) # Plotting maps. library(maps) # Map data. library(scales) # For transperency Functions: alpha() comma() library(maptools) # For shapefiles library(dismo) # Obtaining gis data library(broom) # For conversion functions: tidy() library(rgdal) # For shapefiles library(dplyr) # For sample function library(OpenStreetMap) # OSM maps library(ggmap) # Google maps library(leaflet) # Interactive Maps library(shiny) # Interactive Viz library(magrittr) # XXXX.