Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #5

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ca1724
Updates CHAS data to 2017
ndubois-urban Mar 9, 2021
ae60b4e
Updated 5 year ACS data
abwilliams13 Mar 10, 2021
f144387
Updated overcrowing vars
abwilliams13 Mar 10, 2021
822794a
Update unemployment vars
abwilliams13 Mar 10, 2021
dc5d0fe
update % renters vars
abwilliams13 Mar 10, 2021
9125fc4
updated poverity indicator var
abwilliams13 Mar 10, 2021
1f847cb
update health insurance vars
abwilliams13 Mar 10, 2021
a6ca826
update race vars
abwilliams13 Mar 10, 2021
3c55c43
update public assistance vars
abwilliams13 Mar 10, 2021
3d2b40c
update foreign born vars
abwilliams13 Mar 10, 2021
7a28daf
Updated geographies script
abwilliams13 Mar 10, 2021
0d936a9
Merge pull request #3 from UrbanInstitute/update_acs_jobloss_Abby
abwilliams13 Mar 10, 2021
97fba94
Merge pull request #4 from UrbanInstitute/update_chas_Nicole
ndubois-urban Mar 10, 2021
249c266
Update Geographies script
abwilliams13 Mar 10, 2021
bf1cc79
updated histogram and correlations matrix
abwilliams13 Mar 10, 2021
750d92b
Fix cb & timeout errors, add checks, req tracts_19
ajjitn Mar 19, 2021
17588e4
Ensure overwriting of st_write
ajjitn Mar 23, 2021
1d3813e
Update readme, add env vars, cleanup
ajjitn Mar 24, 2021
21b5be4
Set public-read ACL access for data catalog links
ajjitn Mar 25, 2021
494ae6d
Fix typos, review for release
ajjitn Apr 4, 2021
7f66b98
Italicize changes
ajjitn Apr 4, 2021
0f360ee
Add spaces for readability
ajjitn Apr 4, 2021
6e33586
Add weights image
ajjitn Apr 5, 2021
bb85fda
Run with latest data
ajjitn May 14, 2021
1438387
Rename data dictionary CSV, update S3 upload script
ajjitn May 14, 2021
d900df1
Make all feature files publicly available
ajjitn May 14, 2021
14480c5
Specify March Job Loss numbers with S3 version ID
ajjitn May 14, 2021
72a9fe2
Run with specific April numbers
ajjitn May 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
13 changes: 2 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
# History files
.Rhistory
.Rapp.history

# Session Data files
.RData

