Description Usage Arguments Examples
This function takes a dataframe and generates a choropleth plot
1 2 |
df |
The dataframe with column "fips" (the FIPS code of the counties or states to show), with a column for the data to show |
fill |
The name of the variable to show in the choropleth |
map |
The level at which to draw the map. Options are "county", "state" |
palette |
An RColorBrewer palette to use. Default is "Blues" |
cuts |
An optional vector specifying where to make the color breaks Default cuts are the 20th, 40th, 60th, and 80th percentiles |
continental |
A logical whether to show the continental US |
1 2 3 4 | data(population_age, package = "noncensus")
df <- plyr::ddply(population_age, "fips", summarize, population = sum(population))
plot_choro(df, fill = "population", map = "county", palette = "Purples",
continental = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.