Description Usage Arguments Details
Creates multiple choropleth maps for areal data using ggplot2.
1 |
shapefile |
A shapefile for the study region. It will be used for all the maps. |
adata |
A dataframe for the areal data. The data can be numeric or factor. |
maptitle |
A vector of map titles. It must have the same length as the number of maps created. |
guidetitle |
A vector of guide titles. It must have the same length as the number of maps created. |
lower |
The lower limit used in the guide for continuous data. |
upper |
The upper limit used in the guide for continuous data. |
nrow |
The number of rows in the final grid. |
ncol |
The number of columns in the final grid. |
This is a wrapper for the areamap function, it will generate a gridExtra grid containing up to four maps. This function will run the areamap for each of the maps.
The data must be organized the same way as if creating a single map. The data in each variable must be in the same order of the shapefile's polygons and must have the same length.
The title of the maps and of the guides must be entered in a vector, they will be used in the order they are entered.
If a lower and upper limit are entered in the function they will be used for all the maps that uses continuous data. Since this function will likely be used to plot maps for the data across different times, it's a good practice to standardize the guide's scale. In case the lower and upper limits are not specified, the areamap function will use the minimum and maximum values found in the data, which will result in different scales for each map.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.