Skip to content

Commit

Permalink
0.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
antaldaniel committed Dec 17, 2021
1 parent 64b1c55 commit 3780eb9
Show file tree
Hide file tree
Showing 28 changed files with 324 additions and 252 deletions.
3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Imports:
eurostat,
magrittr,
tidyr,
stats,
forcats,
utils,
plyr,
Expand All @@ -39,8 +38,6 @@ Imports:
kableExtra,
tibble,
readxl,
purrr,
tidyselect,
rlang
Suggests:
testthat,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ importFrom(dplyr,arrange)
importFrom(dplyr,bind_cols)
importFrom(dplyr,filter)
importFrom(dplyr,full_join)
importFrom(dplyr,group_by)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,rename)
Expand Down
2 changes: 1 addition & 1 deletion R/employment_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' data file here with labelling.
#' @param force_download Defaults to \code{TRUE}. If \code{FALSE} it will use the existing downloaded file
#' in the \code{data_directory} or the temporary directory, if it exists.
#' @importFrom dplyr filter select mutate left_join rename ungroup summarize
#' @importFrom dplyr filter select mutate left_join rename ungroup summarize group_by
#' @importFrom tidyr spread
#' @importFrom eurostat get_eurostat
#' @importFrom rlang .data
Expand Down
2 changes: 1 addition & 1 deletion R/iotables.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @section iotables processing functions:
#' These are various helper functions for accessing parts of the symmetric
#' input-output tables and joining them correctly.
#' \code{\link{conforming_vector_create}} is a helper function taht creates
#' \code{\link{conforming_vector_create}} is a helper function that creates
#' a named vector that conforms with the analytical objects, such as the
#' use table, the Leontieff-matrix, etc.
#' \code{\link{household_column_get}} returns the final household
Expand Down
8 changes: 4 additions & 4 deletions R/round_table.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Systematically Eound Values in a Table
#' @title Systematically round values in a table
#'
#' This is an internal function to do the rounding on all numeric elements
#' of the table.
#' @describe This is an internal function to do the rounding on all numeric elements
#' of the table for comparability with external sources that use rounding.
#' @param data_table A symmetric input-output table, or a use table, or a
#' supply table, or a margin or a tax table.
#' @param digits Number of digits for rounding.
#' @return A tibble/data.frame with a key row and a symmetric matrix,
#' @return A tibble with a key row and a symmetric matrix,
#' after removing all empty columns and rows at the same time.
#' @importFrom dplyr mutate across
#' @keywords internal
Expand Down
25 changes: 12 additions & 13 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ version <- gsub('-', '.', version)

