Package 'blockpop'

Title: Estimate Census Block Populations for 2020
Description: Uses FCC block-level population estimates from 2010--2019, which are based on new roads and map data, along with decennial Census and ACS data, to estimate 2020 block populations.
Authors: Cory McCartan [aut, cre]
Maintainer: Cory McCartan <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9000
Built: 2024-10-17 04:30:14 UTC
Source: https://github.com/CoryMcCartan/blockpop

Help Index


Download 2010 Census variables at the block level

Description

Downloads population and voting-age population by race at the block level for the 2010 decennial Census. API key required: https://api.census.gov/data/key_signup.html.

Usage

bl_download_2010_vars(state)

Arguments

state

the two-letter abbreviation of the state to get data for.

Value

A data frame with the population counts

Examples

## Not run: 
# API key required
bl_download_2010_vars("WA")

## End(Not run)

Download 2019 5-year ACS variables at the block group level

Description

Downloads population and voting-age population by race at the block group level for the 2019 5-year American Communities Survey. API key required: https://api.census.gov/data/key_signup.html.

Usage

bl_download_acs_vars(state)

Arguments

state

the two-letter abbreviation of the state to get data for.

Value

A data frame with the population counts

Examples

## Not run: 
# API key required
bl_download_acs_vars("WA")

## End(Not run)

Download and extract all population estimates to a file

Description

[Experimental]

Usage

bl_download_fcc(path, url = "https://www.fcc.gov/file/19314/download")

Arguments

path

the path to extract the CSV (~1.3 gigabytes) to.

url

the URL to the FCC data https://www.fcc.gov/staff-block-estimates

Value

The path, invisibly.

Examples

## Not run: 
bl_download_fcc("data-raw/fcc.csv")

## End(Not run)

Estimate 2020 population from 2010-2019 populations

Description

[Experimental] Uses the average growth rate over the specified window to impute the 2020 population. Final estimates are rescaled to match the Census April 1, 2020 apportioment populations at the state level.

Usage

bl_est_2020(data, forecast_start = 2010)

Arguments

data

the output of bl_load_state()

forecast_start

the year to use as the base year. E.g. if 2013, then the average growth rate from 2013–2019 will be used.

Value

A modified data frame with just 2010, base year, and 2020 estimates.

Examples

## Not run: 
d = bl_load_state("WA")
bl_est_2020(d, 2010)

## End(Not run)

Harmonize 2010 Decennial Census, 2019 ACS, and 2020 Block Population Estimates

Description

Creates estimates for race/ethnicity variables for blocks in 2020, based on the 2010 Census (bl_download_2010_vars()) and 2019 ACS (bl_download_acs_vars()) data.

Usage

bl_harmonize_vars(block_d, census_d, acs_d)

Arguments

block_d

the output of bl_est_2020()

census_d

the output of bl_download_2010_vars() or similar

acs_d

the output of bl_download_acs_vars() or similar

Details

The racial breakdown of total and voting-age population are proportionally adjusted within block groups to match the ACS block-group percentages. Then these percentages are applied to the newly estimated block populations. Finally, the block race populations are rescaled so that the block populations match the 2020 estimates. This is essentially a 1-round iterative proportional fitting (IPF) procedure.

Value

A data frame of 2020 block-level estimates for the variables in census_d.


Download and extract population estimates for a state

Description

[Experimental]

Usage

bl_load_state(state, path = "https://www.fcc.gov/file/19314/download")

Arguments

state

the two-letter abbreviation of the state to get data for.

path

the path to the FCC data. Defaults to the online ZIP file, but can point to a local zip file or an extracted CSV (from e.g. bl_download_fcc()).

Value

A data frame with the population estimates.

Examples

## Not run: 
bl_load_state("WA")

## End(Not run)