Geographic Coordinate

Geographic coordinate uses latitude and longitude to locate a position.
Latitude and longitude are just like x-y axes, so you can build all kinds of graphs with them, like Scatterplot and Density Contour Plot.

There are also some special graphs for geographic coordinate system, but with controversial performance, like

Implementation

ggmap

Package ggmap can generate real-world maps. It is compatible with ggplot2, so you can easily add layers on top of the base map. Related functions:

sf and tmap

sf and tmap

R Package sf is for reading shape files (.shp). To see the read map, use function st_geometry() and plot the returned object.

R Package tamp is for plotting maps (generated by sf) together with other data. The general workflow is

  1. Get the spatial data by reading the shape file using sf
  2. Combine spatial data and other data
    • e.g. use left_join()
  3. plot the combined data using tmap
Creative Commons License by zcysxy