Once again valuable work you are doing.

 

I’ve been playing around with using AI (ChatGPT, Bard) to create Python code.  The AI helped structure the code.  Iwas wondering if you’ve given AI a shot for ‘R’?

 

559/224-7388: Landline (not answered unless I know the number)

559/355-1678: cell

Due to the current health emergency, Caltrans' Planning & Local Assistance staff are working remotely whenever possible. While there may be some delay in our response times, we continue to be available via email and remain committed to customer service.

 

From: Charles Purvis <clpurvis@att.net>
Sent: Thursday, May 18, 2023 12:06 PM
To: The Census Transportation Products Program Community of Practice/Users discussion and news list <ctpp@listserv.transportation.org>
Subject: [CTPP News] Comparison maps for San Francisco City: Population Density (PL94171) and Job Density(LEHD)

 

EXTERNAL EMAIL. Links/attachments may not be safe.

Attached are two maps created using the R package ggplot2. The data is from Census 2020, PL 94-171 for population density (persons per square mile) and the Census Bureau’s LEHD/LODES estimates for 2020 (total jobs per square mile).

My six “density categories” are defined as follows:

dplyr::mutate(density_grp = case_when(
                             jobs_per_sqmi < 500 ~    "1.rural",
                             jobs_per_sqmi < 1000 ~   "2.rural-suburb",
                             jobs_per_sqmi < 6000 ~   "3.suburb-disperse",
                             jobs_per_sqmi < 10000 ~  "4.suburb-dense",
                             jobs_per_sqmi < 20000 ~  "5.urban",
                             jobs_per_sqmi >= 20000 ~ "6.urban core",
                             TRUE ~ "0.missing data”))

“Mutate” sounds horrible, but it’s just the “dplyr” verb for “create a new variable”. (“dplyr” is a very handy-dandy R package).

Certain block groups in the City of San Francisco have “rural” population density. These are our parks: Golden Gate Park, Lincoln Park, McLaren Park. The Presidio might be categorized as a “dispersed suburb”. Most block groups in San Francisco are “urban core” (greater than 20,000 persons per square mile).

Some block groups in downtown San Francisco are not that heavily populated, such as the Financial District and Union Square areas. (Of course, vast overwhelming anecdotal evidence suggests that downtown San Francisco is a ghost town due to the pandemic. Ain’t necessarily true, of course.)

But the San Francisco financial district could not be considered a “suburb” by any stretch of the imagination. This is why we should also review data on jobs per square mile (job density) as a counter measure to simple population density.

My resulting hybrid measure would use the maximum value of population density (total population per square mile) and job density (jobs per square mile) in determining if a neighborhood is rural, suburban, or urban. I would use the same density ranges as shown above.

I could use a compound density measure (e.g., (population + jobs) / land area), but I’m satisfied with using the maximum of population OR jobs to typify a neighborhood.

(Our San Francisco financial district block group - tract 117.00, block group #3 - bounded by Bush-Kearny-Sacramento-Drumm-Market, is 0.07984 square miles, with a population of 442 and a job base of 49,634 employees, for a population density of 5,535 persons per square mile and a job density of 621,613 jobs per square mile. Yes, over 600,000 jobs per square mile!!)

Hope this is of interest.

Chuck Purvis,
Hayward, California

_______________________________________________
CTPP mailing list -- ctpp@listserv.transportation.org
To unsubscribe send an email to ctpp-leave@listserv.transportation.org