Geospatial

Intro to Making maps with ggplot2

The sf package Using read_sf to read in a GeoJSON file A note on using shapefiles Using ggplot2 with geom_sf First map with geom_sf Adding labels with geom_sf_text Changing the theme of a map Getting some other data Joining an sf object to another dataframe Making a chloropleth map Changing the scale Using the viridis scale Manually setting a continuous scale Using a divergent scale Using a discrete scale Plotting points on the map Interactive maps with plotly This post is about using the ggplot2 package to make simple maps using R.

Philadelphia Parking Violations (2017)

Reading data and data manipulation Plot 1: Histogram of ticket issue times (hour) Adding new variables Making the plot Annotating the plot Plot 2: Day of week details Finding total tickets per day Making a faceted line chart Alternative way to make a very similar chart Making an interactive chart for the web with plotly Plot 3: Mapping parking violations by zip code Calculating tickets per day and grouping zip codes Reading in shapefile (.