Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SOC 4650 & SOC 5650 - Lecture 05

SOC 4650 & SOC 5650 - Lecture 05

Slides for Lecture 05 of the Saint Louis University Course Introduction to GIS. These slides introduce basic cartographic practices using R and ArcGIS.

Christopher Prener

February 19, 2018

Transcript

109 slides
  1. Update the stlData package from GitHub:
 devtools::install_github(“chris-prener/stlData”) Install the measurements,

    RColorBrewer, and viridis packages from CRAN WELCOME! GETTING STARTED Check out the stlData package’s README for how the package has changed: https://github.com/chris-prener/stlData
  2. AGENDA INTRO TO GISC / WEEK 06 / LECTURE 05

    1. Front Matter 2. GISc & Public Policy 3. Types of Maps 4. Cartographic Design 5. Working with Color 6. Design in R 7. Design in ArcGIS 8. Back Matter
  3. PS-03, Lab-04, and LP-06 are due next Monday. 1. FRONT

    MATTER ANNOUNCEMENTS Make sure you keep the final project at the forefront of your attention! Keep checking Sack and GitHub Issues!
  4. ▸ .data is a data frame, a tibble, or a

    simple features object ▸ varlist is an optional list of variables to look for duplicate observations in ▸ .keep_all = TRUE will retain all variables if a varlist is supplied; if FALSE (the default), only the variables in the varlist will be retained Available in dplyr
 Download via CRAN 1. FRONT MATTER DEALING WITH DUPLICATES Parameters: distinct(.data, varlist, .keep_all = TRUE) f(x)
  5. ▸ .data is a data frame, a tibble, or a

    simple features object ▸ varlist is an optional list of variables to look for duplicate observations in ▸ .keep_all = TRUE will retain all variables if a varlist is supplied; if FALSE (the default), only the variables in the varlist will be retained 1. FRONT MATTER DEALING WITH DUPLICATES Parameters: distinct(.data, varlist, .keep_all = TRUE) f(x)
  6. DEALING WITH DUPLICATES 1. FRONT MATTER distinct(.data, varlist, .keep_all =

    TRUE) Using the stl_tbl_water data from stlData: > waterUnique <- distinct(stl_tbl_water) The resulting data frame or tibble will contain one observation for every unique observation in the original data. f(x)
  7. DEALING WITH DUPLICATES > library(dplyr) > library(stlData) > nrow(stl_tbl_water) [1]

    179
 > waterUnique <- distinct(stl_tbl_water) > nrow(waterUnique) [1] 154 1. FRONT MATTER
  8. DEALING WITH DUPLICATES > library(dplyr) > library(stlData) > nrow(stl_tbl_water) [1]

    179
 > waterUnique <- distinct(stl_tbl_water, WATER_BODY, POLLUTANT, 
 .keep_all = TRUE)
 > nrow(waterUnique) [1] 37 1. FRONT MATTER
  9. 3. TYPES OF MAPS REFERENCE MAPS SLU North Campus SLU

    Medical Campus Shaw St. Louis Missouri Botanical Garden Shaw Market Flora Place Mullanphy Elementary
  10. 0 1-4 5-8 9-12 13-17 p < .99 p <

    .95 p < .90 no sig. p < .90 p < .95 p < .99 hot spot cold spot Hotspot Analysis (Inferential Map) Choropleth Map (Thematic Map) MAPPING MURDERS IN ST. LOUIS, ’08-‘15
  11. 0 1-4 5-8 9-12 13-17 Choropleth Map of Count Data

    MAPPING MURDERS IN ST. LOUIS, ’08-‘15 Normalized by Area 0.00 - 
 0.0000035 0.0000115 -
 0.0000237 0.0000035 -
 0.0000115 0.0000237 -
 0.0000398 0.0000398 - 
 0.0000572
  12. 0 1-4 5-8 9-12 13-17 Choropleth Map of Count Data

    MAPPING MURDERS IN ST. LOUIS, ’08-‘15 Normalized by Square Miles 0-9.28 9.28-30.00 30.00-57.14 57.14-94.12 94.12-142.86
  13. 0 1-4 5-8 9-12 13-17 Choropleth Map of Count Data

    MAPPING MURDERS IN ST. LOUIS, ’08-‘15 Graduated Symbols 0-1 2-4 5-8 9-12 12-17
  14. 0 1-4 5-8 9-12 13-17 Choropleth Map of Count Data

    MAPPING MURDERS IN ST. LOUIS, ’08-‘15 Dot Density 0.656 
 murders =
  15. ▸ Assign bright colors (red, orange, yellow, green, blue) to

    important graphic elements (features) ▸ Important features are known as “figure” ▸ Assign drab colors to the graphic elements that provide orientation or context ▸ Contextual features known as “ground” 4. CARTOGRAPHIC DESIGN VISUAL CONTRAST All features in figure Circles in figure, squares and lines in ground

More Decks by Christopher Prener

Other Decks in Education