Description Preparing GCAM data Mapping GCAM data
The gcammaptools package provides functions for plotting GCAM data on world or regional maps. This includes functions for making plots for regional or gridded data, as well as default projection and theme settings that provide a house style for GCAM plots.
The recommended way to load your GCAM data is by using the rgcam
package create a project data file from a GCAM database, and then querying
that file for the data you want to plot. Alternatively, you can start with
any data frame that has a 'region' column and one or more data columns.
Once you have loaded the data, you must add the region identifiers used in
the map data to the data frame using the add_region_ID
function.
To map GCAM data, you will need a simple feature collection or geojson with your region boundaries. The package provides the following commonly-used base maps:
map.rgn14
: 14 region map used prior to GCAM 4.0.
map.rgn32
: 32 region map used in GCAM 4.0 and later,
excluding Taiwan.
map.basin235
: 235 water basins.
map.chn
: 32 global regions plus China subregions
map.usa
: 32 global regions plus US states.
Users can provide their own base maps. You will need a geometry file in
geojson format, where each region has a region_id
. Land masses
that you want to draw, but which aren't part of any region should be included
and assigned a region_id
of 0. The examples
vignette shows how
to load such a file and convert it for use in this package.
Once you have your map data and your GCAM data, can generate the maps by
passing both to the plot_GCAM
function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.