Git Product home page Git Product logo

cites's Introduction

CircleCI

cites

Authors: Noam Ross

The cites package provides a complete extract of the CITES wildlife trade database.

Installation

Install the cites package with this command:

source("https://install-github.me/ecohealthalliance/cites")

Usage

The main function in cites is cites_data(). This returns the main CITES database as a dplyr tibble.

cites makes use of datastorr to manage data download. The first time you run cites_data() the package will download the most recent version of the database (~32MB). Subsequent calls will load the database from storage on your computer.

The CITES database is stored as an efficiently compressed .fst file, and loading it loads it a a remote dplyr source. This means that it does not load fully into memory, but can be filtered and manipulated on-disk. If you wish to manipulate it as a data frame, simply call dplyr::collect() to load it fully into memory, like so:

all_cites <- cites_data() %>% 
  collect()

Note that the full database will be approximately 270 MB in memory.

cites_codes() returns a data frame with descriptions of the codes in the various columns of cites_data(). This is useful for lookup or joining with the main data for more descriptive outputs. The ?cites_code help file also has a searchable table of these codes. cites_metadata() provides field descriptions and cites_parties() lists the CITES party countries and the date they joined the treaty.

See the developer README for more on the data-cleaning process.

About

Please give us feedback or ask questions by filing issues

cites is developed at EcoHealth Alliance. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

http://www.ecohealthalliance.org/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.