-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
78 lines (51 loc) · 2.06 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
editor_options:
chunk_output_type: console
---
<!-- 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%"
)
```
# djprtradedash
<!-- badges: start -->
[![R-CMD-check](https://github.com/djpr-data/djprtradedash/workflows/R-CMD-check/badge.svg)](https://github.com/djpr-data/djprtradedash/actions) [![Codecov test coverage](https://codecov.io/gh/djpr-data/djprtradedash/branch/main/graph/badge.svg)](https://app.codecov.io/gh/djpr-data/djprtradedash?branch=main)
<!-- badges: end -->
The [DJPR Trade Dashboard](https://djpr-spp.shinyapps.io/djprtradedash/) provides a convenient way for users to browse publicly-accessible data about Victorian exports and imports.
## Installing the package
Install from GitHub with:
```{r, eval=FALSE}
if (!requireNamespace("remotes")) {
install.packages("remotes")
}
remotes::install_github("djpr-data/djprtradedash", dependencies = TRUE)
```
```{r}
library(djprtradedash)
```
## Data functions
`djprtradedash` contains functions to download and tidy trade data from publicly-available sources such as the ABS.
Import ABS balance of payments data by State/Territory with `read_bop()`:
```{r}
read_bop()
```
Import ABS merchandise exports data with `read_merch()`:
```{r}
read_merch(min_date = as.Date("2021-01-01"),
max_date = as.Date("2021-02-01"))
```
Import ABS International Trade Supplementary Information with `read_supp()`:
```{r}
read_supp("cy", 3)
```
## Data objects
The file `data-raw/create_dash_data.R` uses the data functions (see above) to download and tidy data. That data is then stored as internal data objects in this package.
- `merch` is merchandise exports data from `read_merch()`
- `bop` is balance of payments data from `read_bop()`
- `supp_cy` is supplementary calendar year trade information from `read_supp("cy")`
- `supp_fy` is supplementary financial year trade information from `read_supp("fy")`