class: center, middle, inverse, title-slide # Data Visualization ## Alternatives to maps ### Andrew Irwin,
a.irwin@dal.ca
### Math & Stats, Dalhousie University ### 2021-03-19 (updated: 2021-03-06) --- class: middle # Plan * When is a map not appropriate for geospatial data? * Tile geometry * Heatmaps with dendrograms * Specialized heatmap for the USA --- class: middle ### Why shouldn't I use a map? * Always think about the purpose * Is geography the most important feature? * Are you showing points or areas? * Will the area of a region complicate interpretation? * Is the spatial extent one dimensional? What could you do with the other dimension? --- class: middle ### Summary * Maps are very effective for showing points where spatial location is the primary information * To show quantitative data varying along a transcect, a line or dot plot may be better * Colour shows larger/smaller, positive/negative, but does not show quantitative values well * Heatmaps (2 dimensional tiles of colours) can be a good alternative --- ### COVID-19 cases & geom_tile <img src="29-map-alternatives_files/figure-html/covid-data-1.png" width="100%" style="display: block; margin: auto;" /> --- ### Same data with ggheatmap <img src="29-map-alternatives_files/figure-html/unnamed-chunk-1-1.png" width="90%" style="display: block; margin: auto;" /> --- ### Scale columns to have sum 1 <img src="29-map-alternatives_files/figure-html/unnamed-chunk-2-1.png" width="90%" style="display: block; margin: auto;" /> --- ### Specialized maps of USA ```r library(statebins) load("../static/election.rda") m4 <- election %>% ggplot(aes(state = state, fill = pct_trump)) + geom_statebins() + theme_statebins() + labs(fill="Percent Trump") ``` --- ### Specialized maps of USA <img src="29-map-alternatives_files/figure-html/unnamed-chunk-4-1.png" width="90%" style="display: block; margin: auto auto auto 0;" /> --- class: middle # Further reading * Course notes * Healy Chapter 7 --- class: middle, inverse ## Task * Task 16 as described in repository