Questions tagged [tidycensus]

84 questions
0
votes
1 answer

Why won't my alteryx R and Rstudio pull from the same package library?

I am getting an error telling me I don't have packages when trying to use tidycensus in R/Alteryx. This works fine in Rstudio? Does anyone know how to change alteryx directory to match rstudio for calling…
MJ_215
  • 13
  • 2
0
votes
0 answers

Split dataframe column into 2 based on row content in R

I'm using tidy census and I have 2 variables for each census tract which makes my data frame look like this: GEOID tract variable estimate 24005400100 Tract 4001 white_pop 3436 24005400100 Tract 4001 black_pop 98 but I want my…
Kylee
  • 41
  • 5
0
votes
2 answers

How do I accurately aggregate subgroup margin of error values using tidycensus and tidyverse?

I am trying to calculate the population under 20 by race for each county in MN using the American Community Survey in R. Using Tidycensus I am aware this can be done using the B01001H variables for each race and age group in R. However I would need…
0
votes
1 answer

Why can't I download tidycensus?

When I try download the package tidycensus I get the following error: > install.packages("tidycensus") Installing package into ‘C:/Users/krosi/OneDrive/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) also installing the dependencies…
dkro23
  • 17
  • 4
0
votes
0 answers

How to solve error when loading tidycensus library

I have a Mac with MacOS Big Sur 11.2.3. I try to use the tidycensus library: library(tidycensus) But I get the following error: Error: package or namespace load failed for ‘tidycensus’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load…
bill999
  • 2,147
  • 8
  • 51
  • 103
0
votes
2 answers

Troubleshooting why ggplot() isn't plotting datase

I have been working with some tidycensus data for an assignment and have gotten to the point where trying to generate a smooth line graph isn't plotting my dataset. My current code is: PA_county_list %>% filter(county %in% c("Chester…
0
votes
0 answers

Creating a large national dataset using Tidycensus over multiple years

I'm using tidycensus to pull dissertation data for three different years (decennial 2000, ACS 2009-2013, ACS 2015-2019) for all census tracts in the country. Based on kyle walker's tutorial I've been able to use the map_df function to create the…
kaseyzapatka
  • 149
  • 2
  • 9
0
votes
0 answers

Error downloading tidycensus library in R

I am trying to use the census_api_key() function in tidycensus, but keep getting an error that it can't be found, nor does it seem like the tidycensus library is being installed properly according to the error messages I am receiving. Here is what…
ddd
  • 1
0
votes
1 answer

Reconfiguring Census Dataset in R

I'm new to both this forum and R. I'm working on a ecological study and using census data to develop a dataset in Washington State divided by zip code with the following variables: "total_pop", "median age", "median age men", "median age women",…
0
votes
1 answer

How do I fix: Error in response$result$geographies$`2010 Census Blocks`[[1]] : subscript out of bounds for latitude/longitude data

Update: so in my dataset, one of the coordinate sets is (49.277298, -123.067902), and is not only the only one out of bounds, but also the only one wreaking havoc for the analysis. Hope this addition helps! I'm working on finding census codes for a…
0
votes
0 answers

Tidycensus Error in UseMethod("select_") : no applicable method for 'select_' applied to an object of class "character"

I'm trying to load census data but every time I use the get_decennial my code throws an error. library(ggplot2) library(tidyverse) library(tidycensus) vars <- c(tot_hh = "H001001", tot_rural_hh = "H002005", tot_rent_hh =…
TRM
  • 1
0
votes
1 answer

Calculating the area of census tracts from multipolygons in R

I am trying to calculate the area of each census tract in the United States. I used tidycensus to extract a multipolygon for each census tract with its coordinates. library(tidycensus) library(purrr) census_api_key("KEY") us <-…
bbernicker
  • 158
  • 1
  • 14
0
votes
0 answers

How do I pull geometries from tidycensus?

I am trying to pull geometries from tidycensus but keep running into errors. I enter the following code: ### Load packages library(tidycensus) library(dplyr) library(tidyverse) ### Install api key census_api_key("") ### Pull…
dkro
  • 193
  • 1
  • 8
0
votes
1 answer

How do I add more data for each census tracts in the map?

I was able to prepare census tracts map of a county (showing all census tracts) using tidycensus and tigris. I have some data in a separate dataframe called demography which contains 4 columns county,tract, x.foreclosure_filing, and…
Posh
  • 1
  • 4
0
votes
1 answer

Collapsing Named Rows and Moving Variables to Columns in R

I'm using R to pull census data through 'tidycensus', but it pulls different variables for the same geography into rows, rather than using a single row geography and multiple variable columns. I've tried various transpose, gather and spread…
P_Ciurc01
  • 3
  • 2