Description Usage Arguments Value Note Author(s)
View source: R/country_categories.R
This script contains a function to create a data frame to help reassign participating country fill in a ggplot object created from plot_WG_map() or plot_geocode_map().
1 | country_categories(cat_data_orig, cat_countries_ISO3, cols, WG_i)
|
cat_data_orig |
same as category_data in category_maps(). This data frame must contain 3 columns labeled "Acronym" (for the WG or plotname), "Countries" (A list of SOOS named countries separated by a ";") and "Categories" (a list of assigned categories for each SOOS country). See example file for details. Note the categories should be ordered from low-high and can be numbers or a caracter vector corresponding to names in the "Categories" column. The highest ranking category will be decide the country fill. |
cat_countries_ISO3 |
ISO3 codes returned by passing cat_data_original through check_country_names(). |
cols |
The ordered colour vector for categories. |
WG_i |
The row of cat_data_orig that data is being generated for. |
a data frame with the columns "ISO3" (ISO3 ccountry code), "cat" (category ID) and "fill" (assigned fill colour)
v.0.1
Kimberlee Baldry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.