The Grammar of Maps

The Grammar of Maps

Introduction

We will use the R package sf (“simple features”) to understand how simple geometric shapes are encoded into data, that can be plotted as maps.

We will then plot maps using mapping packages like ggplot and tmap to create static and interactive maps. We will initially use data that we can download from Natural Earth and Open Street Map (OSM).

Later we will construct our own maps using data that we gather from the street using the Vespucci app.

First; let us watch a short, noisy video on maps:

Maps That Will Change The Way You See The World:(https://www.youtube.com/watch?v=YH2sAbXv7p4)

r blogdown::shortcode("youtube", "YH2sAbXv7p4")

Mapping Projects

1. Animal and Bird Migration

  1. Head off to movebank.org
  2. Look at a few species of interest and choose one.
  3. Download the data ( ESRI Shapefile)
  4. Import that into R using sf_read()
  5. See how you can plot locations, tracks and colour by species….based on the data you download.

For tutorial info: https://movebankworkshopraleighnc.netlify.app/

2. Food at Home

  1. Draw a map of your home-town with your favourite restaurants shown. Pop-ups for each restaurant will win bonus points.

Take a look at: Burkhart, Christian. “Streetmaps.” StreetMaps

3. Mapping India: Places of Worship

  1. Do some searching and make a list of Places of Worship in India that are known to you.

  2. Head off to the India Place Finder website (india.info-proto.com/index.php/). Using the search facility there, download a CSV file that contains names of the places and their lon-lat coordinates.

  3. Read this CSV into R. Use the sfheaders package to convert this data into an sf spatial data frame.

  4. Use the ggplot or the tmap +plotly packages to plot these on an India map. Use the rnaturalearth package to get hold of an India map that is relevant to your area of interest.

  5. Extra:

    • Use font-awesome icons to signify your Places of Worship.
    • Use popups in tmap/plotly to pop-up a picture or video about the place

4. Mapping Places Yelahanka on Open Street Map

  1. Download the Vespucci app on your phone:
    • Android app on Play Store
    • iPhone is sadly not available. So partner with an Android phone user please!
  2. You will need to create an account on Open Street Map and login to the app on your phone. This will allow you to contribute changes and data to the map and your data will be available to any netizen for download.
  3. Read this Vespucci Tutorial
  4. Choose specific categories of Places of interest:
    • Restaurants
    • Street Food locations
    • Medicines
    • Dustbins/garbage
    • Flowering Trees
    • Park Benches
    • Street Lighting
  5. Wherever possible, record metadata:
  • Menu / Cuisine
  • Timings
  • Indoor or outdoor seating
  • Parking available
  1. Download in R and plot using ggplot or using tmap.
Arvind V.
Arvind V.

My research interests are Complexity Science, Creativity and Innovation, Problem Solving with TRIZ, Literature, Indian Classical Music, and Computing with R.

Next
Previous