-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
78 lines (57 loc) · 1.97 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
output: github_document
---
```{r, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tiltIndicatorAfter
The goal of tiltIndicatorAfter is to conduct post-processing of four indicators created from the tiltIndicator package. The post-processing process cleans the useless data and adds additional columns. The processed output from the tiltIndicatorAfter package is the final output for the user.
This repository hosts only public code and may only show only fake data.
## Installation
You can install the development version of tiltIndicator from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("2DegreesInvesting/tiltIndicatorAfter")
```
## Example
```{r}
library(tiltIndicatorAfter)
library(tiltToyData)
library(readr, warn.conflicts = FALSE)
options(readr.show_col_types = FALSE)
packageVersion("tiltIndicatorAfter")
companies <- read_csv(toy_emissions_profile_any_companies())
products <- read_csv(toy_emissions_profile_products())
europages_companies <- read_csv(toy_europages_companies())
ecoinvent_activities <- read_csv(toy_ecoinvent_activities())
ecoinvent_europages <- read_csv(toy_ecoinvent_europages())
isic_name <- read_csv(toy_isic_name())
result <- profile_emissions(
companies,
products,
europages_companies = europages_companies,
ecoinvent_activities = ecoinvent_activities,
ecoinvent_europages = ecoinvent_europages,
isic = isic_name
)
result |> unnest_product()
result |> unnest_company()
inputs <- read_csv(toy_emissions_profile_upstream_products())
ecoinvent_inputs <- read_csv(toy_ecoinvent_inputs())
result <- profile_emissions_upstream(
companies,
inputs,
europages_companies = europages_companies,
ecoinvent_activities = ecoinvent_activities,
ecoinvent_inputs = ecoinvent_inputs,
ecoinvent_europages = ecoinvent_europages,
isic = isic_name
)
result |> unnest_product()
result |> unnest_company()
```