Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pachadotdev/oec

The Observatory of Economic Complexity - R Package
https://github.com/pachadotdev/oec

Last synced: 3 months ago
JSON representation

The Observatory of Economic Complexity - R Package

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
)
```

# OEC R package sticker

[![mitlicense](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/pachamaltese/oec.svg?branch=master)](https://travis-ci.org/pachamaltese/oec)
[![Build status](https://ci.appveyor.com/api/projects/status/5xvlffxy8ro4wc34?svg=true)](https://ci.appveyor.com/project/pachamaltese/oec)
[![cran checks](https://cranchecks.info/badges/summary/oec)](https://cran.r-project.org/web/checks/check_results_oec.html)
[![CRAN downloads](http://cranlogs.r-pkg.org/badges/oec)](http://cran.rstudio.com/web/packages/oec/index.html)
[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/oec)](http://cran.rstudio.com/web/packages/oec/index.html)
[![Coverage status](https://codecov.io/gh/pachamaltese/oec/branch/master/graph/badge.svg)](https://codecov.io/github/pachamaltese/oec?branch=master)
[![](https://badges.ropensci.org/217_status.svg)](https://github.com/ropensci/onboarding/issues/217)

The [Observatory of Economic Complexity](https://atlas.media.mit.edu/en/) is the world's leading visualization engine for international trade data. `oec` provides an easy way to obtain data from the OEC by accessing its API.

This is what the package does:

![Data diagram](http://pacha.hk/oec/data-diagram.svg)

Using the oec R package is all about efficiency, without this package you could obtain the same data from the API at the expense of using additional time and effort for the same results. As an API wrapper and utility program this package makes data obtaining faster and easier for you.

## Installation

```{r, eval = FALSE}
# Install release version from CRAN
install.packages("oec")

# Install development version from GitHub
devtools::install_github("pachamaltese/oec")
```

## Usage

This package features a full pkgdown site [here](http://pacha.hk/oec/). Please read it.

Here's a basic example to obtain bilateral trade between Chile and Argentina in the year 2000 under different trade classifications:
```{r basic-example, eval=FALSE}
sitc_data <- get_data("chl", "arg", 2000, "sitc")
hs92_data <- get_data("chl", "arg", 2000, "hs92")
```

## Code of conduct

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.

## The MIT License

Copyright (c) 2016, Mauricio "Pachá" Vargas

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.