collect_metrics: Compute and write all complexity metrics for a data set

Description Usage Arguments

View source: R/collect.R

Description

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).

Usage

1
2
collect_metrics(df, country, output_dir, sim_method, t0_year, t1_year,
  t0_threshold, t1_threshold)

Arguments

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.


jorgenfrost/compost documentation built on Nov. 4, 2019, 3:10 p.m.