Description Usage Arguments Value Examples
colmap - for colombian map (or in general color map) - is a wrapper of ggplot and its geom_map so that its easy to make a quick choropleth map. You can get further control with ggplot.
1 2 |
map |
a |
data |
a data.frame that contains an id variable to match the map regions and the variable to plot over the map. By default no data is needed in which case only the map is represented coloring the regions with ggplot's default pallete. |
var |
character, the name of the variable in data to be represented in the map. By default it will take the first non id variable. |
map_id |
character, name of the map id variable. By default |
data_id |
character, name of the data variable to match the map id. |
legend |
logical, include legend (color guide) in the plot? No legend is included if only the map is ploted. |
autocomplete |
logical, if there are any map regions without corresponding data values and autocomplete is true then the data will be auto-completed with missing values to plot all the regions instead of having void portions in the map. |
a ggplot object.
1 | colmap() # Plot default map: Colombia departments.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.