Space
Maps, Cartograms, and Choropleths
Slides and Tutorials
Spatial Data |
|
|
---|
“If we were to wake up some morning and find that everyone was the same race, creed, and color, we would find some other cause for prejudice by noon.”
— George D. Aiken, US senator (20 Aug 1892-1984)
Setting up R Packages
What graphs will we see today?
Variable #1 | Variable #2 | Chart Names | Chart Shape |
---|---|---|---|
Quant | Qual | Choropleth and Symbols Maps, Cartograms |
|
Inspiration
How do these Chart(s) Work?
In Figure 1 (a), we have a choropleth map. What does choropleth1 mean? And what kind of information could this map represent? The idea is to colour a specific area of the map, a district or state, based on a Quant or a Qual variable.
The Figure 1 (b) deliberately distorts and scales portions of the map in proportion to a Quant variable, in this case, population in 2018.
In Figure 2 (a) and Figure 2 (b), symbols are used to indicate either the location/presence of an item of interest, or a quantity by scaling their size in proportion to a Quant variable
Introduction
First; let us watch a short, noisy video on maps:
What kind of visualizations will we make?
We will first understand the structure of spatial data and where to find it. For now, we will deal with vector spatial data; the discussion on raster data will be dealt with in another future module.
We will get hands-on with making maps, both static and interactive.
Choropleth Map
What does choropleth2 mean? And what kind of information could this map represent?
Bubble Map
What information could this map below represent?
Let us now look at the slides. Then we will understand how the R packages sf
, tmap
work to create maps, using data downloadable into R using osmdata
and . We will also make interactive maps with osmplotr
leaflet
and mapview
; tmap
is also capable of creating interactive maps.
Your Turn
Animal and Bird Migration
- Head off to movebank.org. Look at a few species of interest and choose one.
- Download the data ( ESRI Shapefile). Note: You will get a .zip file with a good many files in it. Save all of them, but read only the
.shp
file into R. - Import that into R using
sf_read()
- See how you can plot locations, tracks and colour by species….based on the data you download.
- For tutorial info: https://movebankworkshopraleighnc.netlify.app/
UFO Sightings
Here is a UFO Sighting dataset, containing location and text descriptions. https://github.com/planetsig/ufo-reports/blob/master/csv-data/ufo-scrubbed-geocoded-time-standardized.csv
Sales Data from kaggle
Head off to Kaggle and search for Geographical Sales
related data. Make both static and interactive maps with this data. Justify your decisions for type of map.
References
Hadley Wickham, Danielle Navarro and Thomas Lin Pedersen. ggplot2: Elegant Graphics for Data Analysis, https://ggplot2-book.org/maps.html
Robin Lovelace, Jakub Nowosad, Jannes Muenchow. Geocomputation with R, https://r.geocompx.org/
Emine Fidan. Guide to Creating Interactive Maps in R, https://bookdown.org/eneminef/DRR_Bookdown/
Nikita Voevodin. R, Not the Best Practices, https://bookdown.org/voevodin_nv/R_Not_the_Best_Practices/maps.html
Want to make a cute logo-like map? Try https://prettymapp.streamlit.app
R Package Citations
Footnotes
Etymology. From Ancient Greek χώρα (khṓra, “location”) + πλῆθος (plêthos, “a great number”) + English map. First proposed in 1938 by American geographer John Kirtland Wright to mean “quantity in area,” although maps of the type have been used since the early 19th century.↩︎
Etymology. From Ancient Greek χώρα (khṓra, “location”) + πλῆθος (plêthos, “a great number”) + English map. First proposed in 1938 by American geographer John Kirtland Wright to mean “quantity in area,” although maps of the type have been used since the early 19th century.↩︎
Citation
@online{2022,
author = {},
title = {\textless Iconify-Icon Icon=“gis:proj-Geo” Width=“1.2em”
Height=“1.2em”\textgreater\textless/Iconify-Icon\textgreater{}
{Space}},
date = {2022-08-15},
url = {https://av-quarto.netlify.app/content/courses/Analytics/Descriptive/Modules/90-Space/},
langid = {en},
abstract = {Geospatial Data and how to use it with intent}
}