Each month, a random Locke Data follower wins a book! See it for yourself in this Twitter moment, and follow Locke Data if you want to try and win a book next month!
Winners have always been sampled via R ( twitteR
and now rtweet
). Since 2018/03, the winner is announced with a fun R viz as well! This repo contains the code for such visualizations.
Now gifski
is on CRAN! But gganimate
's latest version isn't.
This code cannot be run in RStudio cf rstudio/rstudio#2919
# devtools::install_github("thomasp85/gganimate")
# or fetch the artifact from https://ci.appveyor.com/project/thomasp85/gganimate/build/artifacts
# devtools::install_github("lockedata/twitterbookdraw")
# draw winner
winner <- twitterbookdraw::draw_winner()
# prepare tweet text
book <- 'Weapons of math destruction'
book_url <- "http://geni.us/mathdestruction"
twitterbookdraw::announce_winner(winner, book, book_url)
# save gif as "destruction.gif"
# a folder called august_frames will be created
# and then deleted
twitterbookdraw::show_august_winner(winner = winner, path = "destruction.gif")
Install gifski from https://github.com/r-rust/gifski or if you're on Windows grab the pre-compiled binary at https://ci.appveyor.com/project/jeroen/gifski/build/artifacts
# devtools::install_github("lockedata/twitterbookdraw")
# draw winner
winner <- twitterbookdraw::draw_winner()
# prepare tweet text
book <- 'SQL Cookbook'
book_url <- "http://geni.us/sqlcookbook"
twitterbookdraw::announce_winner(winner, book, book_url)
# save gif as "june.gif"
twitterbookdraw::show_july_winner(winner = winner, path = "july.gif")
# devtools::install_github("lockedata/twitterbookdraw")
# draw winner
winner <- twitterbookdraw::draw_winner()
# prepare tweet text
book <- 'An Introduction to Statistical Learning: with Applications in R'
book_url <- "http://geni.us/introtostatslearning"
twitterbookdraw::announce_winner(winner, book, book_url)
# save gif as "june.gif"
twitterbookdraw::show_june_winner(winner = winner, path = "june.gif")
That month's creation was also described more thoroughly in a blog post, "A particles-arly fun book draw".
@SQLBob won @juliasilge and @drob fantastic book on NLP https://t.co/DEM04WY9W4! π Bob, DM us!
β Locke Data (@LockeData) 1 de maig de 2018
"Bag of followers" code https://t.co/L20gPDzLj6 thanks to @thomasp85's particles #rstats package pic.twitter.com/GybtPcfMMI
The winner π of our March Book π giveaway is @sqlStride!
β Locke Data (@LockeData) 2 dβabril de 2018
Simon, you've won a copy of Dear Data - DM us so we can get your address
π: https://t.co/wQvFeiesaT
π© π»: https://t.co/UZT0o5VoUv pic.twitter.com/zmCrQwT4ZL
This month's book π winner is @kevbros93! π
β Locke Data (@LockeData) 1 de marΓ§ de 2018
Kevin, DM us to give us your address :)https://t.co/ZPfNzJlrdD pic.twitter.com/zc0IePm96q