View source: R/plot_timeseries_indicator.R
plot_timeseries_indicator | R Documentation |
Plot timeseries to provide line plots for each scenario present in df
with some manipulations. Produce two faceted plots where each facet is an
iso3
.
plot_timeseries_indicator( df, iso3, indicator, scale = c("free", "fixed", "free_x", "free_y"), value_col = "value", default_scenario = "default", base_scenarios = c(routine = "routine", reference_infilling = "reference_infilling", covid_shock = "covid_shock"), start_year = 2018 )
df |
Data frame in long format filtered for a specific country, where 1 row corresponds to a specific year, and indicator. |
iso3 |
vector of ISO3 country codes to plot |
indicator |
name of indicator to plot |
scale |
type of scale to be exported, as in |
value_col |
Column name of column(s) with indicator values, used to calculate contributions. |
default_scenario |
name of the default scenario. |
base_scenarios |
(vector) named vector with the names of the base scenarios. For
more details see |
start_year |
Base year for contribution calculation, defaults to 2018. |
a ggplot2
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.