dotmap_project | R Documentation |
This function creates a dotmap project.
dotmap_project(dir, area1 = NULL, area2 = NULL, region = NULL, vars,
var_titles = NULL, var_labels = NULL, pop_totals = NULL,
pop_tables, dens_ub = NULL, dens_lb = NULL, bbx = NA, z,
z_arr = NA, scale = NA, tile_size = 256, transparent = TRUE,
settings, title = "Dotmap", region_title = "Borders",
labels_title = "Labels", dots_text = "", dotmap_attr = "")
dir |
The project directory. It has/will have the following subdirectories: source (raw input files), input (preprocessed input files), tiles_area (processed data regarding the canvas available for the dots), dotmap_data (processed data regarding the dotmap), htmlserver (the output tile server), website (the dotmap website). |
area1 |
A spatial polygons object (class |
area2 |
(optional) A spatial polygons object (class |
region |
A spatial polygons object (class |
vars |
Character vector that specifies the variables. These names are used within the process, so please do no use whitespaces. |
var_titles |
Character vector that specifies the variable titles (shown in the visualization). |
var_labels |
List of category labels per variable. So each list item corresponds to a variable and should be a vector of category labels. |
pop_totals |
Either a number vector that contains the population sizes per region, or a data.frame with a column |
pop_tables |
pop_tables For each variable, a data.frame where the rows correspond to the regions and the columns to the categories. |
dens_ub |
Upper bound for the dot densities per class (see also |
dens_lb |
dens_lb Lower bound for the dot densities per class. If the number of dots is lower than this number, they are not drawn. |
bbx |
Bounding box. By default, the bounding box of |
z |
List of zoom levels at which the dots are distributed and drawn. Each list item corresponds a distribution level. If only one distribution level is specified, the dots are distributed at a specific zoom level, where for other zoom levels, they are blended to darker pixel colors (zooming out) or enlarged (zooming in). If multiple zoom levels are specified, the dots are distributed at the highest zoom level, and after that aggregated to super dots for the other distribution levels. For each list item, a numeric vector of three should be specified: the zoom level at which the dots are distributed, the lowest zoom level at which this distribution is rendered, the highest zoom level at which this distribution is rendered. Note that the distribution zoom level does not have to be the same as one of the other two zoom levels. However, across all distribution levels, all zoom levels have to be present. The order of list items should be increasing, so the first vector should specify the distribution level of the lowest zoom level. |
z_arr |
The zoom level at which the tiles are first created. If set to the highest distribution zoom level (see |
scale |
Vector of numbers that specify how many small dots a super dot represents. Only applicable if |
tile_size |
Tile size. By default 256 |
transparent |
Should the tiles be transparent? By default |
settings |
A list, with per variable, a list of color settings. |
title |
Title of the dotmap |
region_title |
Title of the region boundary layer. |
labels_title |
Title of the map labels layer. |
dots_text |
dots_text Text that explains the dots in the legend (e.g. |
dotmap_attr |
dotmap_attr The map attribute for the dotmap layer. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.