Skip to contents

Utilities for constraining, visualizing, and exporting tidy SUBE outputs.

Usage

filter_sube(
  data,
  country_exclusions = character(),
  year_exclusions = NULL,
  product_exclusions = character(),
  bounds = list(multiplier = list(GO = c(1, 4), VA = c(0, 1), EMP = c(0, Inf), CO2 = c(0, Inf)),
    elasticity = list(default = c(0, Inf))),
  drop_negative_elasticities = TRUE
)

plot_sube(data, by = c("country", "product"), kind = c("boxplot", "density"),
  measure = NULL, variable = NULL)

write_sube(path, data, format = c("csv", "rds", "dta"))

Arguments

data

Tidy SUBE data.

country_exclusions

Country codes to remove.

year_exclusions

Years to remove.

product_exclusions

Product codes to remove.

bounds

Named bounds by measure and variable.

drop_negative_elasticities

Whether to remove negative elasticities.

by

Grouping used for boxplots.

kind

Plot type.

measure

Optional measure filter.

variable

Optional variable filter.

path

Output path.

format

Output format.

Value

`filter_sube()` returns a filtered table, `plot_sube()` returns a `ggplot` object, and `write_sube()` returns the output path invisibly.