<!-- <img src="/man/figures/logo.png" align="right" height="205 width="205"/>-->
![iotables](man/figures/logo20.png)
[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
[![packageversion](https://img.shields.io/badge/Package%20version-`r version`-orange.svg?style=flat-square)](https://github.com/rOpenGov/iotables/commits/master)
[![R-CMD-check](https://github.com/rOpenGov/iotables/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/iotables/actions)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/iotables)](https://cran.r-project.org/package=iotables)
[![CRAN_time_from_release](https://www.r-pkg.org/badges/ago/iotables)](https://cran.r-project.org/package=iotables)
[![metacran downloads](https://cranlogs.r-pkg.org/badges/iotables)](https://cran.r-project.org/package=iotables)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5790209.svg)](https://doi.org/10.5281/zenodo.5790209)
[![license](https://img.shields.io/badge/license-MIT + file LICENSE-lightgrey.svg)](https://choosealicense.com/)
[![codecov](https://codecov.io/gh/rOpenGov/iotables/branch/master/graph/badge.svg?token=cnYWtcC81E)](https://codecov.io/gh/rOpenGov/iotables)
[![Follow rOpenGov](https://img.shields.io/twitter/follow/ropengov.svg?style=social)](https://twitter.com/intent/follow?screen_name=ropengov)
Expand Down Expand Up @@ -62,7 +64,15 @@ devtools::install_github("rOpenGov/iotables")
#devtools::install_github("rOpenGov/iotables", build_vignettes = TRUE)
```

You can follow changes on the [NEWS.md](https://github.com/rOpenGov/iotables/blob/master/NEWS.md) file.
You can download the manual in PDF for the [0.4.6 development release](https://retroharmonize.dataobservatory.eu/iotables_0.4.6.pdf). and follow the changes on the [NEWS.md](https://github.com/rOpenGov/iotables/blob/master/NEWS.md) file.

## Vignettes

The [Introduction to iotables](https://iotables.dataobservatory.eu/articles/intro.html) vignette presents most of the examples of the [Eurostat Manual of Supply, Use and Input-Output Tables](https://ec.europa.eu/eurostat/documents/3859598/5902113/KS-RA-07-013-EN.PDF/b0b3d71e-3930-4442-94be-70b36cea9b39?version=1.0) (Eurostat Manual, Chapter 15.) This is a good introduction to understand what will the functions do, and to check that they work correctly. The `testthat` infrastructure of the package checks the proper working of the functions against the published results from the `Eurostat Manual`.

The [Working with Eurostat Data](https://iotables.dataobservatory.eu/articles/working_with_eurostat.html) vignette shows how you can download, pre-process and use real data from Eurostat.

The [United Kingdom Input-Output Analytical Tables 2010](https://webarchive.nationalarchives.gov.uk/20160114044923/http://www.ons.gov.uk/ons/rel/input-output/input-output-analytical-tables/2010/index.html) are used for testing the `iotables` package, because they are well-documented and detailed, organized data is available with them. These calculations can be followed in the [United Kingdom Input-Output Analytical Tables](https://iotables.dataobservatory.eu/articles/united_kingdom_2010.html) vignette.

## Acquiring data

Expand All @@ -84,17 +94,6 @@ Currently the following Eurostat SIOTs can be used:

The `cp` element refers to basic prices and the `pyp` to previous years' prices.

## Vignettes

Given the complexity of the data used by the package, probably the use of the vignettes is needed to get a start.

The [Germany 1990](https://iotables.dataobservatory.eu/articles/germany_1990.html) vignette presents most of the examples of the [Eurostat Manual of Supply, Use and Input-Output Tables](https://ec.europa.eu/eurostat/documents/3859598/5902113/KS-RA-07-013-EN.PDF/b0b3d71e-3930-4442-94be-70b36cea9b39?version=1.0) (Eurostat Manual, Chapter 15.) This is a good introduction to understand what will the functions do, and to check that they work correctly. The `testthat` infrastructure of the package checks the proper working of the functions against the published results from the `Eurostat Manual`.

The [Working with Eurostat Data](https://iotables.dataobservatory.eu/articles/working_with_eurostat.html) vignette shows how you can download, pre-process and use real data from Eurostat.

The [United Kingdom Input-Output Analytical Tables 2010](https://webarchive.nationalarchives.gov.uk/20160114044923/http://www.ons.gov.uk/ons/rel/input-output/input-output-analytical-tables/2010/index.html) are used for testing the `iotables` package, because they are well-documented and detailed, organized data is available with them. These calculations can be followed in the [United Kingdom Input-Output Analytical Tables](https://iotables.dataobservatory.eu/articles/united_kingdom_2010.html) vignette.


### Contribute

Contributions are very welcome:
Expand All @@ -107,7 +106,7 @@ Contributions are very welcome:

**Kindly cite this work** as follows:

Daniel Antal. (2020, August 2). rOpenGov/iotables: Importing and Manipulating Symmetric Input-Output Tables (Version 0.4.5). Zenodo. [https://doi.org/10.5281/zenodo.5153006](https://zenodo.org/record/5153006/) for released version.
Daniel Antal. (2020, December 17). rOpenGov/iotables: Importing and Manipulating Symmetric Input-Output Tables (Version 0.4.6). Zenodo. [https://doi.org/10.5281/zenodo.5790209](https://zenodo.org/record/5153006/) for released version.
Development version URL: [https://ropengov.github.io/iotables/](https://ropengov.github.io/iotables/)

Thanks to [\@KKulma](https://github.com/KKulma/) for setting up new and improved continuous integration, and [\@pitkant](https://github.com/pitkant) for implementing many good practices on improving the code. See [contributors](https://github.com/ropengov/iotables/graphs/contributors). This project is part of [rOpenGov](http://ropengov.org).
Expand Down
69 changes: 35 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<!-- <img src="/man/figures/logo.png" align="right" height="205 width="205"/>-->

![iotables](man/figures/logo20.png)
[![packageversion](https://img.shields.io/badge/Package%20version-0.4.5-orange.svg?style=flat-square)](https://github.com/rOpenGov/iotables/commits/master)
[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
[![packageversion](https://img.shields.io/badge/Package%20version-0.4.6-orange.svg?style=flat-square)](https://github.com/rOpenGov/iotables/commits/master)
[![R-CMD-check](https://github.com/rOpenGov/iotables/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/iotables/actions)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/iotables)](https://cran.r-project.org/package=iotables)
[![CRAN\_time\_from\_release](https://www.r-pkg.org/badges/ago/iotables)](https://cran.r-project.org/package=iotables)
[![metacran
downloads](https://cranlogs.r-pkg.org/badges/iotables)](https://cran.r-project.org/package=iotables)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5790209.svg)](https://doi.org/10.5281/zenodo.5790209)
[![license](https://img.shields.io/badge/license-MIT%20+%20file%20LICENSE-lightgrey.svg)](https://choosealicense.com/)
[![codecov](https://codecov.io/gh/rOpenGov/iotables/branch/master/graph/badge.svg?token=cnYWtcC81E)](https://codecov.io/gh/rOpenGov/iotables)
[![Follow
Expand Down Expand Up @@ -72,41 +74,16 @@ devtools::install_github("rOpenGov/iotables")
#devtools::install_github("rOpenGov/iotables", build_vignettes = TRUE)
```

You can follow changes on the
You can download the manual in PDF for the [0.4.6 development
release](https://retroharmonize.dataobservatory.eu/iotables_0.4.6.pdf).
and follow the changes on the
[NEWS.md](https://github.com/rOpenGov/iotables/blob/master/NEWS.md)
file.

## Acquiring data

Eurostat’s data can be downloaded in several tidy, long-form, files, and
a lot of filtering is needed to start working with it.

Currently the following Eurostat SIOTs can be used:

- product x product SIOTs `naio_10_cp1700` or `naio_10_pyp1700`;

- industry x industry SIOTs `naio_10_cp1750` or`naio_10_pyp1750`;

- use tables at basic prices `naio_10_cp1620` or `naio_10_pyp1610`;

- trade and transport margins `naio_10_cp1620` or `naio_10_pyp1620`;

- net taxes less subsidies `naio_10_cp1630` or `naio_10_pyp1630`;

- Supply table at basic prices incl. transformation into purchasers’
prices (naio\_10\_cp15) and Use table at purchasers’ prices
(naio\_10\_cp16).

The `cp` element refers to basic prices and the `pyp` to previous years’
prices.

## Vignettes

Given the complexity of the data used by the package, probably the use
of the vignettes is needed to get a start.

The [Germany
1990](https://iotables.dataobservatory.eu/articles/germany_1990.html)
The [Introduction to
iotables](https://iotables.dataobservatory.eu/articles/intro.html)
vignette presents most of the examples of the [Eurostat Manual of
Supply, Use and Input-Output
Tables](https://ec.europa.eu/eurostat/documents/3859598/5902113/KS-RA-07-013-EN.PDF/b0b3d71e-3930-4442-94be-70b36cea9b39?version=1.0)
Expand All @@ -129,6 +106,30 @@ Analytical
Tables](https://iotables.dataobservatory.eu/articles/united_kingdom_2010.html)
vignette.

## Acquiring data

Eurostat’s data can be downloaded in several tidy, long-form, files, and
a lot of filtering is needed to start working with it.

Currently the following Eurostat SIOTs can be used:

- product x product SIOTs `naio_10_cp1700` or `naio_10_pyp1700`;

- industry x industry SIOTs `naio_10_cp1750` or`naio_10_pyp1750`;

- use tables at basic prices `naio_10_cp1620` or `naio_10_pyp1610`;

- trade and transport margins `naio_10_cp1620` or `naio_10_pyp1620`;

- net taxes less subsidies `naio_10_cp1630` or `naio_10_pyp1630`;

- Supply table at basic prices incl. transformation into purchasers’
prices (naio\_10\_cp15) and Use table at purchasers’ prices
(naio\_10\_cp16).

The `cp` element refers to basic prices and the `pyp` to previous years’
prices.

### Contribute

Contributions are very welcome:
Expand All @@ -142,9 +143,9 @@ Contributions are very welcome:

**Kindly cite this work** as follows:

Daniel Antal. (2020, August 2). rOpenGov/iotables: Importing and
Manipulating Symmetric Input-Output Tables (Version 0.4.5). Zenodo.
[https://doi.org/10.5281/zenodo.5153006](https://zenodo.org/record/5153006/)
Daniel Antal. (2020, December 17). rOpenGov/iotables: Importing and
Manipulating Symmetric Input-Output Tables (Version 0.4.6). Zenodo.
[https://doi.org/10.5281/zenodo.5790209](https://zenodo.org/record/5153006/)
for released version. Development version URL:
<https://ropengov.github.io/iotables/>

Expand Down
7 changes: 5 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ reference:
These data wrangling functions create vectors that conform the matrix, i.e. their elements are
stricly labelled and ordered.
contents:
- household_column_get
- iotables_metadata_get
- iotable_year_get
- primary_input_get
- household_column_get
- output_get
- total_tax_add
- supplementary_add
- household_column_find
- matrix_round
- supplementary_add
- title: "Analytic objects"
desc: >
Create the Leontieff matrix, the Leontieff inverse, and its inputs. To avoid division by zero,
Expand All @@ -75,6 +76,7 @@ reference:
harmonized to be successfully joined into a single variable, and eventually a table of similar
variables must be joined.
contents:
- input_indicator_create
- direct_effects_create
- indirect_effects_create
- title: "Multipliers"
Expand Down Expand Up @@ -108,6 +110,7 @@ reference:
contents:
- germany_1990
- metadata
- primary_inputs
- employment_metadata
- netherlands_2006
- title: "Validation Data - United Kingdom"
Expand Down
12 changes: 5 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
## Test environments
* local Window 10 install, r-version 4.10
* local Window 10 install, r-version 4.1.2
* Microsoft Windows Server 2019 10.0.17763 on Github (r-version: release)
* Mac OS X 10.15.7 on Github (r-version: release)
* ubuntu 20.04 on Github (r-version: release)
* ubuntu 20.04 on Github (r-version: devel)
* Mac OS X 11.6.1 on Github (r-version: release)
* ubuntu 20.04.3 on Github (r-version: release)
* ubuntu 20.04.3 on Github (r-version: devel)
* r_hub: Ubuntu Linux 20.04.1 LTS, R-release, GCC
* r_hub: Fedora Linux, R-devel, clang, gfortran
* r_hub: Windows Server 2022, R-devel, 64 bit

On Windows Server 2008 R2 SP1, R-devel, 32/64 bit bBuild failed during preparation, we believe that this is an r_hub setting error, as our local and github Windows tests had no issues.

## testthat results
FAIL 0 | WARN 0 | SKIP 0 | PASS 48
FAIL 0 | WARN 0 | SKIP 0 | PASS 50

## R CMD check results
0 errors √ | 0 warnings √ | 0 notes √
Expand Down
5 changes: 5 additions & 0 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ articles:
intro: intro.html
united_kingdom_2010: united_kingdom_2010.html
working_with_eurostat: working_with_eurostat.html
last_built: 2021-12-17T17:57Z
last_built: 2021-12-17T21:09Z

8 changes: 5 additions & 3 deletions docs/reference/conforming_vector_create.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion docs/reference/direct_effects_create.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3780eb9

Please sign in to comment.