Access this Gist via this shortened URL: https://git.io/vPj49
If anything changes, with regards to the material covered in this course, this will be the first place I share updates.
| library(idbr) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(tidyr) | |
| library(countrycode) | |
| library(gganimate) | |
| library(tweenr) | |
| ctrys <- countrycode(c('South Africa', 'Botswana', 'Lesotho', 'Namibia', 'Zimbabwe', 'Swaziland'), | |
| 'country.name', 'fips104') |
| #This is inspired by this piral animation of the same dataset | |
| #http://www.climate-lab-book.ac.uk/2016/spiralling-global-temperatures/ | |
| #and this R code to produce the animation | |
| #https://gist.github.com/jebyrnes/b34930da0052a86f5ffe254ce9900357 | |
| # It also uses elements of this http://www.r-bloggers.com/making-faceted-heatmaps-with-ggplot2/ | |
| # and this https://rpubs.com/bradleyboehmke/weather_graphic graphic | |
| library(dplyr) | |
| library(tidyr) | |
| library(ggplot2) |
Access this Gist via this shortened URL: https://git.io/vPj49
If anything changes, with regards to the material covered in this course, this will be the first place I share updates.
| airline | voluntary_denied | involuntary_denied | enplaned_ct | involuntary_db_per_10k | year | |
|---|---|---|---|---|---|---|
| Hawaiian Airlines | 326 | 49 | 10824495 | 0.05 | 2016 | |
| Delta Air Lines | 129825 | 1238 | 129281098 | 0.1 | 2016 | |
| Virgin America | 2375 | 94 | 7945329 | 0.12 | 2016 | |
| Alaska Airlines | 6806 | 931 | 23390900 | 0.4 | 2016 | |
| United Airlines | 62895 | 3765 | 86836527 | 0.43 | 2016 | |
| Spirit Airlines | 10444 | 1117 | 19418650 | 0.58 | 2016 | |
| Frontier Airlines | 2096 | 851 | 14666332 | 0.58 | 2016 | |
| American Airlines | 54259 | 8312 | 130894653 | 0.64 | 2016 | |
| Jetblue Airways | 1705 | 3176 | 34710003 | 0.92 | 2016 |
| --- | |
| output: html_document | |
| --- | |
| ```{r, fig.show='hide', include=FALSE} | |
| library(colformat) | |
| x1 <- c("Using R Markdown and the colformats package we can put a sparkbar in | |
| line with the text using inline R code, like this `` `r '\x60r spark_bar(x)\x60'` ``. | |
| Here's a sparkbar showing a histogram of the number of characters | |
| in each word in this text: `r spark_bar(x2)`. And here is a sparkbar |