Description Usage Arguments Format
View source: R/geom_africa_tilemap.R
Based off the work of Bob Rudis's Statebins this package aims to create a workable tile map of Africa for ggplot2. Simply pass in a dataframe containing countries and values to measure, and this geom will create a simple map. This allows for easy faceting and allows a uniform legend across all plots.
Much like the origional statebins package, there are two critical aes()
mappings:
country
(so the geom knows which column to map the country names/abbreviations to)
fill
(the column you're mapping the filling with.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
border_col |
border color of the country squares, default " |
border_size |
thickness of the square country borders |
lbl_size |
font size (relative) of the label text |
dark_lbl, light_lbl |
colrs to be uses when the label should be dark or light. The function automagically computes when this should be. |
radius |
the corner radius |
... |
other arguments passed on to |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
An object of class GeomAfricaTileMap
(inherits from Geom
, ggproto
, gg
) of length 7.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.