14  Concentration and Agglomeration

Code
import os

import contextily as ctx
import geopandas as gpd
import matplotlib.pyplot as plt
import pandarm as pdna
import pandas as pd
import tempfile
import urllib.request

from geosnap import DataStore
from geosnap.io import get_census, get_lodes, get_network_from_gdf
from libpysal.graph import Graph
from mapclassify import classify
from pointpats import weighted_mean_center
from shapely.geometry import Point
from tqdm.auto import tqdm
from urllib.error import URLError

datasets = DataStore()

%load_ext jupyter_black
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.

How big (in land area) is the population center of each region?

One way to understand population concentration and urban growth is to measure the share of land required to capture 10% (or some other proportion) of the metropolitan region’s population. That task is less straightforward than it sounds because we have to first know where the city center is, then devise a method for understanding how much land is required to meet some given population threshold.

In this case, we will assume the location of the metropolitan region is exogenous and represented by (the geometric center of) the largest principal city in each metropolitan region. To get a sense where that is, we first need data from the Census Bureau’s set of “census designated places” files, which include both incorporated cities and city equivalents. We can read these directly from the Census FTP site. As with most Census data, the places as they are known are stored individually by state. Places (cities, from here onward) often have awkward shapes, and there are a lot of them. Here is what they look like in Maryland

Code
zfilename = "tl_2019_24_place.zip"
# download the zip file onto the local disk
urllib.request.urlretrieve(
    f"ftp://ftp2.census.gov/geo/tiger/TIGER2019/PLACE/{zfilename}"
)
df = gpd.read_file(f"./{zfilename}")
df.explore()
Make this Notebook Trusted to load map: File -> Trust Notebook