You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example provided in the function gives the following error. I also needed to flip the arguments in the example of cens_get_acs(). I have not been able to run this with ACS data yet (the example in README is for the decennial Census).
library(easycensus)
d_cens= cens_get_acs("B25042", "state") # example flips the order which won't workd_cens#> # A tibble: 780 × 6#> GEOID NAME variable estimate tenure bedrooms #> <chr> <chr> <chr> <est> <fct> <fct> #> 1 01 Alabama B25042_001E 1867893 ± 9539 total total #> 2 01 Alabama B25042_002E 1284748 ± 12415 owner occupied total #> 3 01 Alabama B25042_003E 4100 ± 628 owner occupied no bedroom #> 4 01 Alabama B25042_004E 14578 ± 1257 owner occupied 1 bedroom #> 5 01 Alabama B25042_005E 168177 ± 5010 owner occupied 2 bedrooms #> 6 01 Alabama B25042_006E 739752 ± 8517 owner occupied 3 bedrooms #> 7 01 Alabama B25042_007E 292318 ± 5479 owner occupied 4 bedrooms #> 8 01 Alabama B25042_008E 65823 ± 2665 owner occupied 5 or more bedrooms#> 9 01 Alabama B25042_009E 583145 ± 8764 renter occupied total #> 10 01 Alabama B25042_010E 17201 ± 1808 renter occupied no bedroom #> # ℹ 770 more rows
cens_margin_to(d_cens, bedrbedrooms)
#> Error in `dplyr::group_by()`:#> ! Must group by variables found in `.data`.#> ✖ Column `bedrbedrooms` is not found.#> Backtrace:#> ▆#> 1. └─easycensus::cens_margin_to(d_cens, bedrbedrooms)#> 2. ├─dplyr::summarize(...)#> 3. ├─dplyr::group_by(data, .data$GEOID, .data$NAME, ...)#> 4. └─dplyr:::group_by.data.frame(data, .data$GEOID, .data$NAME, ...)#> 5. └─dplyr::group_by_prepare(.data, ..., .add = .add, error_call = current_env())#> 6. └─rlang::abort(bullets, call = error_call)
The example provided in the function gives the following error. I also needed to flip the arguments in the example of cens_get_acs(). I have not been able to run this with ACS data yet (the example in README is for the decennial Census).
Created on 2024-03-28 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: