Skip to content

Commit d7a1871

Browse files
committed
fix the description again
1 parent 244bf39 commit d7a1871

File tree

3 files changed

+1005
-1002
lines changed

3 files changed

+1005
-1002
lines changed

index.html

Lines changed: 962 additions & 959 deletions
Large diffs are not rendered by default.

index.qmd

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: TAZ & Regional Median Income
33
subtitle: Calculating Median Income for Transportation Analysis Zones (TAZ)
4-
description: This notebook replicates the '_Source - TAZ & Regional Median Income - 2022-03-17.xlsb' tab from the 2019-2023 American Community Survey. It calculates the median income for each Traffic Analysis Zone (TAZ) based on household income data and household data.
4+
description: This notebook replicates the analysis from the '_Source - TAZ & Regional Median Income - 2022-03-17.xlsb' using the updated household and household income data from the 2019-2023 American Community Survey.
55
author:
66
- name: Pukar Bhandari
77
@@ -130,7 +130,7 @@ df_CPI = pd.read_excel(
130130
df_CPI
131131
```
132132

133-
### ACS_5YR_County
133+
### ACS_5YR_HouseholdIncome
134134

135135
#### Set Census Variables
136136

@@ -425,47 +425,6 @@ plt.show()
425425

426426
### BlockSplit_wCOTAZID
427427

428-
```{python}
429-
430-
```
431-
432-
433-
## Lookup Tables
434-
435-
### ACS Column ID to Label
436-
437-
```{python}
438-
lookup_hhinc = pd.DataFrame({
439-
"Income Category": [
440-
"HH_LT_10K", "HH_10_15K", "HH_15_20K", "HH_20_25K", "HH_25_30K", "HH_30_35K",
441-
"HH_35_40K", "HH_40_45K", "HH_45_50K", "HH_50_60K", "HH_60_75K",
442-
"HH_75_100K", "HH_100_125K", "HH_125_150K", "HH_150_200K", "HH_GT_200K"
443-
],
444-
"Lower Limit": [
445-
0, 10000, 15000, 20000, 25000, 30000,
446-
35000, 40000, 45000, 50000, 60000,
447-
75000, 100000, 125000, 150000, 200000
448-
],
449-
"Upper Limit": [
450-
9999, 14999, 19999, 24999, 29999, 34999,
451-
39999, 44999, 49999, 59999, 74999,
452-
99999, 124999, 149999, 199999, np.inf
453-
]
454-
})
455-
456-
# Compute midpoint and round it
457-
lookup_hhinc['Midpoint'] = (
458-
(lookup_hhinc['Lower Limit'] + lookup_hhinc['Upper Limit']) / 2
459-
).round()
460-
461-
# Replace infinite midpoint (last category) with 300000
462-
lookup_hhinc.loc[np.isinf(lookup_hhinc["Upper Limit"]), "Midpoint"] = 300000
463-
464-
lookup_hhinc
465-
```
466-
467-
### BlockGroupID for TAZ Centroid (Use if No HH in TAZ)
468-
469428
```{python}
470429
# Define a function for population weighted interpolation
471430
def interpolate_pw(from_gdf, to_gdf, weights_gdf, to_id=None, extensive=True,
@@ -656,6 +615,47 @@ def interpolate_pw(from_gdf, to_gdf, weights_gdf, to_id=None, extensive=True,
656615
return result
657616
```
658617

618+
619+
## Lookup Tables
620+
621+
### ACS Column ID to Label
622+
623+
```{python}
624+
lookup_hhinc = pd.DataFrame({
625+
"Income Category": [
626+
"HH_LT_10K", "HH_10_15K", "HH_15_20K", "HH_20_25K", "HH_25_30K", "HH_30_35K",
627+
"HH_35_40K", "HH_40_45K", "HH_45_50K", "HH_50_60K", "HH_60_75K",
628+
"HH_75_100K", "HH_100_125K", "HH_125_150K", "HH_150_200K", "HH_GT_200K"
629+
],
630+
"Lower Limit": [
631+
0, 10000, 15000, 20000, 25000, 30000,
632+
35000, 40000, 45000, 50000, 60000,
633+
75000, 100000, 125000, 150000, 200000
634+
],
635+
"Upper Limit": [
636+
9999, 14999, 19999, 24999, 29999, 34999,
637+
39999, 44999, 49999, 59999, 74999,
638+
99999, 124999, 149999, 199999, np.inf
639+
]
640+
})
641+
642+
# Compute midpoint and round it
643+
lookup_hhinc['Midpoint'] = (
644+
(lookup_hhinc['Lower Limit'] + lookup_hhinc['Upper Limit']) / 2
645+
).round()
646+
647+
# Replace infinite midpoint (last category) with 300000
648+
lookup_hhinc.loc[np.isinf(lookup_hhinc["Upper Limit"]), "Midpoint"] = 300000
649+
650+
lookup_hhinc
651+
```
652+
653+
### BlockGroupID for TAZ Centroid (Use if No HH in TAZ)
654+
655+
```{python}
656+
657+
```
658+
659659
## Processing
660660

661661

1.56 KB
Loading

0 commit comments

Comments
 (0)