Description Usage Arguments See Also Examples
This takes the output of get_county_map and joins with
dashboard data. The result is a list split by segment. The
county_census table is used for linking on a more precise variable (county_fips
as oppossed to county name).
1 | join_county_map(dashboard, county_map, county_census)
|
dashboard |
summary |
county_map |
data produced by |
county_census |
county names by fips, to provide more precise joining between dashboard results and county_map shapefile |
Other functions to run dashboard visualization:
get_county_map(),
int_breaks(),
plot_bar(),
plot_county(),
plot_month(),
plot_value2(),
plotly_config(),
run_visual_county(),
ui_button_layout()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
library(dplyr)
data(dashboard)
county_map <- get_county_map("SC")
county_census <- load_counties(state = "SC")
dash_list <- join_county_map(dashboard, county_map, county_census)
# produce a warning by using the wrong state
county_map <- get_county_map("ME")
county_census <- load_counties(state = "ME")
dash_list <- join_county_map(dashboard, county_map, county_census)
# Maine and South Carolina actually share one county name
x <- filter(dash_list$county, group == "all_sports", quarter == 4)
plot_county(x) %>% gridExtra::grid.arrange(grobs = .)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.