Skip to content

Instantly share code, notes, and snippets.

@psthomas
psthomas / .block
Last active November 16, 2017 04:19
Zoomable log-log scatterplot
scrolling: yes
height: 600
@psthomas
psthomas / .block
Last active November 16, 2017 04:28
Zoomable Scatterplot
height: 600
scrolling: yes
@psthomas
psthomas / README.md
Last active November 16, 2017 04:45
My Mental Model of the World

This visualization shows my approach to thinking about the world, which is further explained here. I also came up with a way to sample from joint probability distributions for this post, which is further explained here.

@psthomas
psthomas / voting_wisconsin.ipynb
Last active November 16, 2017 05:19
Code for my blog post looking at a variety of ways to visualize presidential election results. https://pstblog.com/2016/12/08/presidential-election
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psthomas
psthomas / oecd_services_1990_2010.ipynb
Last active November 16, 2017 05:24
A notebook looking at the relationship between social services spending and health outcomes across the OECD: https://pstblog.com/2016/11/20/social-services
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psthomas
psthomas / README.md
Last active January 7, 2018 05:33
Presidential Voter Turnout and Margins by County, 2004-2016

This scatter plot shows voter turnout and margins by county for the 2004-2016 presidential elections.

This visualization includes a search feature to allow users to filter by state or county, an option to explore "what-if" scenarios by clicking and dragging counties, and an option to weight the county bubble sizes by a variety of metrics.

More info here: https://pstblog.com/2017/06/05/national-election-vis.

@psthomas
psthomas / main.py
Last active January 1, 2019 18:50
Code for scraping temperature images from weatherspark.com, and counting pixels with Pillow.
import requests
import os
import csv
from PIL import Image
from bs4 import BeautifulSoup
import time
import json
import shutil
@psthomas
psthomas / bandit.ipynb
Last active September 16, 2020 21:48
A Jupyter Notebook taking a look at the multi-armed bandit problem.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psthomas
psthomas / microcovid.ipynb
Last active September 16, 2020 22:17
Comparing microcovid estimated infections to seroprevalence studies
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.