/
README.Rmd
77 lines (54 loc) · 2.13 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tacApp
<!-- badges: start -->
<!-- badges: end -->
The goal of tacApp is to help you analyze changes in the power sector between
two time periods. The public source code lives in an [R
package]([here](https://github.com/2DegreesInvesting/tacApp)), and the public
application is available [online](https://twodii.shinyapps.io/tacApp/).
## Usage
* Go to <https://twodii.shinyapps.io/tacApp/>.
* Select a parent company and a technology.
* Click "Apply".
## Output
* A summary of the _real_ and _virtual_ change.
* A breakdown of changes as a plot.
* A breakdown of changes as a downloadable table.
A _real_ change is an increase or decrease in the production capacity. A
_virtual_ change is a change not in the production capacity but in the ownership
of the asset.
## Contributing
### Code organization
The app is organized in the same was as an R package. Learn more at
<https://mastering-shiny.org/scaling-packaging.html>.
### Data
The data is private and not hosted here. The ultimate source is [Asset
Resolution](https://asset-resolution.com/). The raw data is first processed
in the data-raw/ directory in the private repository at <https://github.com/2DegreesInvesting/tacAppPrivateData>, then processed further
in the data-raw/ directory here. The file names and comments should guide you.
```{r}
file_names <- list.files("data-raw")
file_names
comments <- head(readLines("data-raw/01_valid_rowids.R"))
writeLines(comments)
```
### Deployment
> To deploy your application, you can either deploy the app from the IDE itself by clicking on the Publish button in the top right corner of the interface ...
or you can use the deployApp command from the rsconnect package.
```r
library(rsconnect)
deployApp()
```
<https://docs.rstudio.com/shinyapps.io/getting-started.html#deploying-your-first-application>.
Learn more at <https://mastering-shiny.org/scaling-packaging.html#deploying-your-app-package>.