Function that applies a number of intermediary functions (mostly varieties of wrap_long) to produces a series of data frames, that are written to file. The data frames that are written contains A) RCA values, B) similarity values, C) relatedness values (for all five metrics).
1 2 | collect_metrics(df, country, output_dir, sim_method, t0_year, t1_year,
t0_threshold, t1_threshold)
|
df |
a data frame with four variables: time, region, unit, intensity |
country |
the country from where the data comes (fx "denmark") |
output_dir |
the directory the produced files should be written to (fx here("data/produced/country/")) |
sim_method |
the method used to compute similarities. Options are "proximity", "jaccard", "association" |
t0_year |
reference year (fx 2000) |
t1_year |
evaluation year (fx 2005) |
t0_threshold |
RCA value that units should be under in t0_year to be eligible for "new" in t1. |
t1_threshold |
RCA value that units should be equal to or over in t1_year to be eligible for "new" in t1. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.