Skip to content

Commit

Permalink
version 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pachadotdev authored and cran-robot committed Mar 1, 2022
1 parent c6f07f9 commit 457aaef
Show file tree
Hide file tree
Showing 72 changed files with 1,858 additions and 6,389 deletions.
51 changes: 29 additions & 22 deletions DESCRIPTION
@@ -1,25 +1,33 @@
Package: tradestatistics
Type: Package
Title: Open Trade Statistics API Wrapper and Utility Program
Version: 1.1
Version: 3.0.2
Authors@R: c(
person(given = "Mauricio",
family = "Vargas",
role = c("aut", "cre", "cph"),
email = "mvargas@dcc.uchile.cl",
email = "mavargas11@uc.cl",
comment = c(ORCID = "0000-0003-1017-7574")),
person(given = "Joshua",
family = "Kunst",
role = "ctb",
comment = "contributed to different parts of the pre-release code"),
person(given = "Alexey",
family = "Kravchenko",
role = "ctb",
comment = "reviewed 2021 version of the API"),
person(given = "Emma",
family = "Mendelsohn",
role = "ctb",
comment = "updated the functions to take available years from the API instead of hardcoded values"),
person(given = "Natalia",
family = "de los Santos",
role = "ctb",
comment = "proposed improvements to default parameters"),
person(given = "Elio",
family = "Campitelli",
role = "ctb",
comment = "wrote client-side caching function"),
comment = "wrote parts of the client-side caching function"),
person(given = "Emily",
family = "Riederer",
role = "rev",
Expand All @@ -31,53 +39,52 @@ Authors@R: c(
person(given = "Amanda",
family = "Dobbyn",
role = "rev",
comment = "reviewed an archived package that evolved into the current package for rOpenSci, see https://github.com/ropensci/onboarding/issues/217"),
comment = "reviewed a previous package that evolved into the current package for rOpenSci, see https://github.com/ropensci/onboarding/issues/217"),
person(given = "Jorge",
family = "Cimentada",
role = "rev",
comment = "reviewed an archived package that evolved into the current package for rOpenSci, see https://github.com/ropensci/onboarding/issues/217"),
comment = "reviewed a previous package that evolved into the current package for rOpenSci, see https://github.com/ropensci/onboarding/issues/217"),
person(family = "UN Comtrade",
role = "dtc"),
person(family = "The World Bank",
role = "dtc"),
person(family = "Center for International Development at Harvard University",
role = "dtc"),
person(family = "The Observatory of Economic Complexity",
role = "dtc")
)
URL: https://docs.ropensci.org/tradestatistics/
BugReports: https://github.com/ropensci/tradestatistics/issues
BugReports: https://github.com/ropensci/tradestatistics/issues/
Description: Access 'Open Trade Statistics' API from R to download international trade data.
License: GPL-3
License: Apache License (>= 2)
LazyData: TRUE
Imports: crul, jsonlite, memoise, data.table, digest
RoxygenNote: 7.1.1
Suggests: knitr, rmarkdown, DT, testthat (>= 2.1.0), vcr, covr
RoxygenNote: 7.1.2
Suggests: knitr, rmarkdown, tibble, testthat (>= 2.1.0), vcr, covr,
arrow
VignetteBuilder: knitr
Encoding: UTF-8
Depends: R (>= 2.10)
NeedsCompilation: no
Packaged: 2020-09-12 23:19:04 UTC; pacha
Packaged: 2022-02-24 17:23:28 UTC; pacha
Author: Mauricio Vargas [aut, cre, cph]
(<https://orcid.org/0000-0003-1017-7574>),
Joshua Kunst [ctb] (contributed to different parts of the pre-release
code),
Alexey Kravchenko [ctb] (reviewed 2021 version of the API),
Emma Mendelsohn [ctb] (updated the functions to take available years
from the API instead of hardcoded values),
Natalia de los Santos [ctb] (proposed improvements to default
parameters),
Elio Campitelli [ctb] (wrote client-side caching function),
Elio Campitelli [ctb] (wrote parts of the client-side caching function),
Emily Riederer [rev] (reviewed the package for rOpenSci, see
https://github.com/ropensci/onboarding/issues/274),
Mark Padgham [rev] (reviewed the package for rOpenSci, see
https://github.com/ropensci/onboarding/issues/274),
Amanda Dobbyn [rev] (reviewed an archived package that evolved into the
Amanda Dobbyn [rev] (reviewed a previous package that evolved into the
current package for rOpenSci, see
https://github.com/ropensci/onboarding/issues/217),
Jorge Cimentada [rev] (reviewed an archived package that evolved into
Jorge Cimentada [rev] (reviewed a previous package that evolved into
the current package for rOpenSci, see
https://github.com/ropensci/onboarding/issues/217),
UN Comtrade [dtc],
The World Bank [dtc],
Center for International Development at Harvard University [dtc],
The Observatory of Economic Complexity [dtc]
Maintainer: Mauricio Vargas <mvargas@dcc.uchile.cl>
The World Bank [dtc]
Maintainer: Mauricio Vargas <mavargas11@uc.cl>
Repository: CRAN
Date/Publication: 2020-09-18 09:00:03 UTC
Date/Publication: 2022-03-01 18:20:02 UTC
103 changes: 48 additions & 55 deletions MD5
@@ -1,60 +1,53 @@
bf64d2da136a1e4b384e88210f6f1131 *DESCRIPTION
c03a6cd1f6cfb487534ff5cca4be7597 *NAMESPACE
1177d19055c52716b51fe960ee789d83 *NEWS.md
d9b2de1a4336a80ab507fbc1d7b283b9 *R/ots_cache.R
6f020497a3268724d5419631ecf9af46 *R/ots_create_tidy_data.R
2640e107c3f3ce57a6de27d07f02e389 *R/ots_inflation_adjustment.R
b0aa27b7040cbdc776f0ed343c28eaa2 *R/ots_read_from_api.R
def154d5b3d3e6430825980b159d360b *R/ots_strings_processing.R
c44e6dbc2d541e410929d17a4846c243 *R/tradestatistics-package.R
9ae7e1ae47c3cda7d8021174d7e94757 *build/vignette.rds
0135dfd54e05f363bc8ff8d9b59ccc6f *data/ots_countries.rda
32063c8c0adf26f80a52c4a8e7ed6696 *data/ots_groups.rda
4a1695295d241b2ef7ae2257518ad1e0 *data/ots_inflation.rda
ffdff9eebbe829b2f11ce97289f25239 *data/ots_products.rda
d141ca9aecf3cf36f31c514b66f3b461 *data/ots_products_shortnames.rda
2ac84910f5ab94b8e8d7f345c4a6c256 *data/ots_sections.rda
361b11a2ffefc226df89022cf5736577 *data/ots_sections_colors.rda
97c7bfefa891eb1f518f48141de6e172 *data/ots_sections_names.rda
cb14227b701ce8788e2dc1ad2df03ed3 *data/ots_sections_shortnames.rda
18f6d675fe7f0d0f188546f29041ed5b *data/ots_tables.rda
7e2ba1d329fc40c7c8821da63742642e *inst/doc/basic-usage.R
bc86abe6b7eab05173bc698c170a6654 *inst/doc/basic-usage.Rmd
336040c519a515f173b5cc6bd80012cf *inst/doc/basic-usage.html
4cf07f665cd7cf7310cde6caf2d3af76 *DESCRIPTION
f87edba5eb20a0724447841735c76777 *NAMESPACE
677791eac071847972abaeeefe02ddb8 *NEWS.md
6f0e844fd184f8c21830a80725ee5ff1 *R/ots_cache.R
0ecc5aa286260e0c34288cc794098b08 *R/ots_create_tidy_data.R
5a587b13b23db5bcd99f335ed5731cf8 *R/ots_inflation_adjustment.R
b994d3b97b6089ec753f740a28d51347 *R/ots_read_from_api.R
da57617c220e9a8f002bad240b88d40f *R/ots_strings_processing.R
19b4aa819dbc1cde8956b482862a8487 *R/sysdata.rda
d69fe015b5b7f870c5805ce6b6b35aaa *R/tradestatistics-package.R
7ddb6bf716f20ac915b7ed45c3892651 *build/vignette.rds
de7827ddbe92e3c8a8c93418e02a0dab *data/ots_commodities.rda
db398e2d1a6f1f315a5d52bae887e5bc *data/ots_countries.rda
a5e2cacec5073dbd62e2ace2d4f9ee95 *data/ots_inflation.rda
5b96aadcf139aadf428752da8f931af5 *data/ots_sections_colors.rda
2debce7898eaab1051f89a2398b9dcd4 *data/ots_tables.rda
d151f9272e407a4fdfafeac4c7128df6 *inst/doc/basic-usage.R
20545f08306d323458086f3f665b8cd4 *inst/doc/basic-usage.Rmd
a27527b17f731172fb730f69ecc6e77c *inst/doc/basic-usage.html
457c38c3116caa46dfdeac16c3e4beb7 *inst/references.bib
b8320b4d2de428f45cc8e119e7dbf67d *man/ots_cache.Rd
47481af2494b7f9c6989b2fabb9573b1 *man/ots_countries.Rd
7705d2ac53b56846d0f5bb981f137341 *man/ots_commodities.Rd
e088549798ef474274b5e1edace9b5ae *man/ots_commodity_code.Rd
9276193565f51300486f4e2bc23a5525 *man/ots_countries.Rd
d60e11b9be91b25df04b05c0a64f8561 *man/ots_country_code.Rd
913fb1eaac69b2cbacd3366ee241a5f8 *man/ots_create_tidy_data.Rd
4827e8e0e4ac3df55d60c0dba76831a5 *man/ots_create_tidy_data_memoised.Rd
73b9d36b80209e358e25fd54c7170f66 *man/ots_create_tidy_data_unmemoised.Rd
b7db384b188ad2d6646687af567c44a1 *man/ots_groups.Rd
0d6792b80163c6cf227436050f93510c *man/ots_inflation.Rd
5e72235bf9f6aed232f454d05e47f6e8 *man/ots_inflation_adjustment.Rd
559095a3da25103fe74762261f0ba884 *man/ots_product_code.Rd
531e94f7f04e204141885ef682ac8213 *man/ots_product_section.Rd
67f4923eb3abb99d9c6a04010475d26a *man/ots_products.Rd
7096e839d894cef166cf98576da6a9cf *man/ots_products_shortnames.Rd
272d3c8f423b88f806c7192c1607fe3d *man/ots_read_from_api.Rd
82ae4ba7761a49691b3c469d03771633 *man/ots_sections.Rd
1f049d16eb94af601ee4ef1854546ea9 *man/ots_sections_colors.Rd
72c2231ef815e776ab4a28d7021e7ee5 *man/ots_sections_names.Rd
f633d27f5a19035abfbd51a897a958d9 *man/ots_sections_shortnames.Rd
3413799043db4d0475b66440468cd052 *man/ots_tables.Rd
084f54c61cc106fc89729d578dcd956d *man/tradestatistics-package.Rd
db835b2e4c6a7cf6924a32de519713f5 *tests/fixtures/vcr_cassettes/chl_all_1964.yml
bc97282a181b547a30b415ef8f425475 *tests/fixtures/vcr_cassettes/chl_arg_1964.yml
bca0eaa9af8739480b2a01132e50fdcf *tests/fixtures/vcr_cassettes/chl_arg_1964_kriptonite.yml
31af986ba7836c67c307892aca26fb29 *tests/fixtures/vcr_cassettes/chl_arg_1964_yr.yml
a5e1a3a53d138886c5f63b67637c67d4 *tests/fixtures/vcr_cassettes/chl_arg_1964_yr_apple.yml
4d51a361fad10cc63e4397acfecd6f9b *tests/fixtures/vcr_cassettes/chl_arg_1964_yrpc_animal.yml
5e5ab8db3617b02df3146d196b5167cf *tests/fixtures/vcr_cassettes/chl_arg_1964_yrpc_apple.yml
c4ea2db72be225bd37e09794d8ce40f9 *tests/fixtures/vcr_cassettes/chl_prk_1964.yml
063dd93ced746f3bf71a37c4ce6958c9 *man/ots_create_tidy_data.Rd
4eb40cb5b8f2d8518a657e11a2388a0c *man/ots_create_tidy_data_memoised.Rd
e59771b72f4f4e676af7df88124d556a *man/ots_create_tidy_data_unmemoised.Rd
6346fd63234be443ba02f8247216f24c *man/ots_inflation.Rd
d797aa0d2e34f529c91857a410ab65b6 *man/ots_inflation_adjustment.Rd
ae07fdb00f5b754f49c3195153fe4992 *man/ots_read_from_api.Rd
a645241fe7b0d1786211b755ec97d972 *man/ots_sections_colors.Rd
44a7d52b9ee93f7b045c5bd4f141adbe *man/ots_tables.Rd
bc60f4d127082fccd84644e66d7a42fe *man/tradestatistics-package.Rd
65bb7151c2b94cd8d109cb92ec694d19 *tests/fixtures/vcr_cassettes/chl_all_2002_yrp.yml
123c90f6b681235f2e59e9ab2c22713c *tests/fixtures/vcr_cassettes/chl_arg_2002_yr.yml
6afc16d65c2af918edaa938f265efcc7 *tests/fixtures/vcr_cassettes/chl_arg_2002_yr_apple.yml
b1350ec8859ffe08c571585570511302 *tests/fixtures/vcr_cassettes/chl_arg_2002_yr_groups.yml
3bc62fdc2c810e2b96f1dd7f68891716 *tests/fixtures/vcr_cassettes/chl_arg_2002_yrp.yml
d82c6c9608b7a7366bb248c731f9a231 *tests/fixtures/vcr_cassettes/chl_arg_2002_yrpc.yml
83bb45fd431ec63a8747d82602530f8a *tests/fixtures/vcr_cassettes/chl_arg_2002_yrpc_cache.yml
1d5b2c964ec1042823927b8afb845b09 *tests/fixtures/vcr_cassettes/chl_arg_2002_yrpc_fish.yml
062739d696ce3f079ed43e3f3db44d39 *tests/fixtures/vcr_cassettes/chl_arg_2002_yrpc_wheat.yml
f87fb8aebf2fdbe9698ff4132476c173 *tests/fixtures/vcr_cassettes/chl_arg_2004_yr.yml
39a3ec8c5ea113fa13416ac2e2a5bc98 *tests/fixtures/vcr_cassettes/chl_arg_2004_yrpc.yml
794f418b72fecdbfbafb29b90709fec2 *tests/fixtures/vcr_cassettes/chl_myt_2002_yrp.yml
6f0d66d620db2d481bc9a4e4349c10e7 *tests/testthat.R
9b1c461abf5c5354a25129ff483c5e07 *tests/testthat/helper-tradestatistics.R
178bdce253865bbb2f8c7e3f726225e5 *tests/testthat/test-ots_country_code.R
71443e529fdb7a126364b83580aee7c7 *tests/testthat/test-ots_create_tidy_data.R
2bd7119e7df615756018b24e113e963e *tests/testthat/test-ots_inflation_adjustment.R
9e1f8f10cf34f0fccc520261f8f3f8ee *tests/testthat/test-ots_product_code.R
d81905b2378dd2b0808de2d98131226b *tests/testthat/test-ots_strings_processing.R
bc86abe6b7eab05173bc698c170a6654 *vignettes/basic-usage.Rmd
1cb01502970a9121b8ecaab290cbf4b0 *tests/testthat/test-ots_country_code.R
5f8dc1dd81944e11f106ac93376774a2 *tests/testthat/test-ots_create_tidy_data.R
d6b90adc4fc1b77b75c3485790af37e8 *tests/testthat/test-ots_inflation_adjustment.R
bce2f546d0c701f81ccdd3c51bcba066 *tests/testthat/test-ots_strings_processing.R
20545f08306d323458086f3f665b8cd4 *vignettes/basic-usage.Rmd
4 changes: 1 addition & 3 deletions NAMESPACE
@@ -1,11 +1,9 @@
# Generated by roxygen2: do not edit by hand

export(ots_cache)
export(ots_commodity_code)
export(ots_country_code)
export(ots_create_tidy_data)
export(ots_inflation_adjustment)
export(ots_product_code)
export(ots_product_section)
importFrom(crul,HttpClient)
importFrom(data.table,`:=`)
importFrom(data.table,fread)
Expand Down
50 changes: 50 additions & 0 deletions NEWS.md
@@ -1,3 +1,53 @@
# version 3.0.2

Updates
* Allows to obtain tables in Parquet format from the API, giving a speed-up
of ~50% for the final user.
* Uses tibble instead of DT to produce lighter vignettes

# version 3.0.1

Updates
* Adds section colors data for visualization, this is taken from the palette
used in shiny.tradestatistics.io

# Version 3.0

Updates
* Removes all references to tables using communities or short names
(both unofficial), reflecting changes in the API
* The functionality remains the same, but now the end user functions don't
add a 21-colors palette to the data (i.e. see the data section)

Data

* Switches from HS92 to HS12 to reflect product changes with less aggregation
* Drops any data from Harvard (communities and short product names) as these
depend on using HS92 4 digits, therefore the color palettes were removed as
these depended on the communities table
* The inflation data was trimmed to a window since the year 2000
* The commodities data now contains information for +5000 products instead of
+1200 as the aggregation level changed in the API
* Adds RTAs and MFN tariffs for gravity modelling

# Version 2.0

Updates

* Uses ISO codes as is (affects Aruba, Roumania, Timor-Leste, Antarctica,
Saint Barthelemy, Curacao, Sint Maarten and South Sudan)

# Version 1.0

Updates

* Reflects API changes with less aggregated data
* Follows UN COMTRADE notation (i.e. commodity instead of product)
* Does not impute data before hand, which is better for most of gravity models use cases
* Provides the data exactly as in the API, returning commodity level data to allow users to do their own aggregation
* Does not drop reference year with inflation adjustment (https://github.com/ropensci/tradestatistics/issues/38)
* Takes max and min available years from the API instead of hardcoded values (https://github.com/ropensci/tradestatistics/pull/39)

# Version 0.4.0

Updates
Expand Down
1 change: 0 additions & 1 deletion R/ots_cache.R
Expand Up @@ -8,7 +8,6 @@
#' @importFrom data.table fread fwrite
#' @importFrom digest digest
#' @importFrom memoise forget
#' @export
#' @keywords internal
ots_cache <- function(use_cache, file, ...) {
# cache in memory ----
Expand Down

0 comments on commit 457aaef

Please sign in to comment.