README.md

cwdata2

R build
status

The goal of cwdata2 is to provide datasets and functions for use in the ETC5523 ‘Communicating with Data’ course.

Installation

The development version can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("prigrecov/cwdata2")

Example

This is a basic example which shows you how to solve a common problem:

library(cwdata2)
library(tibble)
key_crop_yields
#> # A tibble: 143,825 x 5
#>    country     code   year crop     tonnes_per_hectare
#>    <chr>       <chr> <dbl> <chr>                 <dbl>
#>  1 Afghanistan AFG    1961 wheat                  1.02
#>  2 Afghanistan AFG    1961 rice                   1.52
#>  3 Afghanistan AFG    1961 maize                  1.4 
#>  4 Afghanistan AFG    1961 soybeans              NA   
#>  5 Afghanistan AFG    1961 potatoes               8.67
#>  6 Afghanistan AFG    1961 beans                 NA   
#>  7 Afghanistan AFG    1961 peas                  NA   
#>  8 Afghanistan AFG    1961 cassava               NA   
#>  9 Afghanistan AFG    1961 barley                 1.08
#> 10 Afghanistan AFG    1961 cocoa                 NA   
#> # … with 143,815 more rows
n_countries(key_crop_yields)
#> [1] 249


prigrecov/cwdata2 documentation built on Dec. 31, 2020, 2:06 a.m.