Table of Contents
Geocoding systems
TopoJSON
mapshaper
mapshaper
makes simplifies the task of checking raw spatial data, doing some
basic pre-processing and then exporting it to the necessary format. There is
mapshaper-gui
which runs a server with a nice GUI and a useful console.
Mapping with vega-lite
See the vega-lite notes for examples of how to generate maps from TopoJSON data.
Spatial analysis in R
Packages
countrycode
makes it easy to switch between different naming schemes and to compute some descriptions of countries.
Silly little notes
- this looks like it might be useful for mapping with ggplot2.
- The coordinate reference system (CRS) defines a rule for mapping longitude
and latitude to points in \(\mathbb{R}^2\).
- The EPSG system is simpler, consisting of predefined transformations
- The PROJ4STRING system is more flexible but more complicated.
- There is a
`[.sf`
function which allows for spatial subsetting, but it is probably better to use the more explicit functions for clarity. - The
spData
package on CRAN has some example data sets. - It is a work in progress to bring spatial analysis into the tidyverse, and for
the time being there are several potential problems one should keep in mind:
- There can be name clashes, so where possible use the full name of functions
- Filtering by topological properties requires
sparse = FALSE
. - Binding rows can require some additional step.