Questions tagged [tidycensus]

84 questions
1
vote
1 answer

How/where to match tidycensus variables with census bureau variables?

Problem I am given a long list of specific variable codes for the DP05 table - in the census bureau format. For instance: target_dp05_vars = c(perc_white = "HC03_VC53", perc_black = "HC03_VC55", perc_native = "HC03_VC56") Since tidycensus…
Robert Tan
  • 634
  • 1
  • 8
  • 21
1
vote
1 answer

How can I adjust tidycensus API calls with shiny app input and visualize the results?

I want to create a visualization app in Shiny that will make graphs based on data retrieved from the Census API (ACS 1 year). To expand the variable options available to users, I want the API call to be adjusted based on user input. Below I have…
MeaganLP
  • 173
  • 1
  • 5
1
vote
1 answer

NonCensus Package in R

I am trying to utilize the noncensus package in R to join the data("zip_codes") which contains the county level fips code to get the data("counties") that has the actual county name. My data set contains the zip codes for 100's of observations and I…
Drthm1456
  • 409
  • 9
  • 17
0
votes
1 answer

What are Benchmarking Best Practices for US Census Data

I’m working with a dataset that crosses 2020 with data from 2015-2022. What is the best practice for geocoding within a dataset that spans two census' and multiple ACS years. Should I be benchmarking to look at a single year snapshot for each ACS…
mresner
  • 3
  • 3
0
votes
0 answers

Fail to get the exact female percentage from tidycensus

I use tidycensus to collect demographic data but it seems something wrong since I got 0 female percentage for the zipcode 39309, 87040 and 78712. I also have the same problem, getting some zero values for bachelor's degree percentage, age percentage…
0
votes
0 answers

tigris::shift_geometry() "Error: crs not found: is it missing?"

I am trying to pull the USA map with Alaska, Hawaii, and Puerto Rico all in one area. I can pull the counties map fine, but when I use shift_geometry, then I get an error, "Error: crs not found: is it missing?" Below is my…
Isa
  • 1
  • 1
0
votes
0 answers

Get the census data from block group based on specific addresses in R

Hello I have a problem extracting the census data from the block group in R. I have a bunch of specific addresses and I need to get the block group from these addresses and then extract corresponding census data, say the percentage of…
Fox_Summer
  • 149
  • 6
0
votes
1 answer

predicting race from surname and party affiliation

I am trying to use the wru package to predict race based on surname and location for a sample of individuals in the US using their names and addresses. The documentation for the predict_race function can be found here. However, I am encountering an…
C.Robin
  • 1,085
  • 1
  • 10
  • 23
0
votes
0 answers

Error when requesting geometry in get_acs(), tidycensus

get_acs() suddenly giving an error when requesting with geometry = TRUE. See error message below. First time getting this error, even though this code has run with no issues before. Any thoughts? Thanks my_vars <- c( total_pop = "B01003_001", …
Brian Root
  • 13
  • 2
0
votes
0 answers

tidycensus population weighted interpolation: keep year identifier during interpolation

I am pulling a variety of census data for multiple years. I want to interpolate this data using pw_interpolate, but this process drops character variables which are identifying my years (census_data), sort of like this looks like this: census_data…
tchoup
  • 971
  • 4
  • 11
0
votes
1 answer

County Dissimilarity Indices using R package "Segregation"

When I use the following code, the estimate (dissimilarity, D) is the same for all Counties (0.648). I'm wondering if it has to do with lack of geometry information, since I created the County_FIPS variable. Looking for suggestions on how to fix…
0
votes
0 answers

Calculating MOE for derived proportion with tidycensus when MOE is NA

Using ACS 5 year county-level estimates. Seeking to calculate the proportion of the county population over age 65. my_variables <- c(total_pop = "B01003_001", male_65_66 = "B01001_020", male_66_69 = "B01001_021", …
Anthony T
  • 33
  • 3
0
votes
0 answers

Problems combining geom_sf() and geom_point() in same plot: points do not appear

I have a set of points (ptns) identified by latitude and longitude that I wish to plot on a map of the US-county-boundaries. I'm using the tidycensus::county_laea, an "sf" object. Only one point appears on the map and regardless of the coordinates I…
0
votes
1 answer

Unknown variable in ACS/Census API

I am trying to get census data for tenure status in various zip codes using R. I used the syntax that I used for all of my other API calls and copied the variable name exactly from the API key here:…
nagrom11
  • 1
  • 1
0
votes
1 answer

I have an error in Tidycensus: Error: Your API call has errors

I am trying to extract some information on occupation from American Community Survey (ACS). But I am getting an error. How can I fix it? Error - Getting data from the 2016-2020 5-year ACS Loading ACS5 variables for 2020 from table B24010 and caching…
SiH
  • 1,378
  • 4
  • 18