dg_map: dg_map

Description Usage Arguments Examples

View source: R/dg_map.R

Description

Produce a map filled with variables queried by dg_call

Usage

1
2
3
dg_map(lookup = "GADM3", b_color = "white", nuts_nr = 1,
  stat_name = NULL, substat_name = NULL, year = NULL,
  parameter = NULL, return_data = FALSE)

Arguments

lookup

The method used to find the shapefile to use as the electoral background. Defaults to GADM

b_color

Specify the border color

nuts_nr

The NUTS level for the country shapefiles to download from GADM. Requires GADM to be the lookup method

stat_name

Character string containing the name of the main statistic. Please see dg_descriptions for a full list.

substat_name

Character string containing the name of the sub-statistic. Please see dg_descriptions for a full list. Defaults to all available sub-statistics if not specified.

year

Numeric year(s) for which you want to retrieve the data.

parameter

Character string containing the name(s) of the parameter(s) you want to retrieve. Please see dg_descriptions for a full list. Defaults to all available parameters if not specified.

return_data

Return merged data instead of plot

Examples

1
2
3
4
5
6
7
8
## Not run: 
turnout_map <- dg_map(
  nuts_nr = 1,
  year = 2017,
  stat_name = "AI0506"
)

## End(Not run)

CorrelAid/datenguideR documentation built on July 25, 2021, 1:43 p.m.