Publications by Posts | Joshua Cook

Riddler: Can You Track The Delirious Ducks?

13.06.2020

FiveThirtyEight’s Riddler Classic link After a long night of frivolous quackery, two delirious ducks are having a difficult time finding each other in their pond. The pond happens to contain a 3×3 grid of rocks. Every minute, each duck randomly swims, independently of the other duck, from one rock to a neighboring rock in the 3×3 grid — u...

5950 sym R (6245 sym/14 pcs) 12 img

Riddler: Can you solve the not-so-corn maze?

20.06.2020

FiveThirtyEight’s Riddler Express link From Tom Hanrahan, a maze you can solve without getting lost in a field of corn: The number in each box tells you how many spaces up, down, left or right you must move. (No diagonal moves, people.) Starting at the yellow six in the bottom left corner, can you make your way to the asterisk? Plan I can t...

3403 sym R (6529 sym/8 pcs) 6 img

Riddler: Can You Just Keep Turning?

27.06.2020

FiveThirtyEight’s Riddler Express link In Riddler City, the city streets follow a grid layout, running north-south and east-west. You’re driving north when you decide to play a little game. Every time you reach an intersection, you randomly turn left or right, each with a 50 percent chance. After driving through 10 intersections, what is th...

6905 sym R (5847 sym/16 pcs) 9 img

Uncanny X-Men: Bayesian take on Dr. Silge’s analysis

05.07.2020

The other day, Dr. Silge from RStudio posted the screencast and blog post of her #TidyTuesday analysis of the Uncanny X-Men data set from Claremont Run Project. In her analysis, she used logistic regression to model the effect of various features of each comic book issue on the likelihood of the characters to visit the X-Mansion at least once. S...

8697 sym R (10940 sym/13 pcs) 10 img

Riddler: Can You Beat MLB Recods?

18.07.2020

FiveThirtyEight’s Riddler Express link From Taylor Firman comes an opportunity to make baseball history: This year, Major League Baseball announced it will play a shortened 60-game season, as opposed to the typical 162-game season. Baseball is a sport of numbers and statistics, and so Taylor wondered about the impact of the season’s length ...

4571 sym R (3681 sym/9 pcs) 8 img

Colorize black-and-white photos

14.11.2020

DeepAI is a research company that develops a wide variety of deep neural network (DNN) models using the bleeding edge of AI research. For example, they have built models for sentiment analysis of text, nudity detection, artistic style transfer, text summarization, etc. One model that I was particularly interested in using was the Image Colorizati...

3730 sym Python (2317 sym/7 pcs) 14 img 1 tbl

Fitting a spline with PyMC3

14.11.2020

Introduction Often, the model we want to fit is not a perfect line between some $x$ and $y$. Instead, the parameters of the model are expected to vary over $x$. There are multiple ways to handle this situation, one of which is to fit a spline. The spline is effectively multiple individual lines, each fit to a different section of $x$, that are ti...

5437 sym Python (6478 sym/18 pcs) 20 img 2 tbl

Creating a Streamlit web app, building with Docker + GitHub Actions, and hosting on Heroku

24.12.2020

This tutorial is meant to act as a guide for deploying Streamlit applications on Heroku using Docker and GitHub Actions. As a data scientist, Streamlit offers the simplest route from analysis to application by providing an API to create an interactive UI in a normal Python script. We’ll see more about this in the example later on, but there are...

8975 sym Python (2730 sym/18 pcs) 4 img

Xcode Logger Notes

16.02.2021

This post is to primarily serve as a repository for my notes on the Explore logging in Swift video originally presented at WWDC 2020. It provides a general overview of how to use the logging system, then touches on a few specific features to keep in mind. Additional Resources Apple Documentation: Logging: logging documentation homepage Apple Do...

3520 sym Python (1306 sym/9 pcs) 2 img 1 tbl

Conducting a Bayesian analysis with ‘rstanarm’ and publishing with ‘distill’

30.05.2021

This is just a simple post about the tooling for a small project I just wrapped up. For this project, I conducted a Bayesian data analysis and published the analysis to GitHub as a static website. The data analysis portion relied heavily upon the ‘rstanarm’ package and I generated the website using ‘distill’. Below, I discuss both of thes...

6548 sym R (1565 sym/6 pcs) 8 img