How to create a Twitter bot using R

Last week, I decided to kill an afternoon by creating a Twitter bot. Why? Mostly, I was procrastinating on revisions for a manuscript and looking for a small R project to practice my programming skills. Creating a Twitter bot seemed like a great option: Bots can follow other users, retweet content from others, or post original content, and all of this is basically controlled by a script(s). This project is surprisingly easy: If you’re familiar with R (e.

EDA: Chicago red light camera violations

Chicago red light camera violations In this post, I walk through a simple exploratory data analysis of red light camera violations in Chicago. Data import Data downloaded from the Chicago Data Portal. library(tidyverse) library(modelr) (red_light_raw <- read_csv("2019-04-28_chi-red-light.csv")) # A tibble: 466,107 × 10 INTERSECTION CAMERA ID ADDRESS VIOLATION DATE VIOLATIONS X COORDINATE <chr> <dbl> <chr> <chr> <dbl> <dbl> 1 IRVING PARK … 2763 4700 W … 04/09/2015 4 NA 2 VAN BUREN AN… 2054 2400 W … 04/14/2015 5 NA 3 115TH AND HA… 2552 11500 S… 04/08/2015 5 NA 4 IRVING PARK … 2764 4700 W … 04/19/2015 4 NA 5 ELSTON AND I… 1503 3700 W … 04/23/2015 3 NA 6 31ST AND CAL… 2064 2800 W … 09/14/2014 3 NA 7 31ST AND CAL… 2064 2800 W … 12/16/2014 1 NA 8 31ST AND CAL… 2064 2800 W … 01/30/2015 4 NA 9 115TH AND HA… 2552 11500 S… 03/28/2015 14 NA 10 WENTWORTH AN… 2261 5500 S … 04/06/2015 11 NA # … with 466,097 more rows, and 4 more variables: Y COORDINATE <dbl>, # LATITUDE <dbl>, LONGITUDE <dbl>, LOCATION <chr> These data reflect the daily volume of violations created by the City of Chicago Red Light Program for each camera since July 1, 2014.

First TidyTuesday submission

It’s been quite some time since I’ve written here, so I thought I would use one my of 2019 #rstats goals as an excuse to brush off the dust. In this post, I write about my first #tidytuesday submission of the Economist’s “TV’s golden age is real” data set (original #tidytuesday code here). I also make a few improvements to some of the graphs and add tables with the gt package.

First post!

Hello, world! Thanks for taking the time to read my first blog post! While I am trained as a social psychologist, I’m a big proponent of leveraging data science tools to understand the world around us. Thus, I plan to discuss a mixture of data-driven topics and insights here. I hope to use this blog as a place to write about things that interest me, but focus will likely be on statistics, research methods, open science, social psychology, and data science.