Code
source("../dsan-globals/_globals.r")
set.seed(6805)PPOL 6805 / DSAN 6750: GIS for Spatial Data Science
Fall 2026
Today’s Planned Schedule:
| Start | End | Topic | |
|---|---|---|---|
| Lecture | 6:30pm | 7:00pm | Logistics 1: Positron → |
| 6:50pm | 7:15pm | Logistics 2: Reducing Fear → | |
| 7:20pm | 7:50pm | Building Our First Map! → | |
| Break! | 7:50pm | 8:00pm | |
| 8:00pm | 8:30pm | Raster Data → | |
| 8:30pm | 9:00pm | Finding GIS Data → |
source("../dsan-globals/_globals.r")
set.seed(6805)\[ \DeclareMathOperator*{\argmax}{argmax} \DeclareMathOperator*{\argmin}{argmin} \newcommand{\bigexp}[1]{\exp\mkern-4mu\left[ #1 \right]} \newcommand{\bigexpect}[1]{\mathbb{E}\mkern-4mu \left[ #1 \right]} \newcommand{\definedas}{\overset{\small\text{def}}{=}} \newcommand{\definedalign}{\overset{\phantom{\text{defn}}}{=}} \newcommand{\eqeventual}{\overset{\text{eventually}}{=}} \newcommand{\Err}{\text{Err}} \newcommand{\expect}[1]{\mathbb{E}[#1]} \newcommand{\expectsq}[1]{\mathbb{E}^2[#1]} \newcommand{\fw}[1]{\texttt{#1}} \newcommand{\given}{\mid} \newcommand{\green}[1]{\color{green}{#1}} \newcommand{\heads}{\outcome{heads}} \newcommand{\iid}{\overset{\text{\small{iid}}}{\sim}} \newcommand{\lik}{\mathcal{L}} \newcommand{\loglik}{\ell} \DeclareMathOperator*{\maximize}{maximize} \DeclareMathOperator*{\minimize}{minimize} \newcommand{\mle}{\textsf{ML}} \newcommand{\nimplies}{\;\not\!\!\!\!\implies} \newcommand{\orange}[1]{\color{orange}{#1}} \newcommand{\outcome}[1]{\textsf{#1}} \newcommand{\param}[1]{{\color{purple} #1}} \newcommand{\pgsamplespace}{\{\green{1},\green{2},\green{3},\purp{4},\purp{5},\purp{6}\}} \newcommand{\pedge}[2]{\require{enclose}\enclose{circle}{~{#1}~} \rightarrow \; \enclose{circle}{\kern.01em {#2}~\kern.01em}} \newcommand{\pnode}[1]{\require{enclose}\enclose{circle}{\kern.1em {#1} \kern.1em}} \newcommand{\ponode}[1]{\require{enclose}\enclose{box}[background=lightgray]{{#1}}} \newcommand{\pnodesp}[1]{\require{enclose}\enclose{circle}{~{#1}~}} \newcommand{\purp}[1]{\color{purple}{#1}} \newcommand{\sign}{\text{Sign}} \newcommand{\spacecap}{\; \cap \;} \newcommand{\spacewedge}{\; \wedge \;} \newcommand{\tails}{\outcome{tails}} \newcommand{\Var}[1]{\text{Var}[#1]} \newcommand{\bigVar}[1]{\text{Var}\mkern-4mu \left[ #1 \right]} \]
| Umbrella Term | Concepts | Specific Skills |
|---|---|---|
| Coding |
|
|
| GIS |
|
|
Analogy from non-geospatial data science:
| Text Drawn Map |
→ | Speadsheet Digital Map |
→ | Equations Maps w/ArcGIS |
→ | Code This Class |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Start writing
info.txt
|
Start entering info in rows
|
Start using equations
|
Write code plot_balance.py Profit 💲💰🤑💰💲 |
|||||||||||||||||||||||||||
Our teaching should be governed, not by a desire to make students learn things, but by the endeavor to keep burning within them that light which is called curiosity. (Montessori 1916)
| Take the time/energy you're using to worry about... | Use it instead to worry about... |
|---|---|
|
Learning GIS |
Geometers solved w/geometry (300 BC)…

…Algebraists solved w/algebra (2000 BC)…
\[ \begin{align*} &ax^2 + bx + c = 0 \\ \Rightarrow \; & x_+ = \frac{-b + \sqrt{b^2 - 4ac}}{2a} \end{align*} \]
…From 1637 onwards, whichever is easier! 🤯🤯🤯 (Isomorphism)

library(tidyverse)
library(rmarkdown)
library(sf)
# Load DC tracts data
dc_sf_fpath <- "data/DC_Census_2020/Census_Tracts_in_2020.shp"
dc_sf <- st_read(dc_sf_fpath);Reading layer `Census_Tracts_in_2020' from data source
`/Users/jpj/gtown-local/ppol6805/w02/data/DC_Census_2020/Census_Tracts_in_2020.shp'
using driver `ESRI Shapefile'
Simple feature collection with 206 features and 315 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: -8584933 ymin: 4691871 xmax: -8561515 ymax: 4721078
Projected CRS: WGS 84 / Pseudo-Mercator
cols_to_keep <- c(
"OBJECTID", "TRACT", "GEOID", "ALAND", "AWATER",
"STUSAB", "SUMLEV", "GEOCODE", "STATE", "NAME",
"POP100", "HU100", "geometry"
)
dc_sf <- dc_sf |> select(cols_to_keep)Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
# Was:
data %>% select(cols_to_keep)
# Now:
data %>% select(all_of(cols_to_keep))
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
sf Objectsdc_sf is an R object of type sf (short for “simple features”), which extends data.frame by adding a special column named geometry (containing POLYGONs)
class(dc_sf)[1] "sf" "data.frame"
dim(dc_sf)[1] 206 13
rmarkdown::paged_table(dc_sf, options=list(rows.print=6))| OBJECTID | TRACT | GEOID | ALAND | AWATER | STUSAB | SUMLEV | GEOCODE | STATE | NAME | POP100 | HU100 | geometry |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 002002 | 11001002002 | 849376 | 0 | DC | 140 | 11001002002 | 11 | Census Tract 20.02 | 4072 | 1532 | POLYGON ((-8575655 4714476,… |
| 2 | 002101 | 11001002101 | 600992 | 0 | DC | 140 | 11001002101 | 11 | Census Tract 21.01 | 5687 | 2335 | POLYGON ((-8574745 4715676,… |
| 3 | 002102 | 11001002102 | 725975 | 0 | DC | 140 | 11001002102 | 11 | Census Tract 21.02 | 5099 | 2221 | POLYGON ((-8573824 4715684,… |
| 4 | 002201 | 11001002201 | 415173 | 0 | DC | 140 | 11001002201 | 11 | Census Tract 22.01 | 3485 | 1229 | POLYGON ((-8574654 4714781,… |
| 5 | 002202 | 11001002202 | 698895 | 566 | DC | 140 | 11001002202 | 11 | Census Tract 22.02 | 3339 | 1454 | POLYGON ((-8573792 4714811,… |
| 6 | 000101 | 11001000101 | 199776 | 5261 | DC | 140 | 11001000101 | 11 | Census Tract 1.01 | 1406 | 999 | POLYGON ((-8577962 4708867,… |
| 7 | 000102 | 11001000102 | 1706484 | 516665 | DC | 140 | 11001000102 | 11 | Census Tract 1.02 | 3417 | 2053 | POLYGON ((-8579312 4707442,… |
| 8 | 000201 | 11001000201 | 505004 | 0 | DC | 140 | 11001000201 | 11 | Census Tract 2.01 | 4108 | 11 | POLYGON ((-8580425 4709172,… |
| 9 | 000202 | 11001000202 | 776435 | 439661 | DC | 140 | 11001000202 | 11 | Census Tract 2.02 | 4672 | 2169 | POLYGON ((-8580496 4708084,… |
| 10 | 000300 | 11001000300 | 1042157 | 2305 | DC | 140 | 11001000300 | 11 | Census Tract 3 | 6161 | 2845 | POLYGON ((-8580799 4710391,… |
| 11 | 000400 | 11001000400 | 1541239 | 69 | DC | 140 | 11001000400 | 11 | Census Tract 4 | 1643 | 998 | POLYGON ((-8579749 4711309,… |
| 12 | 000501 | 11001000501 | 940249 | 29503 | DC | 140 | 11001000501 | 11 | Census Tract 5.01 | 3829 | 2489 | POLYGON ((-8578168 4709976,… |
| 13 | 000502 | 11001000502 | 581507 | 0 | DC | 140 | 11001000502 | 11 | Census Tract 5.02 | 3418 | 1881 | POLYGON ((-8578993 4711789,… |
| 14 | 000600 | 11001000600 | 1441865 | 71 | DC | 140 | 11001000600 | 11 | Census Tract 6 | 4676 | 2435 | POLYGON ((-8580118 4713399,… |
| 15 | 000702 | 11001000702 | 308967 | 0 | DC | 140 | 11001000702 | 11 | Census Tract 7.02 | 3452 | 2472 | POLYGON ((-8580787 4710465,… |
| 16 | 000703 | 11001000703 | 232137 | 0 | DC | 140 | 11001000703 | 11 | Census Tract 7.03 | 3022 | 2136 | POLYGON ((-8580690 4711115,… |
| 17 | 000704 | 11001000704 | 332346 | 0 | DC | 140 | 11001000704 | 11 | Census Tract 7.04 | 2753 | 1724 | POLYGON ((-8580477 4712145,… |
| 18 | 000802 | 11001000802 | 1688582 | 669985 | DC | 140 | 11001000802 | 11 | Census Tract 8.02 | 3327 | 1541 | POLYGON ((-8582829 4708962,… |
| 19 | 000803 | 11001000803 | 308153 | 0 | DC | 140 | 11001000803 | 11 | Census Tract 8.03 | 3174 | 1692 | POLYGON ((-8581367 4712478,… |
| 20 | 000804 | 11001000804 | 2566768 | 167978 | DC | 140 | 11001000804 | 11 | Census Tract 8.04 | 3832 | 1347 | POLYGON ((-8583308 4709826,… |
| 21 | 000902 | 11001000902 | 1867106 | 307257 | DC | 140 | 11001000902 | 11 | Census Tract 9.02 | 2317 | 894 | POLYGON ((-8584932 4712273,… |
| 22 | 000903 | 11001000903 | 928101 | 0 | DC | 140 | 11001000903 | 11 | Census Tract 9.03 | 4202 | 484 | POLYGON ((-8582848 4712389,… |
| 23 | 000904 | 11001000904 | 2024710 | 75151 | DC | 140 | 11001000904 | 11 | Census Tract 9.04 | 3148 | 1216 | POLYGON ((-8584133 4713114,… |
| 24 | 001002 | 11001001002 | 889722 | 0 | DC | 140 | 11001001002 | 11 | Census Tract 10.02 | 3643 | 2544 | POLYGON ((-8581134 4712828,… |
| 25 | 001003 | 11001001003 | 982460 | 0 | DC | 140 | 11001001003 | 11 | Census Tract 10.03 | 3111 | 1129 | POLYGON ((-8582803 4714393,… |
| 26 | 001004 | 11001001004 | 1471925 | 0 | DC | 140 | 11001001004 | 11 | Census Tract 10.04 | 4480 | 1810 | POLYGON ((-8581944 4713535,… |
| 27 | 001100 | 11001001100 | 1676650 | 0 | DC | 140 | 11001001100 | 11 | Census Tract 11 | 5300 | 2414 | POLYGON ((-8581145 4716056,… |
| 28 | 001200 | 11001001200 | 1219204 | 0 | DC | 140 | 11001001200 | 11 | Census Tract 12 | 5371 | 2672 | POLYGON ((-8580376 4714016,… |
| 29 | 001301 | 11001001301 | 2855501 | 26550 | DC | 140 | 11001001301 | 11 | Census Tract 13.01 | 4160 | 2187 | POLYGON ((-8579329 4715134,… |
| 30 | 001303 | 11001001303 | 889581 | 5274 | DC | 140 | 11001001303 | 11 | Census Tract 13.03 | 3763 | 2532 | POLYGON ((-8578912 4714212,… |
| 31 | 001304 | 11001001304 | 707155 | 9432 | DC | 140 | 11001001304 | 11 | Census Tract 13.04 | 4018 | 3087 | POLYGON ((-8578455 4713220,… |
| 32 | 001401 | 11001001401 | 788095 | 0 | DC | 140 | 11001001401 | 11 | Census Tract 14.01 | 3258 | 1477 | POLYGON ((-8580220 4716990,… |
| 33 | 001402 | 11001001402 | 895209 | 0 | DC | 140 | 11001001402 | 11 | Census Tract 14.02 | 3514 | 1791 | POLYGON ((-8579762 4716090,… |
| 34 | 001500 | 11001001500 | 4684714 | 39895 | DC | 140 | 11001001500 | 11 | Census Tract 15 | 6156 | 2282 | POLYGON ((-8579577 4717632,… |
| 35 | 001600 | 11001001600 | 2667590 | 7820 | DC | 140 | 11001001600 | 11 | Census Tract 16 | 4471 | 1720 | POLYGON ((-8577348 4719831,… |
| 36 | 001702 | 11001001702 | 939295 | 0 | DC | 140 | 11001001702 | 11 | Census Tract 17.02 | 3356 | 1737 | POLYGON ((-8574419 4717383,… |
| 37 | 001803 | 11001001803 | 1136289 | 31909 | DC | 140 | 11001001803 | 11 | Census Tract 18.03 | 4102 | 1640 | POLYGON ((-8576903 4716627,… |
| 38 | 001804 | 11001001804 | 601755 | 0 | DC | 140 | 11001001804 | 11 | Census Tract 18.04 | 5500 | 2225 | POLYGON ((-8575321 4716259,… |
| 39 | 001901 | 11001001901 | 769304 | 0 | DC | 140 | 11001001901 | 11 | Census Tract 19.01 | 4206 | 1644 | POLYGON ((-8574721 4716094,… |
| 40 | 001902 | 11001001902 | 877346 | 0 | DC | 140 | 11001001902 | 11 | Census Tract 19.02 | 2117 | 883 | POLYGON ((-8573816 4715855,… |
| 41 | 002001 | 11001002001 | 632724 | 1132 | DC | 140 | 11001002001 | 11 | Census Tract 20.01 | 2926 | 1130 | POLYGON ((-8576430 4716153,… |
| 42 | 002301 | 11001002301 | 407679 | 0 | DC | 140 | 11001002301 | 11 | Census Tract 23.01 | 3266 | 1254 | POLYGON ((-8573822 4713535,… |
| 43 | 002302 | 11001002302 | 2010924 | 5298 | DC | 140 | 11001002302 | 11 | Census Tract 23.02 | 1762 | 686 | POLYGON ((-8573742 4712625,… |
| 44 | 002400 | 11001002400 | 556408 | 0 | DC | 140 | 11001002400 | 11 | Census Tract 24 | 4095 | 1724 | POLYGON ((-8574562 4713958,… |
| 45 | 002501 | 11001002501 | 543460 | 0 | DC | 140 | 11001002501 | 11 | Census Tract 25.01 | 2688 | 1099 | POLYGON ((-8575656 4713502,… |
| 46 | 002503 | 11001002503 | 292105 | 0 | DC | 140 | 11001002503 | 11 | Census Tract 25.03 | 3031 | 1523 | POLYGON ((-8574908 4712629,… |
| 47 | 002504 | 11001002504 | 311721 | 0 | DC | 140 | 11001002504 | 11 | Census Tract 25.04 | 3349 | 1375 | POLYGON ((-8575658 4712757,… |
| 48 | 002600 | 11001002600 | 2106150 | 60195 | DC | 140 | 11001002600 | 11 | Census Tract 26 | 2592 | 1013 | POLYGON ((-8577402 4712795,… |
| 49 | 002702 | 11001002702 | 479022 | 7175 | DC | 140 | 11001002702 | 11 | Census Tract 27.02 | 5825 | 2806 | POLYGON ((-8577254 4712081,… |
| 50 | 002703 | 11001002703 | 163863 | 0 | DC | 140 | 11001002703 | 11 | Census Tract 27.03 | 2614 | 1289 | POLYGON ((-8576520 4712081,… |
| 51 | 002704 | 11001002704 | 295339 | 2427 | DC | 140 | 11001002704 | 11 | Census Tract 27.04 | 2993 | 1689 | POLYGON ((-8577217 4712120,… |
| 52 | 002801 | 11001002801 | 171910 | 0 | DC | 140 | 11001002801 | 11 | Census Tract 28.01 | 4398 | 1999 | POLYGON ((-8575659 4712241,… |
| 53 | 002802 | 11001002802 | 229696 | 0 | DC | 140 | 11001002802 | 11 | Census Tract 28.02 | 4685 | 2430 | POLYGON ((-8575687 4711238,… |
| 54 | 002900 | 11001002900 | 300632 | 0 | DC | 140 | 11001002900 | 11 | Census Tract 29 | 4443 | 1944 | POLYGON ((-8575245 4711935,… |
| 55 | 003000 | 11001003000 | 210636 | 0 | DC | 140 | 11001003000 | 11 | Census Tract 30 | 3561 | 1748 | POLYGON ((-8575237 4711674,… |
| 56 | 003100 | 11001003100 | 296819 | 0 | DC | 140 | 11001003100 | 11 | Census Tract 31 | 3873 | 1818 | POLYGON ((-8574747 4711911,… |
| 57 | 003200 | 11001003200 | 447929 | 0 | DC | 140 | 11001003200 | 11 | Census Tract 32 | 5099 | 2174 | POLYGON ((-8574305 4712551,… |
| 58 | 003301 | 11001003301 | 442120 | 0 | DC | 140 | 11001003301 | 11 | Census Tract 33.01 | 3824 | 1847 | POLYGON ((-8573264 4710315,… |
| 59 | 003302 | 11001003302 | 204237 | 0 | DC | 140 | 11001003302 | 11 | Census Tract 33.02 | 2434 | 1216 | POLYGON ((-8573190 4709512,… |
| 60 | 003400 | 11001003400 | 911458 | 159593 | DC | 140 | 11001003400 | 11 | Census Tract 34 | 5120 | 1572 | POLYGON ((-8574157 4711254,… |
| 61 | 003500 | 11001003500 | 382021 | 0 | DC | 140 | 11001003500 | 11 | Census Tract 35 | 4801 | 2587 | POLYGON ((-8574612 4711186,… |
| 62 | 003600 | 11001003600 | 305616 | 0 | DC | 140 | 11001003600 | 11 | Census Tract 36 | 4775 | 2609 | POLYGON ((-8575209 4711160,… |
| 63 | 003701 | 11001003701 | 172840 | 0 | DC | 140 | 11001003701 | 11 | Census Tract 37.01 | 2916 | 1628 | POLYGON ((-8575664 4710117,… |
| 64 | 003702 | 11001003702 | 119532 | 0 | DC | 140 | 11001003702 | 11 | Census Tract 37.02 | 2906 | 1612 | POLYGON ((-8575663 4710709,… |
| 65 | 003801 | 11001003801 | 148928 | 0 | DC | 140 | 11001003801 | 11 | Census Tract 38.01 | 1800 | 1211 | POLYGON ((-8576244 4710171,… |
| 66 | 003802 | 11001003802 | 207186 | 0 | DC | 140 | 11001003802 | 11 | Census Tract 38.02 | 3911 | 2378 | POLYGON ((-8576353 4710601,… |
| 67 | 003901 | 11001003901 | 120715 | 0 | DC | 140 | 11001003901 | 11 | Census Tract 39.01 | 2598 | 1769 | POLYGON ((-8576449 4710723,… |
| 68 | 003902 | 11001003902 | 266513 | 11205 | DC | 140 | 11001003902 | 11 | Census Tract 39.02 | 2022 | 1379 | POLYGON ((-8577145 4711348,… |
| 69 | 004001 | 11001004001 | 271037 | 2414 | DC | 140 | 11001004001 | 11 | Census Tract 40.01 | 3941 | 2494 | POLYGON ((-8577187 4710397,… |
| 70 | 004002 | 11001004002 | 194755 | 0 | DC | 140 | 11001004002 | 11 | Census Tract 40.02 | 3291 | 2251 | POLYGON ((-8576755 4709692,… |
| 71 | 004100 | 11001004100 | 788701 | 7303 | DC | 140 | 11001004100 | 11 | Census Tract 41 | 2836 | 1757 | POLYGON ((-8578147 4709619,… |
| 72 | 004201 | 11001004201 | 204529 | 0 | DC | 140 | 11001004201 | 11 | Census Tract 42.01 | 3548 | 2367 | POLYGON ((-8576239 4709387,… |
| 73 | 004202 | 11001004202 | 207646 | 0 | DC | 140 | 11001004202 | 11 | Census Tract 42.02 | 2850 | 2060 | POLYGON ((-8576721 4709433,… |
| 74 | 004300 | 11001004300 | 236694 | 0 | DC | 140 | 11001004300 | 11 | Census Tract 43 | 4436 | 3030 | POLYGON ((-8575665 4709399,… |
| 75 | 004401 | 11001004401 | 246895 | 0 | DC | 140 | 11001004401 | 11 | Census Tract 44.01 | 3430 | 2302 | POLYGON ((-8575158 4710216,… |
| 76 | 004402 | 11001004402 | 274746 | 0 | DC | 140 | 11001004402 | 11 | Census Tract 44.02 | 2755 | 1629 | POLYGON ((-8575158 4709586,… |
| 77 | 004600 | 11001004600 | 437422 | 0 | DC | 140 | 11001004600 | 11 | Census Tract 46 | 3543 | 1844 | POLYGON ((-8573617 4709454,… |
| 78 | 004702 | 11001004702 | 326418 | 0 | DC | 140 | 11001004702 | 11 | Census Tract 47.02 | 3934 | 2762 | POLYGON ((-8574041 4707719,… |
| 79 | 004703 | 11001004703 | 124124 | 0 | DC | 140 | 11001004703 | 11 | Census Tract 47.03 | 3331 | 2356 | POLYGON ((-8574041 4707779,… |
| 80 | 004704 | 11001004704 | 198509 | 0 | DC | 140 | 11001004704 | 11 | Census Tract 47.04 | 1945 | 881 | POLYGON ((-8573250 4708134,… |
| 81 | 004801 | 11001004801 | 317222 | 0 | DC | 140 | 11001004801 | 11 | Census Tract 48.01 | 2820 | 1636 | POLYGON ((-8574041 4709003,… |
| 82 | 004802 | 11001004802 | 288793 | 0 | DC | 140 | 11001004802 | 11 | Census Tract 48.02 | 3634 | 2070 | POLYGON ((-8574041 4707813,… |
| 83 | 004901 | 11001004901 | 271866 | 0 | DC | 140 | 11001004901 | 11 | Census Tract 49.01 | 3380 | 2031 | POLYGON ((-8574611 4708884,… |
| 84 | 004902 | 11001004902 | 263879 | 0 | DC | 140 | 11001004902 | 11 | Census Tract 49.02 | 3449 | 2070 | POLYGON ((-8574612 4707955,… |
| 85 | 005001 | 11001005001 | 200969 | 0 | DC | 140 | 11001005001 | 11 | Census Tract 50.01 | 2012 | 1273 | POLYGON ((-8575158 4708916,… |
| 86 | 005003 | 11001005003 | 94136 | 0 | DC | 140 | 11001005003 | 11 | Census Tract 50.03 | 2143 | 1381 | POLYGON ((-8575158 4708394,… |
| 87 | 005004 | 11001005004 | 143156 | 0 | DC | 140 | 11001005004 | 11 | Census Tract 50.04 | 3861 | 2524 | POLYGON ((-8574977 4708742,… |
| 88 | 005202 | 11001005202 | 246292 | 0 | DC | 140 | 11001005202 | 11 | Census Tract 52.02 | 3408 | 2309 | POLYGON ((-8575667 4708550,… |
| 89 | 005203 | 11001005203 | 93419 | 0 | DC | 140 | 11001005203 | 11 | Census Tract 52.03 | 2979 | 2450 | POLYGON ((-8575449 4708395,… |
| 90 | 005302 | 11001005302 | 117635 | 0 | DC | 140 | 11001005302 | 11 | Census Tract 53.02 | 2518 | 1832 | POLYGON ((-8576240 4709009,… |
| 91 | 005303 | 11001005303 | 168769 | 0 | DC | 140 | 11001005303 | 11 | Census Tract 53.03 | 3215 | 2484 | POLYGON ((-8576385 4708809,… |
| 92 | 005501 | 11001005501 | 164749 | 0 | DC | 140 | 11001005501 | 11 | Census Tract 55.01 | 2303 | 1776 | POLYGON ((-8577325 4707809,… |
| 93 | 005502 | 11001005502 | 251302 | 0 | DC | 140 | 11001005502 | 11 | Census Tract 55.02 | 2968 | 2016 | POLYGON ((-8577033 4708467,… |
| 94 | 005503 | 11001005503 | 213338 | 4682 | DC | 140 | 11001005503 | 11 | Census Tract 55.03 | 2492 | 1799 | POLYGON ((-8577830 4708009,… |
| 95 | 005601 | 11001005601 | 185309 | 1275 | DC | 140 | 11001005601 | 11 | Census Tract 56.01 | 2900 | 2437 | POLYGON ((-8578015 4707737,… |
| 96 | 005602 | 11001005602 | 273491 | 6261 | DC | 140 | 11001005602 | 11 | Census Tract 56.02 | 4100 | 2355 | POLYGON ((-8578124 4707549,… |
| 97 | 005801 | 11001005801 | 232951 | 0 | DC | 140 | 11001005801 | 11 | Census Tract 58.01 | 1672 | 1312 | POLYGON ((-8574041 4706439,… |
| 98 | 005802 | 11001005802 | 682488 | 0 | DC | 140 | 11001005802 | 11 | Census Tract 58.02 | 2145 | 1616 | POLYGON ((-8575346 4706979,… |
| 99 | 005900 | 11001005900 | 641993 | 0 | DC | 140 | 11001005900 | 11 | Census Tract 59 | 2617 | 1705 | POLYGON ((-8573819 4706443,… |
| 100 | 006400 | 11001006400 | 691410 | 243648 | DC | 140 | 11001006400 | 11 | Census Tract 64 | 2481 | 1956 | POLYGON ((-8573310 4701938,… |
| 101 | 006500 | 11001006500 | 509297 | 0 | DC | 140 | 11001006500 | 11 | Census Tract 65 | 2609 | 1630 | POLYGON ((-8572616 4704770,… |
| 102 | 006600 | 11001006600 | 285156 | 0 | DC | 140 | 11001006600 | 11 | Census Tract 66 | 2164 | 1297 | POLYGON ((-8571992 4705886,… |
| 103 | 006700 | 11001006700 | 428358 | 0 | DC | 140 | 11001006700 | 11 | Census Tract 67 | 3927 | 2062 | POLYGON ((-8571041 4705369,… |
| 104 | 006801 | 11001006801 | 244750 | 0 | DC | 140 | 11001006801 | 11 | Census Tract 68.01 | 2238 | 1173 | POLYGON ((-8569781 4705521,… |
| 105 | 006802 | 11001006802 | 280108 | 0 | DC | 140 | 11001006802 | 11 | Census Tract 68.02 | 2580 | 1206 | POLYGON ((-8569782 4704455,… |
| 106 | 006804 | 11001006804 | 1542277 | 477741 | DC | 140 | 11001006804 | 11 | Census Tract 68.04 | 2429 | 17 | POLYGON ((-8569544 4704345,… |
| 107 | 006900 | 11001006900 | 398513 | 0 | DC | 140 | 11001006900 | 11 | Census Tract 69 | 2799 | 1793 | POLYGON ((-8570907 4705154,… |
| 108 | 007000 | 11001007000 | 439473 | 0 | DC | 140 | 11001007000 | 11 | Census Tract 70 | 2697 | 1346 | POLYGON ((-8571829 4704590,… |
| 109 | 007100 | 11001007100 | 602223 | 149901 | DC | 140 | 11001007100 | 11 | Census Tract 71 | 3218 | 1939 | POLYGON ((-8570659 4704101,… |
| 110 | 007201 | 11001007201 | 781457 | 312419 | DC | 140 | 11001007201 | 11 | Census Tract 72.01 | 2985 | 2672 | POLYGON ((-8572614 4703874,… |
| 111 | 007202 | 11001007202 | 183977 | 0 | DC | 140 | 11001007202 | 11 | Census Tract 72.02 | 4303 | 3563 | POLYGON ((-8572620 4704474,… |
| 112 | 007203 | 11001007203 | 384178 | 0 | DC | 140 | 11001007203 | 11 | Census Tract 72.03 | 3748 | 2246 | POLYGON ((-8572240 4704619,… |
| 113 | 007301 | 11001007301 | 4684643 | 5139082 | DC | 140 | 11001007301 | 11 | Census Tract 73.01 | 3841 | 1272 | POLYGON ((-8576945 4698961,… |
| 114 | 007304 | 11001007304 | 1232841 | 8983 | DC | 140 | 11001007304 | 11 | Census Tract 73.04 | 4410 | 1765 | POLYGON ((-8570958 4699307,… |
| 115 | 007401 | 11001007401 | 1209113 | 200980 | DC | 140 | 11001007401 | 11 | Census Tract 74.01 | 1259 | 644 | POLYGON ((-8572202 4702896,… |
| 116 | 007403 | 11001007403 | 330904 | 0 | DC | 140 | 11001007403 | 11 | Census Tract 74.03 | 2613 | 1056 | POLYGON ((-8569516 4699726,… |
| 117 | 007404 | 11001007404 | 826388 | 0 | DC | 140 | 11001007404 | 11 | Census Tract 74.04 | 3637 | 1453 | POLYGON ((-8570741 4700704,… |
| 118 | 007406 | 11001007406 | 360152 | 0 | DC | 140 | 11001007406 | 11 | Census Tract 74.06 | 3528 | 1286 | POLYGON ((-8570894 4701168,… |
| 119 | 007407 | 11001007407 | 608700 | 0 | DC | 140 | 11001007407 | 11 | Census Tract 74.07 | 3491 | 1570 | POLYGON ((-8570960 4701752,… |
| 120 | 007408 | 11001007408 | 372349 | 0 | DC | 140 | 11001007408 | 11 | Census Tract 74.08 | 2867 | 1205 | POLYGON ((-8568918 4700728,… |
| 121 | 007409 | 11001007409 | 404873 | 5767 | DC | 140 | 11001007409 | 11 | Census Tract 74.09 | 3835 | 1613 | POLYGON ((-8569441 4699556,… |
| 122 | 007502 | 11001007502 | 648317 | 0 | DC | 140 | 11001007502 | 11 | Census Tract 75.02 | 4687 | 1997 | POLYGON ((-8568807 4701881,… |
| 123 | 007503 | 11001007503 | 515179 | 0 | DC | 140 | 11001007503 | 11 | Census Tract 75.03 | 2528 | 1152 | POLYGON ((-8570776 4702348,… |
| 124 | 007504 | 11001007504 | 764081 | 0 | DC | 140 | 11001007504 | 11 | Census Tract 75.04 | 2730 | 1321 | POLYGON ((-8570263 4701676,… |
| 125 | 007601 | 11001007601 | 1115359 | 141529 | DC | 140 | 11001007601 | 11 | Census Tract 76.01 | 4693 | 2350 | POLYGON ((-8570458 4703300,… |
| 126 | 007603 | 11001007603 | 1226616 | 0 | DC | 140 | 11001007603 | 11 | Census Tract 76.03 | 4185 | 2374 | POLYGON ((-8568061 4701482,… |
| 127 | 007604 | 11001007604 | 1369580 | 0 | DC | 140 | 11001007604 | 11 | Census Tract 76.04 | 3803 | 2056 | POLYGON ((-8568410 4703627,… |
| 128 | 007605 | 11001007605 | 453794 | 0 | DC | 140 | 11001007605 | 11 | Census Tract 76.05 | 3663 | 1834 | POLYGON ((-8569859 4702590,… |
| 129 | 007703 | 11001007703 | 1017741 | 1059 | DC | 140 | 11001007703 | 11 | Census Tract 77.03 | 5227 | 2418 | POLYGON ((-8566855 4705043,… |
| 130 | 007707 | 11001007707 | 842851 | 0 | DC | 140 | 11001007707 | 11 | Census Tract 77.07 | 3927 | 1757 | POLYGON ((-8565463 4704369,… |
| 131 | 007708 | 11001007708 | 745809 | 129100 | DC | 140 | 11001007708 | 11 | Census Tract 77.08 | 2574 | 1275 | POLYGON ((-8568423 4704589,… |
| 132 | 007709 | 11001007709 | 828872 | 82685 | DC | 140 | 11001007709 | 11 | Census Tract 77.09 | 2072 | 1096 | POLYGON ((-8569155 4704052,… |
| 133 | 007803 | 11001007803 | 986677 | 3755 | DC | 140 | 11001007803 | 11 | Census Tract 78.03 | 4590 | 2301 | POLYGON ((-8565969 4706900,… |
| 134 | 007804 | 11001007804 | 838428 | 5705 | DC | 140 | 11001007804 | 11 | Census Tract 78.04 | 3499 | 1421 | POLYGON ((-8564832 4707278,… |
| 135 | 007806 | 11001007806 | 671434 | 0 | DC | 140 | 11001007806 | 11 | Census Tract 78.06 | 3457 | 1122 | POLYGON ((-8565240 4707651,… |
| 136 | 007807 | 11001007807 | 522749 | 0 | DC | 140 | 11001007807 | 11 | Census Tract 78.07 | 2114 | 926 | POLYGON ((-8563393 4706879,… |
| 137 | 007808 | 11001007808 | 936852 | 7722 | DC | 140 | 11001007808 | 11 | Census Tract 78.08 | 3792 | 1703 | POLYGON ((-8563582 4705915,… |
| 138 | 007809 | 11001007809 | 535254 | 0 | DC | 140 | 11001007809 | 11 | Census Tract 78.09 | 3155 | 1369 | POLYGON ((-8565198 4707650,… |
| 139 | 007901 | 11001007901 | 402041 | 0 | DC | 140 | 11001007901 | 11 | Census Tract 79.01 | 4148 | 1895 | POLYGON ((-8569781 4707029,… |
| 140 | 007903 | 11001007903 | 247945 | 0 | DC | 140 | 11001007903 | 11 | Census Tract 79.03 | 1865 | 917 | POLYGON ((-8569069 4706521,… |
| 141 | 008001 | 11001008001 | 322795 | 0 | DC | 140 | 11001008001 | 11 | Census Tract 80.01 | 3103 | 1448 | POLYGON ((-8570516 4706973,… |
| 142 | 008002 | 11001008002 | 578961 | 0 | DC | 140 | 11001008002 | 11 | Census Tract 80.02 | 3366 | 1708 | POLYGON ((-8570659 4705900,… |
| 143 | 008100 | 11001008100 | 290284 | 0 | DC | 140 | 11001008100 | 11 | Census Tract 81 | 3153 | 1645 | POLYGON ((-8571041 4706062,… |
| 144 | 008200 | 11001008200 | 338424 | 0 | DC | 140 | 11001008200 | 11 | Census Tract 82 | 2695 | 1664 | POLYGON ((-8572261 4706190,… |
| 145 | 008301 | 11001008301 | 303973 | 0 | DC | 140 | 11001008301 | 11 | Census Tract 83.01 | 3220 | 1761 | POLYGON ((-8571998 4707388,… |
| 146 | 008302 | 11001008302 | 260891 | 0 | DC | 140 | 11001008302 | 11 | Census Tract 83.02 | 3026 | 1560 | POLYGON ((-8571429 4706527,… |
| 147 | 008402 | 11001008402 | 274180 | 0 | DC | 140 | 11001008402 | 11 | Census Tract 84.02 | 2447 | 1804 | POLYGON ((-8571041 4706986,… |
| 148 | 008410 | 11001008410 | 219939 | 0 | DC | 140 | 11001008410 | 11 | Census Tract 84.10 | 1843 | 898 | POLYGON ((-8571040 4707548,… |
| 149 | 008701 | 11001008701 | 382686 | 0 | DC | 140 | 11001008701 | 11 | Census Tract 87.01 | 2814 | 1498 | POLYGON ((-8572606 4708949,… |
| 150 | 008702 | 11001008702 | 486411 | 0 | DC | 140 | 11001008702 | 11 | Census Tract 87.02 | 3574 | 2073 | POLYGON ((-8572189 4708697,… |
| 151 | 008802 | 11001008802 | 468578 | 0 | DC | 140 | 11001008802 | 11 | Census Tract 88.02 | 4360 | 2240 | POLYGON ((-8570837 4707931,… |
| 152 | 008803 | 11001008803 | 1168294 | 0 | DC | 140 | 11001008803 | 11 | Census Tract 88.03 | 4036 | 2026 | POLYGON ((-8571871 4708552,… |
| 153 | 008804 | 11001008804 | 778052 | 0 | DC | 140 | 11001008804 | 11 | Census Tract 88.04 | 2417 | 1551 | POLYGON ((-8570358 4708471,… |
| 154 | 008903 | 11001008903 | 305651 | 0 | DC | 140 | 11001008903 | 11 | Census Tract 89.03 | 3062 | 1661 | POLYGON ((-8569704 4707476,… |
| 155 | 008904 | 11001008904 | 449343 | 0 | DC | 140 | 11001008904 | 11 | Census Tract 89.04 | 3137 | 1806 | POLYGON ((-8569738 4707408,… |
| 156 | 009000 | 11001009000 | 1427114 | 31550 | DC | 140 | 11001009000 | 11 | Census Tract 90 | 4676 | 2548 | POLYGON ((-8567723 4710972,… |
| 157 | 009102 | 11001009102 | 1816287 | 0 | DC | 140 | 11001009102 | 11 | Census Tract 91.02 | 4608 | 2173 | POLYGON ((-8571767 4708853,… |
| 158 | 009201 | 11001009201 | 629781 | 0 | DC | 140 | 11001009201 | 11 | Census Tract 92.01 | 3103 | 1549 | POLYGON ((-8572298 4711224,… |
| 159 | 009203 | 11001009203 | 581087 | 0 | DC | 140 | 11001009203 | 11 | Census Tract 92.03 | 2775 | 1352 | POLYGON ((-8572603 4709949,… |
| 160 | 009204 | 11001009204 | 308465 | 0 | DC | 140 | 11001009204 | 11 | Census Tract 92.04 | 2889 | 1414 | POLYGON ((-8571976 4710795,… |
| 161 | 009301 | 11001009301 | 1109091 | 0 | DC | 140 | 11001009301 | 11 | Census Tract 93.01 | 3853 | 1385 | POLYGON ((-8571026 4712187,… |
| 162 | 009302 | 11001009302 | 391905 | 0 | DC | 140 | 11001009302 | 11 | Census Tract 93.02 | 1750 | 878 | POLYGON ((-8571159 4710418,… |
| 163 | 009400 | 11001009400 | 1582882 | 0 | DC | 140 | 11001009400 | 11 | Census Tract 94 | 4424 | 1800 | POLYGON ((-8569419 4713523,… |
| 164 | 009503 | 11001009503 | 1423609 | 0 | DC | 140 | 11001009503 | 11 | Census Tract 95.03 | 3106 | 1282 | POLYGON ((-8570435 4714552,… |
| 165 | 009504 | 11001009504 | 1033168 | 0 | DC | 140 | 11001009504 | 11 | Census Tract 95.04 | 3208 | 1442 | POLYGON ((-8571503 4713979,… |
| 166 | 009505 | 11001009505 | 1033208 | 0 | DC | 140 | 11001009505 | 11 | Census Tract 95.05 | 3796 | 1674 | POLYGON ((-8572794 4716282,… |
| 167 | 009507 | 11001009507 | 295290 | 0 | DC | 140 | 11001009507 | 11 | Census Tract 95.07 | 1525 | 623 | POLYGON ((-8571851 4715497,… |
| 168 | 009508 | 11001009508 | 962212 | 0 | DC | 140 | 11001009508 | 11 | Census Tract 95.08 | 4243 | 2068 | POLYGON ((-8572608 4714990,… |
| 169 | 009509 | 11001009509 | 648848 | 0 | DC | 140 | 11001009509 | 11 | Census Tract 95.09 | 3194 | 1377 | POLYGON ((-8571825 4714664,… |
| 170 | 009510 | 11001009510 | 841510 | 0 | DC | 140 | 11001009510 | 11 | Census Tract 95.10 | 4525 | 1939 | POLYGON ((-8572810 4713747,… |
| 171 | 009511 | 11001009511 | 719468 | 0 | DC | 140 | 11001009511 | 11 | Census Tract 95.11 | 2066 | 10 | POLYGON ((-8572532 4713276,… |
| 172 | 009601 | 11001009601 | 1905262 | 189666 | DC | 140 | 11001009601 | 11 | Census Tract 96.01 | 2086 | 819 | POLYGON ((-8566913 4708256,… |
| 173 | 009602 | 11001009602 | 1306709 | 67073 | DC | 140 | 11001009602 | 11 | Census Tract 96.02 | 4481 | 2046 | POLYGON ((-8567395 4707287,… |
| 174 | 009603 | 11001009603 | 607400 | 0 | DC | 140 | 11001009603 | 11 | Census Tract 96.03 | 3971 | 1892 | POLYGON ((-8566744 4705958,… |
| 175 | 009604 | 11001009604 | 503381 | 65762 | DC | 140 | 11001009604 | 11 | Census Tract 96.04 | 1996 | 1005 | POLYGON ((-8567512 4705978,… |
| 176 | 009700 | 11001009700 | 403051 | 3427 | DC | 140 | 11001009700 | 11 | Census Tract 97 | 3188 | 1355 | POLYGON ((-8571028 4697243,… |
| 177 | 009801 | 11001009801 | 431384 | 7884 | DC | 140 | 11001009801 | 11 | Census Tract 98.01 | 1848 | 898 | POLYGON ((-8572031 4697492,… |
| 178 | 009802 | 11001009802 | 200745 | 0 | DC | 140 | 11001009802 | 11 | Census Tract 98.02 | 2064 | 880 | POLYGON ((-8571665 4697488,… |
| 179 | 009803 | 11001009803 | 531060 | 3756 | DC | 140 | 11001009803 | 11 | Census Tract 98.03 | 2968 | 1480 | POLYGON ((-8572537 4697872,… |
| 180 | 009804 | 11001009804 | 518363 | 5609 | DC | 140 | 11001009804 | 11 | Census Tract 98.04 | 2517 | 1133 | POLYGON ((-8572070 4698838,… |
| 181 | 009807 | 11001009807 | 1037012 | 0 | DC | 140 | 11001009807 | 11 | Census Tract 98.07 | 3523 | 1682 | POLYGON ((-8573535 4696479,… |
| 182 | 009810 | 11001009810 | 398419 | 14058 | DC | 140 | 11001009810 | 11 | Census Tract 98.10 | 2461 | 1243 | POLYGON ((-8572456 4697551,… |
| 183 | 009811 | 11001009811 | 467511 | 0 | DC | 140 | 11001009811 | 11 | Census Tract 98.11 | 4438 | 1939 | POLYGON ((-8571871 4696978,… |
| 184 | 009901 | 11001009901 | 2102150 | 0 | DC | 140 | 11001009901 | 11 | Census Tract 99.01 | 2364 | 1066 | POLYGON ((-8567684 4703986,… |
| 185 | 009902 | 11001009902 | 1294556 | 0 | DC | 140 | 11001009902 | 11 | Census Tract 99.02 | 2774 | 1289 | POLYGON ((-8566359 4702556,… |
| 186 | 009903 | 11001009903 | 383679 | 0 | DC | 140 | 11001009903 | 11 | Census Tract 99.03 | 2004 | 743 | POLYGON ((-8563815 4705903,… |
| 187 | 009904 | 11001009904 | 426198 | 0 | DC | 140 | 11001009904 | 11 | Census Tract 99.04 | 2886 | 1276 | POLYGON ((-8564451 4705351,… |
| 188 | 009905 | 11001009905 | 431558 | 0 | DC | 140 | 11001009905 | 11 | Census Tract 99.05 | 2790 | 1344 | POLYGON ((-8563733 4704608,… |
| 189 | 009906 | 11001009906 | 252684 | 0 | DC | 140 | 11001009906 | 11 | Census Tract 99.06 | 1773 | 896 | POLYGON ((-8564983 4705437,… |
| 190 | 009907 | 11001009907 | 466954 | 0 | DC | 140 | 11001009907 | 11 | Census Tract 99.07 | 2259 | 1146 | POLYGON ((-8565564 4704623,… |
| 191 | 010100 | 11001010100 | 579230 | 0 | DC | 140 | 11001010100 | 11 | Census Tract 101 | 2699 | 2022 | POLYGON ((-8575670 4707461,… |
| 192 | 010201 | 11001010201 | 174884 | 0 | DC | 140 | 11001010201 | 11 | Census Tract 102.01 | 3341 | 2471 | POLYGON ((-8574057 4704372,… |
| 193 | 010202 | 11001010202 | 1069479 | 136323 | DC | 140 | 11001010202 | 11 | Census Tract 102.02 | 2631 | 2042 | POLYGON ((-8575241 4704871,… |
| 194 | 010300 | 11001010300 | 1084591 | 0 | DC | 140 | 11001010300 | 11 | Census Tract 103 | 3604 | 1483 | POLYGON ((-8575650 4717824,… |
| 195 | 010400 | 11001010400 | 2602393 | 7006 | DC | 140 | 11001010400 | 11 | Census Tract 104 | 4616 | 1894 | POLYGON ((-8572624 4698663,… |
| 196 | 010500 | 11001010500 | 749891 | 0 | DC | 140 | 11001010500 | 11 | Census Tract 105 | 3712 | 2440 | POLYGON ((-8573556 4704827,… |
| 197 | 010601 | 11001010601 | 224811 | 0 | DC | 140 | 11001010601 | 11 | Census Tract 106.01 | 2130 | 1486 | POLYGON ((-8572603 4708182,… |
| 198 | 010602 | 11001010602 | 542509 | 0 | DC | 140 | 11001010602 | 11 | Census Tract 106.02 | 6594 | 3730 | POLYGON ((-8572095 4707718,… |
| 199 | 010603 | 11001010603 | 464270 | 0 | DC | 140 | 11001010603 | 11 | Census Tract 106.03 | 3068 | 2004 | POLYGON ((-8572611 4707052,… |
| 200 | 010700 | 11001010700 | 891588 | 0 | DC | 140 | 11001010700 | 11 | Census Tract 107 | 2296 | 1556 | POLYGON ((-8577137 4707783,… |
| 201 | 010800 | 11001010800 | 661580 | 0 | DC | 140 | 11001010800 | 11 | Census Tract 108 | 6879 | 1501 | POLYGON ((-8577183 4707206,… |
| 202 | 010900 | 11001010900 | 2381015 | 2933566 | DC | 140 | 11001010900 | 11 | Census Tract 109 | 3333 | 1378 | POLYGON ((-8575964 4693136,… |
| 203 | 011001 | 11001011001 | 152450 | 0 | DC | 140 | 11001011001 | 11 | Census Tract 110.01 | 2423 | 1636 | POLYGON ((-8573556 4703992,… |
| 204 | 011002 | 11001011002 | 498122 | 367023 | DC | 140 | 11001011002 | 11 | Census Tract 110.02 | 1859 | 1471 | POLYGON ((-8574037 4703998,… |
| 205 | 011100 | 11001011100 | 5718693 | 366232 | DC | 140 | 11001011100 | 11 | Census Tract 111 | 5903 | 1952 | POLYGON ((-8569278 4711323,… |
| 206 | 980000 | 11001980000 | 6514228 | 4996439 | DC | 140 | 11001980000 | 11 | Census Tract 9800 | 176 | 12 | POLYGON ((-8578803 4706193,… |
POLYGON Objects?head(dc_sf)| OBJECTID | TRACT | GEOID | ALAND | AWATER | STUSAB | SUMLEV | GEOCODE | STATE | NAME | POP100 | HU100 | geometry |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 002002 | 11001002002 | 849376 | 0 | DC | 140 | 11001002002 | 11 | Census Tract 20.02 | 4072 | 1532 | POLYGON ((-8575655 4714476,… |
| 2 | 002101 | 11001002101 | 600992 | 0 | DC | 140 | 11001002101 | 11 | Census Tract 21.01 | 5687 | 2335 | POLYGON ((-8574745 4715676,… |
| 3 | 002102 | 11001002102 | 725975 | 0 | DC | 140 | 11001002102 | 11 | Census Tract 21.02 | 5099 | 2221 | POLYGON ((-8573824 4715684,… |
| 4 | 002201 | 11001002201 | 415173 | 0 | DC | 140 | 11001002201 | 11 | Census Tract 22.01 | 3485 | 1229 | POLYGON ((-8574654 4714781,… |
| 5 | 002202 | 11001002202 | 698895 | 566 | DC | 140 | 11001002202 | 11 | Census Tract 22.02 | 3339 | 1454 | POLYGON ((-8573792 4714811,… |
| 6 | 000101 | 11001000101 | 199776 | 5261 | DC | 140 | 11001000101 | 11 | Census Tract 1.01 | 1406 | 999 | POLYGON ((-8577962 4708867,… |
Let’s try printing just the first row?
rmarkdown::paged_table(dc_sf[1,])| OBJECTID | TRACT | GEOID | ALAND | AWATER | STUSAB | SUMLEV | GEOCODE | STATE | NAME | POP100 | HU100 | geometry |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 002002 | 11001002002 | 849376 | 0 | DC | 140 | 11001002002 | 11 | Census Tract 20.02 | 4072 | 1532 | POLYGON ((-8575655 4714476,… |
Printing the special geometry column?
rmarkdown::paged_table(dc_sf[1, "geometry"])| geometry |
|---|
| POLYGON ((-8575655 4714476,… |
Nope, we’ll have to open the “black box” using the st_coordinates() function from the sf library →
sf::st_coordinates(dc_sf[1,"geometry"]) X Y L1 L2
[1,] -8575655 4714476 1 1
[2,] -8575655 4714588 1 1
[3,] -8575655 4714628 1 1
[4,] -8575655 4714781 1 1
[5,] -8575655 4714876 1 1
[6,] -8575636 4714900 1 1
[7,] -8575622 4714920 1 1
[8,] -8575613 4714934 1 1
[9,] -8575595 4714962 1 1
[10,] -8575564 4715009 1 1
[11,] -8575519 4715077 1 1
[12,] -8575502 4715104 1 1
[13,] -8575452 4715179 1 1
[14,] -8575408 4715248 1 1
[15,] -8575362 4715318 1 1
[16,] -8575359 4715322 1 1
[17,] -8575320 4715400 1 1
[18,] -8575294 4715424 1 1
[19,] -8575272 4715454 1 1
[20,] -8575268 4715459 1 1
[21,] -8575242 4715499 1 1
[22,] -8575237 4715507 1 1
[23,] -8575226 4715523 1 1
[24,] -8575221 4715531 1 1
[25,] -8575205 4715556 1 1
[26,] -8575198 4715567 1 1
[27,] -8575190 4715579 1 1
[28,] -8575167 4715614 1 1
[29,] -8575142 4715652 1 1
[30,] -8575132 4715668 1 1
[31,] -8575116 4715692 1 1
[32,] -8575105 4715709 1 1
[33,] -8575094 4715724 1 1
[34,] -8575069 4715764 1 1
[35,] -8575031 4715822 1 1
[36,] -8575021 4715836 1 1
[37,] -8575008 4715855 1 1
[38,] -8574983 4715894 1 1
[39,] -8574959 4715928 1 1
[40,] -8574954 4715933 1 1
[41,] -8574952 4715935 1 1
[42,] -8574943 4715943 1 1
[43,] -8574939 4715947 1 1
[44,] -8574907 4715975 1 1
[45,] -8574904 4715976 1 1
[46,] -8574901 4715977 1 1
[47,] -8574898 4715978 1 1
[48,] -8574893 4715980 1 1
[49,] -8574889 4715984 1 1
[50,] -8574886 4715986 1 1
[51,] -8574883 4715990 1 1
[52,] -8574857 4716021 1 1
[53,] -8574802 4716086 1 1
[54,] -8574783 4716108 1 1
[55,] -8574779 4716114 1 1
[56,] -8574778 4716117 1 1
[57,] -8574775 4716123 1 1
[58,] -8574774 4716127 1 1
[59,] -8574775 4716129 1 1
[60,] -8574776 4716136 1 1
[61,] -8574735 4716130 1 1
[62,] -8574724 4716125 1 1
[63,] -8574719 4716120 1 1
[64,] -8574720 4716116 1 1
[65,] -8574721 4716094 1 1
[66,] -8574721 4716090 1 1
[67,] -8574724 4716050 1 1
[68,] -8574730 4715948 1 1
[69,] -8574736 4715850 1 1
[70,] -8574742 4715760 1 1
[71,] -8574743 4715730 1 1
[72,] -8574744 4715709 1 1
[73,] -8574744 4715699 1 1
[74,] -8574745 4715676 1 1
[75,] -8574745 4715665 1 1
[76,] -8574744 4715654 1 1
[77,] -8574744 4715631 1 1
[78,] -8574742 4715608 1 1
[79,] -8574742 4715596 1 1
[80,] -8574741 4715585 1 1
[81,] -8574737 4715555 1 1
[82,] -8574736 4715539 1 1
[83,] -8574733 4715518 1 1
[84,] -8574731 4715495 1 1
[85,] -8574726 4715446 1 1
[86,] -8574721 4715403 1 1
[87,] -8574720 4715389 1 1
[88,] -8574718 4715373 1 1
[89,] -8574713 4715331 1 1
[90,] -8574706 4715261 1 1
[91,] -8574705 4715250 1 1
[92,] -8574703 4715235 1 1
[93,] -8574699 4715194 1 1
[94,] -8574695 4715157 1 1
[95,] -8574688 4715097 1 1
[96,] -8574687 4715085 1 1
[97,] -8574670 4714929 1 1
[98,] -8574669 4714917 1 1
[99,] -8574669 4714914 1 1
[100,] -8574654 4714781 1 1
[101,] -8574651 4714745 1 1
[102,] -8574638 4714628 1 1
[103,] -8574637 4714615 1 1
[104,] -8574636 4714603 1 1
[105,] -8574634 4714590 1 1
[106,] -8574633 4714578 1 1
[107,] -8574631 4714565 1 1
[108,] -8574630 4714553 1 1
[109,] -8574625 4714503 1 1
[110,] -8574622 4714475 1 1
[111,] -8574616 4714418 1 1
[112,] -8574612 4714382 1 1
[113,] -8574611 4714369 1 1
[114,] -8574608 4714347 1 1
[115,] -8574607 4714336 1 1
[116,] -8574602 4714293 1 1
[117,] -8574601 4714283 1 1
[118,] -8574600 4714275 1 1
[119,] -8574599 4714264 1 1
[120,] -8574586 4714137 1 1
[121,] -8574583 4714111 1 1
[122,] -8574569 4713998 1 1
[123,] -8574562 4713958 1 1
[124,] -8574609 4713959 1 1
[125,] -8574659 4713958 1 1
[126,] -8574695 4713958 1 1
[127,] -8574741 4713958 1 1
[128,] -8574821 4713959 1 1
[129,] -8574901 4713958 1 1
[130,] -8574921 4713996 1 1
[131,] -8574923 4713999 1 1
[132,] -8574946 4714027 1 1
[133,] -8574966 4714053 1 1
[134,] -8574989 4714082 1 1
[135,] -8575017 4714117 1 1
[136,] -8575019 4714120 1 1
[137,] -8575029 4714133 1 1
[138,] -8575049 4714158 1 1
[139,] -8575057 4714171 1 1
[140,] -8575060 4714175 1 1
[141,] -8575062 4714178 1 1
[142,] -8575065 4714181 1 1
[143,] -8575103 4714228 1 1
[144,] -8575122 4714253 1 1
[145,] -8575129 4714261 1 1
[146,] -8575244 4714265 1 1
[147,] -8575259 4714265 1 1
[148,] -8575284 4714264 1 1
[149,] -8575358 4714264 1 1
[150,] -8575432 4714264 1 1
[151,] -8575443 4714264 1 1
[152,] -8575540 4714264 1 1
[153,] -8575639 4714264 1 1
[154,] -8575656 4714264 1 1
[155,] -8575655 4714476 1 1
sf Objectshead(dc_sf$NAME) # Select column by name [1] "Census Tract 20.02" "Census Tract 21.01" "Census Tract 21.02"
[4] "Census Tract 22.01" "Census Tract 22.02" "Census Tract 1.01"
head(dc_sf[,4]) # Select column by number| ALAND | geometry |
|---|---|
| 849376 | POLYGON ((-8575655 4714476,… |
| 600992 | POLYGON ((-8574745 4715676,… |
| 725975 | POLYGON ((-8573824 4715684,… |
| 415173 | POLYGON ((-8574654 4714781,… |
| 698895 | POLYGON ((-8573792 4714811,… |
| 199776 | POLYGON ((-8577962 4708867,… |
# We can extract the geometry with the st_geometry function
dc_geo <- st_geometry(dc_sf)
# Plot the geometry with base R's plot() function
plot(dc_geo)
ggplot!dc_sf |>
ggplot() +
geom_sf() +
theme_classic()
\[ \text{Data} = \left\{Z(\mathbf{s}) \mid \mathbf{s} \in D \subset \mathbb{R}^2\right\} \]
| Geostatistical Data | Lattice/Region Data | Point Pattern | |
|---|---|---|---|
| Criteria | Fixed \(D\), Continuous | Fixed \(D\), Discrete | Random subset \(D^* \subseteq D\) |
| Interest | Infer non-observed parts of \(D\) | Autocorrelation, clustering | Point-generating process |
| Example |
|
|
|
library(tidyverse)
library(spatstat)
set.seed(6805)
N <- 60
r_core <- 0.05
obs_window <- square(1)
# Regularity via Inhibition
#reg_sims <- rMaternI(N, r=r_core, win=obs_window)
cond_reg_sims <- rSSI(r=r_core, N)
# CSR data
#csr_sims <- rpoispp(N, win=obs_window)
cond_sr_sims <- rpoint(N, win=obs_window)
### Clustered data
#clust_sims <- rMatClust(kappa=6, r=2.5*r_core, mu=10, win=obs_window)
#clust_sims <- rMatClust(mu=5, kappa=1, scale=0.1, win=obs_window, n.cond=N, w.cond=obs_window)
#clust_sims <- rclusterBKBC(clusters="MatClust", kappa=10, mu=10, scale=0.05, verbose=FALSE)
# Each cluster consist of 10 points in a disc of radius 0.2
nclust <- function(x0, y0, radius, n) {
#print(n)
return(runifdisc(10, radius, centre=c(x0, y0)))
}
cond_clust_sims <- rNeymanScott(kappa=5, expand=0.0, rclust=nclust, radius=2*r_core, n=10)
# And PLOT
plot_w <- 400
plot_h <- 400
plot_scale <- 2.25
cond_reg_plot <- cond_reg_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
dsan_theme() +
transparent_bg()
ggsave("images/cond_reg.png", cond_reg_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)
cond_sr_plot <- cond_sr_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
dsan_theme() +
transparent_bg()
ggsave("images/cond_sr.png", cond_sr_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)
cond_clust_plot <- cond_clust_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
dsan_theme() +
transparent_bg()
ggsave("images/cond_clust.png", cond_clust_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)| Autocorrelation | \(I = -1\) | ← | \(I = 0\) | → | \(I = 1\) |
|---|---|---|---|---|---|
| Description | Negative Autocorr | No Autocorr | Positive Autocorr | ||
| Event at \(\mathbf{s} = (x,y)\) Implies | Less likely to find another point nearby | No information about nearby points | More likely to find another point nearby | ||
| Resulting Pattern | Regularity | Reg/Clustered Mix | Clustering | ||
| Process(es) Which Could Produce Pattern | 1st Order: Random within even-spaced grid 2nd Order: Competition |
1st Order: i.i.d. points 2nd Order: i.i.d. distances |
1st Order: Tasty food at clust centers 2nd Order: Cooperation |
||
| Fixed \(N\) | 60 | 60 | 60 | ||
![]() |
![]() |
![]() |
library(tidyverse)
library(spatstat)
set.seed(6807)
lambda <- 60
r_core <- 0.05
obs_window <- square(1)
# Regularity via Inhibition
# Regularity via Inhibition
reg_sims <- rMaternI(lambda, r=r_core, win=obs_window)
# CSR data
csr_sims <- rpoispp(N, win=obs_window)
### Clustered data
clust_mu <- 10
clust_sims <- rMatClust(kappa=lambda / clust_mu, scale=2*r_core, mu=10, win=obs_window)
# And PLOT
plot_w <- 400
plot_h <- 400
plot_scale <- 2.25
reg_plot <- reg_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
labs(title=paste0("N = ",reg_sims$n)) +
dsan_theme() +
transparent_bg()
ggsave("images/reg.png", reg_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)
csr_plot <- csr_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
labs(title=paste0("N = ",csr_sims$n)) +
dsan_theme() +
transparent_bg()
ggsave("images/csr.png", csr_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)
clust_plot <- clust_sims |> sf::st_as_sf() |>
ggplot() +
geom_sf() +
labs(title=paste0("N = ",clust_sims$n)) +
dsan_theme() +
transparent_bg()
ggsave("images/clust.png", clust_plot, width=plot_w, height=plot_h, units="px", scale=plot_scale)| Autocorrelation | \(I = -1\) | ← | \(I = 0\) | → | \(I = 1\) |
|---|---|---|---|---|---|
| Description | Negative Autocorr | No Autocorr | Positive Autocorr | ||
| Event at \(\mathbf{s} = (x,y)\) Implies | Less likely to find another point nearby | No information about nearby points | More likely to find another point nearby | ||
| Resulting Pattern | Regularity | Reg/Clustered Mix | Clustering | ||
| Process(es) Which Could Produce Pattern | 1st Order: Random within even-spaced grid 2nd Order: Competition |
1st Order: i.i.d. points 2nd Order: i.i.d. distances |
1st Order: Tasty food at clust centers 2nd Order: Cooperation |
||
| Fixed Intensity \(\lambda\) | 60 | 60 | 60 | ||
| Random \(N\) | ![]() |
![]() |
![]() |
Geometers solved w/geometry (300 BC)…

…Algebraists solved w/algebra (2000 BC)…
\[ \begin{align*} &ax^2 + bx + c = 0 \\ \Rightarrow \; & x_+ = \frac{-b + \sqrt{b^2 - 4ac}}{2a} \end{align*} \]
…From 1637 onwards, whichever is easier! 🤯🤯🤯 (Isomorphism)

POLYGONPOLYGONs may make sense for demographers, but how about someone studying air pollution in DC? (Smog, for example, does not confine itself to census tracts!)dc_union_sf <- sf::st_union(dc_sf)
dc_union_sf |>
ggplot() +
geom_sf() +
theme_classic()
terra)library(terra)terra 1.7.78
Attaching package: 'terra'
The following object is masked from 'package:tidyr':
extract
dc_SpatVector <- terra::vect(dc_union_sf)
rast_template <- rast(ext(dc_SpatVector), resolution = 1000, crs = crs(dc_SpatVector))
dc_SpatRaster <- terra::rasterize(dc_SpatVector, rast_template)
dim(dc_SpatRaster)[1] 29 23 1
plot(dc_SpatRaster)
Welcome to Gridtown!
set.seed(6805)
library(terra)
gridtown <- terra::rast(
nrows = 4, ncols = 4,
xmin = 0, xmax = 4, ymin = 0, ymax = 4,
vals = sample(1:16)
)
plot(gridtown)
text(
gridtown,
labels=1:16,
halo=TRUE, hc="black", col="white", hw=0.2
)
plot(gridtown)
text(gridtown, halo=TRUE, hc="black", col="white", hw=0.2)