Closed abuabara closed 5 years ago
This looks like an error introduced with the new release of tibble
that is addressed in #130. Try updating to the development version of tidycensus
and this should be fixed:
devtools::install_github("walkerke/tidycensus")
Thanks for the answer. I've tried this, but it still does not work. It must be something else.
Hmm, I can't reproduce your error on my machine. Here is a reprex with the working code as well as my session info. Do you see package versions that differ between our configurations?
library(tidycensus)
get_acs(
geography = "block group",
county = "007",
variables = "B01001_002",
geometry = TRUE,
state = "48",
year = 2016
)
#> Getting data from the 2012-2016 5-year ACS
#> Simple feature collection with 19 features and 5 fields (with 1 geometry empty)
#> geometry type: MULTIPOLYGON
#> dimension: XY
#> bbox: xmin: -97.26082 ymin: 27.83954 xmax: -96.79053 ymax: 28.31923
#> epsg (SRID): 4269
#> proj4string: +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
#> First 10 features:
#> GEOID NAME
#> 1 480079501001 Block Group 1, Census Tract 9501, Aransas County, Texas
#> 2 480079501002 Block Group 2, Census Tract 9501, Aransas County, Texas
#> 3 480079501003 Block Group 3, Census Tract 9501, Aransas County, Texas
#> 4 480079501004 Block Group 4, Census Tract 9501, Aransas County, Texas
#> 5 480079501005 Block Group 5, Census Tract 9501, Aransas County, Texas
#> 6 480079502001 Block Group 1, Census Tract 9502, Aransas County, Texas
#> 7 480079502002 Block Group 2, Census Tract 9502, Aransas County, Texas
#> 8 480079503001 Block Group 1, Census Tract 9503, Aransas County, Texas
#> 9 480079503002 Block Group 2, Census Tract 9503, Aransas County, Texas
#> 10 480079503003 Block Group 3, Census Tract 9503, Aransas County, Texas
#> variable estimate moe geometry
#> 1 B01001_002 613 202 MULTIPOLYGON (((-96.8229 28...
#> 2 B01001_002 926 304 MULTIPOLYGON (((-97.11207 2...
#> 3 B01001_002 763 230 MULTIPOLYGON (((-97.00868 2...
#> 4 B01001_002 97 68 MULTIPOLYGON (((-97.0415 28...
#> 5 B01001_002 179 77 MULTIPOLYGON (((-97.04129 2...
#> 6 B01001_002 202 55 MULTIPOLYGON (((-97.0341 28...
#> 7 B01001_002 417 148 MULTIPOLYGON (((-97.05207 2...
#> 8 B01001_002 1443 328 MULTIPOLYGON (((-97.07184 2...
#> 9 B01001_002 873 302 MULTIPOLYGON (((-97.05889 2...
#> 10 B01001_002 673 231 MULTIPOLYGON (((-97.08877 2...
Created on 2019-01-08 by the reprex package (v0.2.1)
THANK YOU! worked after updating my packages to dev versions (just followed yours). Not sure which one is making the difference ... just the tidycensus was not enough. Thanks again! ;)
library(devtools) devtools::install_github("mdlincoln/clipr") devtools::install_github("tidyverse/dplyr@rc_0.8.0") devtools::install_github("tidyverse/hms") devtools::install_github("r-spatial/sf") devtools::install_github("tidyverse/stringr") devtools::install_github("walkerke/tidycensus")
@mfherman you're the best! I'm putting you down as a package contributor on the next CRAN release for answering so many user questions.
Thanks @walkerke, glad to be of service!
Looks like the key is having compatible tibble
and tidycensus
. I needed to update to tibble
2.0.1 and tidycensus
to 0.9.0 for the error to go away. Update the Description to require 2.0.1 or greater for tibble
?
I take that back. I updated tidycensus
to 0.9 in a Docker container without touching anything else, and it seems to be working. tibble
is at 1.4.2. So something else different between these two machines is causing the error. Ugh.
@josiekre if you are able to isolate which package/version is causing the error, let us know and we can take a look.
Thanks @josiekre @mfherman - yes let's update the required dependency version once the problem is identified.
Run into this issue. I think this issue is due to older R version. I run into the same issue with R version 3.3.2, but tidycensus from CRAN on R version 3.5.2 works without having to install the devtool version.
In the package description it says tidycensus "depends on R >= 3.3.0", this should be updated.
With constant version updates of dependencies and import pkgs, I think, including a tried/tested/recommended software comparability matrix in the documentation will help.
I had some pieces of code that were pulling ACS 5Y Census data pretty well. Suddenly (starting yesterday), the codes have not worked anymore. At first I thought it was due to some package update (slang, tibble, etc.). But probably no, because I tested on machines that were off for a while and I get the same messages. I suspect it may be due to government shutdown, but I'm not sure either. Using the ACS package I have been able to download data. Any thoughts on that? Thanks a lot in advance!
PS. interestingly the tigris package is working well. I do not know if due to caches in my machine.