county_pov <- get_acs(geography = "county",
HouseValue=="B25077_001",
HHIncome=="B19013_001",
year = 2017,
survey = "acs5",
geometry = TRUE,
shift_geo = TRUE) %>%
mutate(HHInc_HousePrice_Ratio=round(HouseValue/HHIncome,2))
ggplot(country_pov) +
geom_sf(aes(fill = HHInc_HousePrice_Ratio), color=NA) +
coord_sf(datum=NA) +
labs(title = "House Value Over House Income",
subtitle = "Alaska and Hawaii are shifted and not to scale",
caption = "Source: ACS 5-year, 2017",
fill = "HHInc_HousePrice_Ratio") +
scale_fill_viridis(direction=-1)
Error in get_acs(geography = "county", HouseValue == "B25077_001", HHIncome == : object 'HHIncome' not found
arrange( CenDF, desc(HHInc_HousePrice_Ratio) )
Error in st_as_sf():
! Problem with the implicit transmute() step.
x Problem while computing ..1 = HHInc_HousePrice_Ratio.
x ..1 must be size 6440 or 1, not 2.
Backtrace:
dplyr:::arrange.data.frame(CenDF, desc(HHInc_HousePrice_Ratio))
Error in st_as_sf(NextMethod(), sf_column_name = attr(.data, "sf_column")) : x Problem while computing ..1 = HHInc_HousePrice_Ratio. x ..1 must be size 6440 or 1, not 2.
county_pov <- get_acs(geography = "county", HouseValue=="B25077_001", HHIncome=="B19013_001", year = 2017, survey = "acs5", geometry = TRUE, shift_geo = TRUE) %>% mutate(HHInc_HousePrice_Ratio=round(HouseValue/HHIncome,2)) ggplot(country_pov) + geom_sf(aes(fill = HHInc_HousePrice_Ratio), color=NA) + coord_sf(datum=NA) + labs(title = "House Value Over House Income", subtitle = "Alaska and Hawaii are shifted and not to scale", caption = "Source: ACS 5-year, 2017", fill = "HHInc_HousePrice_Ratio") + scale_fill_viridis(direction=-1) Error in get_acs(geography = "county", HouseValue == "B25077_001", HHIncome == : object 'HHIncome' not found
arrange( CenDF, desc(HHInc_HousePrice_Ratio) ) Error in
st_as_sf()
: ! Problem with the implicittransmute()
step. x Problem while computing..1 = HHInc_HousePrice_Ratio
. x..1
must be size 6440 or 1, not 2. Backtrace:..1 = HHInc_HousePrice_Ratio
. x..1
must be size 6440 or 1, not 2.