# User-specific files
.Ruserdata

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md
Expand All @@ -39,7 +29,8 @@ data/raw-data/hud_files.zip
data/raw-data/coc_geographies.zip
data/raw-data/coc-geographies/FY*
data/intermediate-data/*.geojson

# Ignore code review docs
docs/*

*.env
.DS_Store
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# covid-rental-risk-index

*Updated Apr 4, 2021 with newer data*

This repo contains the data, and code neccesary to generate the tract level
Rental Assistance Priority Indexes which power [this](https://www.urban.org/features/where-prioritize-emergency-rental-assistance-keep-renters-their-homes) interactive Urban
Expand All @@ -12,32 +12,32 @@ are composed of a few indicators. The indicators and the data sources they are
pulled from are listed below.

## Housing Instability Risk Subindex
- Share of people living in poverty: percentage of the population living below the federal poverty level during the past 12 months (2014–18 ACS data, table C17002)
- Share of people living in poverty: percentage of the population living below the federal poverty level during the past 12 months (~~2014–18~~ 2015-19 ACS data, table C17002)

- Share of renter-occupied housing units: percentage of occupied housing units that are renter-occupied (2014–18 ACS data, table B25003)
- Share of renter-occupied housing units: percentage of occupied housing units that are renter-occupied (~~2014–18~~ 2015-19 ACS data, table B25003)

- Share of severely cost-burdened low-income renters: percentage of households whose annual incomes are less than $35,000 and pay 50 percent or more of their incomes in gross rent (2014–18 ACS data, table B25074)
- Share of severely cost-burdened low-income renters: percentage of households whose annual incomes are less than $35,000 and pay 50 percent or more of their incomes in gross rent (~~2014–18~~ 2015-19 ACS data, table B25074)

- Share of severely overcrowded households: percentage of renter-occupied households with more than 1.5 occupants per room (2014–18 ACS data, table B25014)
- Share of severely overcrowded households: percentage of renter-occupied households with more than 1.5 occupants per room (~~2014–18~~ 2015-19 ACS data, table B25014)

- Share of unemployed people: percentage of the labor force that is unemployed (2014–18 ACS data, table B12006)
- Share of unemployed people: percentage of the labor force that is unemployed (~~2014–18~~ 2015-19 ACS data, table B12006)

## COVID-19 Impact Subindex

- Share of adults without health insurance: percentage of noninstitutionalized people ages 19 to 64 who do not have health insurance (2014–18 ACS data, table C27012)
- Share of adults without health insurance: percentage of noninstitutionalized people ages 19 to 64 who do not have health insurance (~~2014–18~~ 2015-19 ACS data, table C27012)

- Share of low-income jobs lost to COVID-19: Among residents with jobs that pay $40,000 or less, the estimated percentage who have lost their jobs since Feb 2020. (July 2020 update to Urban’s “Where Low-Income Jobs Are Being Lost to COVID-19”)
- Share of low-income jobs lost to COVID-19: Among residents with jobs that pay $40,000 or less, the estimated percentage who have lost their jobs since Feb 2020. (~~July 2020~~ March 2021 update to Urban’s “Where Low-Income Jobs Are Being Lost to COVID-19”)


## Equity Subindex

- Share of people of color: percentage of people designated in the dataset as a race or ethnicity other than white, non-Hispanic (2014–18 ACS data, table B03002)
- Share of people of color: percentage of people designated in the dataset as a race or ethnicity other than white, non-Hispanic (~~2014–18~~ 2015-19 ACS data, table B03002)

- Share of extremely low–income renter households: percentage of renter-occupied households that earn 30 percent of area median income or less (2012–16 CHAS tabulations, table 8)
- Share of extremely low–income renter households: percentage of renter-occupied households that earn 30 percent of area median income or less (~~2012–16~~ 2013-17 CHAS tabulations, table 8)

- Share of households receiving public assistance: Percentage of households whose income in the past 12 months has included assistance from public benefit programs such as Temporary Assistance for Needy Families (TANF) or Supplemental Nutrition Assistance Program (SNAP) (2014–18 ACS data, table B19057)
- Share of households receiving public assistance: Percentage of households whose income in the past 12 months has included assistance from public benefit programs such as Temporary Assistance for Needy Families (TANF) or Supplemental Nutrition Assistance Program (SNAP) (~~2014–18~~ 2015-19 ACS data, table B19057)

- Share of people born outside the United States: percentage of the population born outside the United States (2014–18 ACS data, table B05002)
- Share of people born outside the United States: percentage of the population born outside the United States (~~2014–18~~ 2015-19 ACS data, table B05002)



Expand All @@ -47,6 +47,7 @@ After each of the indicators are converted to percentages, we take the state ind

![Image of Weights](/images/indicator_table.png)


For more information on our methodology, please see our [technical appendix (PDF)](https://www.urban.org/sites/default/files/2020/08/24/where_to_prioritize_emergency_rental_assistance_to_keep_renters_in_their_homes_technical_appendix.pdf).

## Scripts
Expand All @@ -59,9 +60,9 @@ Below is a short description of the files in the `scripts\` folder:
indicators to percentages using the relevant numerator/demoninator, then
calculates the state indexed z-scores, and weighted subindex and Total index
values. Note sometimes the Census FTP site may be down and this script will
error out with an error that looks something like `Error in
curl::curl_fetch_memory(url, handle = handle) : Could not resolve host:
api.census.gov`. If this happens, we suggest waiting a few minutes and trying
error out with a message that looks something like:
```Error in curl::curl_fetch_memory(url, handle = handle) : Could not resolve host: api.census.gov```
If this happens, we suggest waiting a few minutes and trying
again.

- `02_generate_geographies.R`: This generates geojsons of counties, states, and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
Variable Name,Defintion
GEOID,Census tract GEOID
state_name,Full state name
county_name,Human readable county name
state_fips,2 digit FIPS code for the state
county_fips,4 digit FIPS code for the county
perc_cost_burdened_under_35k,"Percentage of households whose annual incomes are less than $35,000 and pay 50 percent or more of their incomes in gross rent (2014-18 ACS data, table B25074)"
perc_overcrowding_renter_1.50_or_more,"Percentage of renter-occupied households with more than 1.5 occupants per room (2014-18 ACS data, table B25014)"
perc_unemployed_laborforce,"Percentage of unemployed people (2014-2018 ACS data, table B12006)"
perc_renters,"Percentage of occupied housing units that are renter-occupied (2014-18 ACS data, table B25003)"
perc_poverty_12mnth,"Percentage of people living in poverty (2014-18 ACS data, table C17002)"
perc_no_hinsure,"Percentage of noninstitutionalized people ages 19 to 64 who do not have health insurance (2014-2018 ACS data, table C27012)"
perc_person_of_color,"Percentage of people designated in the dataset as a race or ethnicity other than white non-Hispanic (2014-18 ACS data, table B03002)"
perc_public_assistance,"Percentage of households whose income in the past 12 months included assistance from public benefit programs (2014-18 ACS data, table B19057)"
perc_foreign_born,"Percentage of the population born outside the United States (2014-18 ACS data, table B05002)"
perc_30hamfi,"Percentage of renter-occupied households that earn 30 percent of area median income or less (2012-16 CHAS tabulations, table 8)"
perc_low_income_jobs_lost,"Percentage of people who have lost their jobs since February 2020 among residents with jobs that pay $40,000 or less (July 2020 update to Urban's ""Where Low-Income Jobs are Being Lost to COVID-19"")"
housing_index,"Housing Instability Risk index value generated from perc_cost_burdened_under_35k, perc_overcrowding_renter_1.50_or_more, perc_unemployed_laborforce, perc_renters, perc_poverty_12mnth"
covid_index,COVID-19 Impact index value generated from perc_no_hinsure and perc_low_income_jobs_lost
equity_index,"Equity index value generated from perc_person_of_color, perc_public_assistance, perc_foreign_born, perc_30hamfi"
total_index,"Total index value, generated from weighted subindex values"
housing_index_quantile,The quantile within the state for the housing index
covid_index_quantile,The quantile within the state for the covid index
equity_index_quantile,The quantile within the state for the equity index
total_index_quantile,The quantile within the state for the total index
z_score_perc_cost_burdened_under_35k,The state adjusted z score for the z_score_perc_cost_burdened_under_35k indicator
z_score_perc_overcrowding_renter_1.50_or_more,The state adjusted z score for the z_score_perc_overcrowding_renter_1.50_or_more indicator
z_score_perc_unemployed_laborforce,The state adjusted z score for the z_score_perc_unemployed_laborforce indicator
z_score_perc_renters,The state adjusted z score for the z_score_perc_renters indicator
z_score_perc_poverty_12mnth,The state adjusted z score for the z_score_perc_poverty_12mnth indicator
z_score_perc_no_hinsure,The state adjusted z score for the z_score_perc_no_hinsure indicator
z_score_perc_person_of_color,The state adjusted z score for the z_score_perc_person_of_color indicator
z_score_perc_public_assistance,The state adjusted z score for the z_score_perc_public_assistance indicator
z_score_perc_foreign_born,The state adjusted z score for the z_score_perc_foreign_born indicator
z_score_perc_30hamfi,The state adjusted z score for the z_score_perc_30hamfi indicator
z_score_perc_low_income_jobs_lost,The state adjusted z score for the z_score_perc_low_income_jobs_lost indicator
z_score_perc_cost_burdened_under_35k_quantile,The state adjusted z score for the z_score_perc_cost_burdened_under_35k_quantile indicator
z_score_perc_overcrowding_renter_1.50_or_more_quantile,The state adjusted z score for the z_score_perc_overcrowding_renter_1.50_or_more_quantile indicator
z_score_perc_unemployed_laborforce_quantile,The state adjusted z score for the z_score_perc_unemployed_laborforce_quantile indicator
z_score_perc_renters_quantile,The state adjusted z score for the z_score_perc_renters_quantile indicator
z_score_perc_poverty_12mnth_quantile,The state adjusted z score for the z_score_perc_poverty_12mnth_quantile indicator
z_score_perc_no_hinsure_quantile,The state adjusted z score for the z_score_perc_no_hinsure_quantile indicator
z_score_perc_person_of_color_quantile,The state adjusted z score for the z_score_perc_person_of_color_quantile indicator
z_score_perc_public_assistance_quantile,The state adjusted z score for the z_score_perc_public_assistance_quantile indicator
z_score_perc_foreign_born_quantile,The state adjusted z score for the z_score_perc_foreign_born_quantile indicator
z_score_perc_30hamfi_quantile,The state adjusted z score for the z_score_perc_30hamfi_quantile indicator
z_score_perc_low_income_jobs_lost_quantile,The state adjusted z score for the z_score_perc_low_income_jobs_lost_quantile indicator
num_ELI,"Number of extremely low income renters in the census tract (2012-16 CHAS tabulations, table 8)"
grayed_out,"0 or 1 flag for if a tract is grayed out in the feature: If num_ELI = 0, grayed_out = 1; if num_ELI > 0, grayed_out = 0"
Variable Name,Defintion
GEOID,Census tract GEOID
state_name,Full state name
county_name,Human readable county name
state_fips,2 digit FIPS code for the state
county_fips,5 digit FIPS code for the county
perc_cost_burdened_under_35k,"Percentage of households whose annual incomes are less than $35,000 and pay 50 percent or more of their incomes in gross rent (2015-19 ACS data, table B25074)"
perc_overcrowding_renter_1.50_or_more,"Percentage of renter-occupied households with more than 1.5 occupants per room (2015-19 ACS data, table B25014)"
perc_unemployed_laborforce,"Percentage of unemployed people (2015-2019 ACS data, table B12006)"
perc_renters,"Percentage of occupied housing units that are renter-occupied (2015-19 ACS data, table B25003)"
perc_poverty_12mnth,"Percentage of people living in poverty (2015-19 ACS data, table C17002)"
perc_no_hinsure,"Percentage of noninstitutionalized people ages 19 to 64 who do not have health insurance (2015-2019 ACS data, table C27012)"
perc_person_of_color,"Percentage of people designated in the dataset as a race or ethnicity other than white non-Hispanic (2015-19 ACS data, table B03002)"
perc_public_assistance,"Percentage of households whose income in the past 12 months included assistance from public benefit programs (2015-19 ACS data, table B19057)"
perc_foreign_born,"Percentage of the population born outside the United States (2015-19 ACS data, table B05002)"
perc_30hamfi,"Percentage of renter-occupied households that earn 30 percent of area median income or less (2013-17 CHAS tabulations, table 8)"
perc_low_income_jobs_lost,"Percentage of people who have lost their jobs since February 2020 among residents with jobs that pay $40,000 or less (March 2021 update to Urban's ""Where Low-Income Jobs are Being Lost to COVID-19"")"
housing_index,"Housing Instability Risk index value generated from perc_cost_burdened_under_35k, perc_overcrowding_renter_1.50_or_more, perc_unemployed_laborforce, perc_renters, perc_poverty_12mnth"
covid_index,COVID-19 Impact index value generated from perc_no_hinsure and perc_low_income_jobs_lost
equity_index,"Equity index value generated from perc_person_of_color, perc_public_assistance, perc_foreign_born, perc_30hamfi"
total_index,"Total index value, generated from weighted subindex values"
housing_index_quantile,The quantile within the state for the housing index
covid_index_quantile,The quantile within the state for the covid index
equity_index_quantile,The quantile within the state for the equity index
total_index_quantile,The quantile within the state for the total index
z_score_perc_cost_burdened_under_35k,The state adjusted z score for the z_score_perc_cost_burdened_under_35k indicator
z_score_perc_overcrowding_renter_1.50_or_more,The state adjusted z score for the z_score_perc_overcrowding_renter_1.50_or_more indicator
z_score_perc_unemployed_laborforce,The state adjusted z score for the z_score_perc_unemployed_laborforce indicator
z_score_perc_renters,The state adjusted z score for the z_score_perc_renters indicator
z_score_perc_poverty_12mnth,The state adjusted z score for the z_score_perc_poverty_12mnth indicator
z_score_perc_no_hinsure,The state adjusted z score for the z_score_perc_no_hinsure indicator
z_score_perc_person_of_color,The state adjusted z score for the z_score_perc_person_of_color indicator
z_score_perc_public_assistance,The state adjusted z score for the z_score_perc_public_assistance indicator
z_score_perc_foreign_born,The state adjusted z score for the z_score_perc_foreign_born indicator
z_score_perc_30hamfi,The state adjusted z score for the z_score_perc_30hamfi indicator
z_score_perc_low_income_jobs_lost,The state adjusted z score for the z_score_perc_low_income_jobs_lost indicator
z_score_perc_cost_burdened_under_35k_quantile,The state adjusted z score for the z_score_perc_cost_burdened_under_35k_quantile indicator
z_score_perc_overcrowding_renter_1.50_or_more_quantile,The state adjusted z score for the z_score_perc_overcrowding_renter_1.50_or_more_quantile indicator
z_score_perc_unemployed_laborforce_quantile,The state adjusted z score for the z_score_perc_unemployed_laborforce_quantile indicator
z_score_perc_renters_quantile,The state adjusted z score for the z_score_perc_renters_quantile indicator
z_score_perc_poverty_12mnth_quantile,The state adjusted z score for the z_score_perc_poverty_12mnth_quantile indicator
z_score_perc_no_hinsure_quantile,The state adjusted z score for the z_score_perc_no_hinsure_quantile indicator
z_score_perc_person_of_color_quantile,The state adjusted z score for the z_score_perc_person_of_color_quantile indicator
z_score_perc_public_assistance_quantile,The state adjusted z score for the z_score_perc_public_assistance_quantile indicator
z_score_perc_foreign_born_quantile,The state adjusted z score for the z_score_perc_foreign_born_quantile indicator
z_score_perc_30hamfi_quantile,The state adjusted z score for the z_score_perc_30hamfi_quantile indicator
z_score_perc_low_income_jobs_lost_quantile,The state adjusted z score for the z_score_perc_low_income_jobs_lost_quantile indicator
num_ELI,"Number of extremely low income renters in the census tract (2013-17 CHAS tabulations, table 8)"
grayed_out,"0 or 1 flag for if a tract is grayed out in the feature: If num_ELI = 0, grayed_out = 1; if num_ELI > 0, grayed_out = 0"
Loading