Twitter bot redrawing extinct animals using US cause of death time series data.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BotInputs
CoD
PhyloPic
.gitignore
D1_0_Process CoD.R
D1_ColorsPatterns.R
D1_Functions.R
D1_RunBot.R
README.md
RunDatasaur.bat

README.md

Datasaurs

Twitter bot redrawing extinct animals using US cause of death time series data.

Marasuchus: 0.82 correlation with US deaths from diseases of the musculoskeletal system and connective tissue (Age 35-44) #rstats pic.twitter.com/lojx2w5H7G

— Datasaurs (@Datasaurs) February 1, 2018
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Getting Started

Datasaurs draws an image by replacing the dorsal outline of an extinct animal with a highly correlated cause of death time series.
Each bot run is randomly generated by sampling 1 of 150 animal images, possibly flipping the drawing's x-values, assigning a random start date to the implied line data series, and filling the chart with a random shade of green.

Prerequisites

This bot run primarily on R using tidyverse packages.
A short Windows batch is scheduled to run every six hours, creating a new post.

Installing

In addition to the files on the GitHub page, you will need to create Twitter app and save the credentials to a file API.csv. See the .gitignore files for more information.

Deployment

The Windows batch file RunDatasaur.bat is two lines telling Windows to run the R script using R 3.4. In future releases, this will be moved to AWS.

Built With

  • R - R
  • tidyverse - Tidyverse packages + ggplot2
  • twitteR - Connect to Twitter through R

Input data

  • Fauna silhoutte png files from PhyloPic.org. Web addresses and artists for each image used by the bot can be found in BotInputs/DatasaurList.csv.
  • United States cause of death data collected from the CDC Wonder database. Queries over various demographics were collected.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

No license. See image URLS in BotInputs/DatasaurList.csv for each image license.

Acknowledgments