Plots the geometry in an sf tibble object. This is function isn't meant to actually be used in-practice (due to its simplicity, but is more so intended as a tutorial of writing and documenting R functions

plot_sf(sf_tibble)

Arguments

sf_tibble

an sf tibble object with simple feature geometry in the 'geometry' column

Author

Joe Zemmels

Examples

load("../data_raw/dataRaw_povertyBySexAge_acs5_2019.rda")
#> Warning: cannot open compressed file '../data_raw/dataRaw_povertyBySexAge_acs5_2019.rda', probable reason 'No such file or directory'
#> Error in readChar(con, 5L, useBytes = TRUE): cannot open the connection
#> Warning: package 'dplyr' was built under R version 4.0.3
#> #> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats': #> #> filter, lag
#> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union
#> Warning: package 'ggplot2' was built under R version 4.0.5
dataRaw_povertyBySexAge_acs5_2019 %>% sf::st_as_sf() %>% #seems to throw an error unless this conversion happens filter(variable == "B17001_002") %>% #filter first to reduce join time left_join(acs5_2019_variableNames, by = c("variable" = "name")) %>% dspgWork::plot_sf() + #returns a ggplot object, so can use ggplot functions scale_fill_gradient(low = "white",high = "black") + theme_minimal() + labs(title = "Income in the last 12 months below poverty level per county", fill = "Count")
#> Error in eval(lhs, parent, parent): object 'dataRaw_povertyBySexAge_acs5_2019' not found