gta_plot_map: Create ggplot maps.

View source: R/gta plot map.R

gta_plot_mapR Documentation

Create ggplot maps.

Description

This function facilitates map creation with ggplot.

Usage

gta_plot_map(
  data = NULL,
  countries = NULL,
  value = NULL,
  marked.country = NULL,
  marked.colour = gta_colour$green[2],
  colour.low = gta_colour$blue[4],
  colour.high = gta_colour$blue[1],
  range.split = waiver(),
  legend.title = NULL,
  legend.labels = waiver(),
  title = NULL
)

Arguments

data

Specify the dataframe with the relevant columns.

countries

Specify the name of the column containing the countries.

value

Specify the name of the column containing the value for each country.

marked.country

Specify a single country which shall be coloured differenty.

marked.colour

Specify the colour the marked.country shall be coloured with. Default: gta_colour$green[2]

colour.low

Specifiy a color from the gta colour palette for the low part of the gradient. Default: GTA dark blue

colour.high

Specify a color from the gta colour palette for the high part of the gradient. Default: GTA light blue

range.split

Specify the number of parts the value range should be split to. Either as integer (range will be automatically divided and sequenced) or as sequence (e.g. seq(200,1000,200)). Default: ggplot automatic.

legend.title

Specify a title for the colour legend. Default: No title.

legend.labels

Specify the legend labels as list. Default: ggplot automatic.

title

Specify a title for the map plot. Default: No title.

Author(s)

Global Trade Alert

References

www.globaltradealert.org


global-trade-alert/gtalibrary documentation built on April 5, 2024, 1:54 p.m.