- This tutorial is based on R.
- Sample data is available in the
data
folder (a sample of Car2Go's location data) - Sample code is availalbe at the
.Rmd
files. - Currently, there are two sample files available (
geo_agg_tutorial.Rmd
for geospatial visualization and aggregation; andvoronoi_overlay_sample.Rmd
for generating Voronoi diagram based on real-world points).
- Loading the data as a dataframe (if lon/lat).
- Loading the data as SpatialPointsDataFrame (
sp
package).
- Sources might be
GeoJSON
,Shapefile
, orKML
. - Loading the data as SpatialPolygonDataFrame (
sp
package). - Many boundaries datasets available from Census or city data portals.
raster
package for intersection, union, and etc.- It's possible to iterate through each polygon in a SpatialPolygonDataFrame.
- Example: Aggregation I: Points to Polygons
- Using
ggplot
andggmap
to visualize frequency using the color gradiation (polygon-based).
- Hexagons (in this example)
- Grids
- Voronoi diagram
- Intersection and union are still available (
raster
) - When aggregating different polygon layers, you need to prorate the value of each polygon based on the proportion of the area.