I explicitly use this package to teach data cleaning, so have refactored my old cleaning code into several scripts. I also include them as compiled Markdown reports. Caveat: these are realistic cleaning scripts! Not the highly polished ones people write with 20/20 hindsight :) I wouldn't necessarily clean it the same way again (and I would download more recent data!), but at this point there is great value in reproducing the data I've been using for ~5 years.
Cleaning history
- 2010: The first time I documented cleaning this dataset. I started with delimited files I exported from Excel. Not present in this repo.
- 2014: I re-cleaned the data and (mostly) forced myself to pull it straight out of the spreadsheets. Used the
gdata
package. It was kind of painful, due to encoding and other issues. See the scripts in this state in v0.1.0. - 2015: I revisited the cleaning and switched to
readxl
. This was much less painful. Present day.
## + ggplot2 2.2.1 Date: 2017-10-31
## + tibble 1.3.4 R: 3.4.1
## + tidyr 0.7.1 OS: macOS Sierra 10.12.6
## + readr 1.1.1 GUI: X11
## + purrr 0.2.3.9000 Locale: en_CA.UTF-8
## + dplyr 0.7.4 TZ: America/Vancouver
## + stringr 1.2.0.9000
## + forcats 0.2.0
## ── Conflicts ────────────────────────────────────────────────────
## * filter(), from dplyr, masks stats::filter()
## * lag(), from dplyr, masks stats::lag()
## here() starts at /Users/jenny/rrr/gapminder