Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ebedthan/tidygapminder

The tidygapminder repository
https://github.com/ebedthan/tidygapminder

gapminder r r-package

Last synced: about 1 month ago
JSON representation

The tidygapminder repository

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# tidygapminder

[![Build Status](https://travis-ci.org/Ebedthan/tidygapminder.svg)](https://travis-ci.org/Ebedthan/tidygapminder)
[![codecov](https://codecov.io/gh/Ebedthan/tidygapminder/branch/master/graph/badge.svg)](https://codecov.io/gh/Ebedthan/tidygapminder)
[![Build status](https://ci.appveyor.com/api/projects/status/01ss9tmkw5jyaqfu?svg=true)](https://ci.appveyor.com/project/Ebedthan/tidygapminder)
![](http://cranlogs.r-pkg.org/badges/grand-total/tidygapminder)
![](https://www.r-pkg.org/badges/version-ago/tidygapminder)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

tidygapminder is designed to make easy to tidy data retrieved from [Gapminder](https://www.gapminder.org). Learn more in `vignette("tidygapminder")`.

## Installation

You can install the released version of tidygapminder from [CRAN](https://CRAN.R-project.org) with:

```{r, eval = FALSE}
install.packages("tidygapminder")
```

And the development version from [GitHub](https://github.com/) with:

```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("ebedthan/tidygapminder")
```
## Example

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

```{r example-1}
library(tidygapminder)

# From ----------------------------------
df <- readxl::read_xlsx(system.file("extdata", "agriculture_land.xlsx", package = "tidygapminder"))

df

# To ------------------------------------
file <- system.file("extdata", "agriculture_land.xlsx", package = "tidygapminder")

tidy_indice(file)
```

Or more powerful:

```{r example-2}

# From ----------------------------------------

path <- system.file("extdata", package = "tidygapminder")

list.files(path)

df

df_ <- data.table::fread(system.file("extdata", "life_expectancy_years.csv", package = "tidygapminder"))

df_

# To ------------------------------------------

tidy_bunch(dirpath = path, merge = TRUE)

```

Enjoy `r emo::ji("smile")` !!!