Skip to content

Instantly share code, notes, and snippets.

@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 / HadCRUT.4.5.0.0.monthly_ns_avg.tsv
Last active November 16, 2017 03:48
A Polar Coordinate Climate Change Visualization
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
1850/01 -0.702 -0.758 -0.627 -0.892 -0.513 -1.051 -0.354 -0.899 -0.501 -1.102 -0.299
1850/02 -0.281 -0.334 -0.214 -0.470 -0.093 -0.622 0.059 -0.478 -0.078 -0.673 0.117
1850/03 -0.732 -0.797 -0.681 -0.935 -0.530 -1.009 -0.455 -0.943 -0.519 -1.080 -0.382
1850/04 -0.569 -0.628 -0.503 -0.773 -0.365 -0.824 -0.314 -0.785 -0.356 -0.904 -0.237
1850/05 -0.326 -0.382 -0.277 -0.521 -0.131 -0.591 -0.061 -0.531 -0.126 -0.662 0.005
1850/06 -0.212 -0.272 -0.156 -0.402 -0.022 -0.436 0.013 -0.414 -0.016 -0.515 0.085
1850/07 -0.128 -0.188 -0.075 -0.316 0.059 -0.392 0.135 -0.325 0.066 -0.457 0.199
1850/08 -0.232 -0.283 -0.182 -0.419 -0.046 -0.540 0.075 -0.425 -0.038 -0.595 0.132
1850/09 -0.435 -0.487 -0.384 -0.642 -0.227 -0.739 -0.131 -0.650 -0.220 -0.808 -0.063
1850/10 -0.452 -0.506 -0.390 -0.660 -0.244 -0.719
@psthomas
psthomas / gbd_stacked.ipynb
Last active December 22, 2016 20:55
IPython notebook exploring some additions to the Global Burden of Disease Study. https://pstblog.com/2016/09/28/gbd-additions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psthomas
psthomas / explore-individuals.ipynb
Last active December 22, 2016 20:51
A further analysis of the IGM Experts forum data, focusing on individual characteristics. http://pstblog.com/2016/08/23/individual-chars
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psthomas
psthomas / explore.ipynb
Last active December 22, 2016 20:49
Code for scraping and exploring data from the IGM Experts Forum. http://pstblog.com/2016/08/16/explore-igmforum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / Dockerfile
Created May 13, 2016 02:40 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@psthomas
psthomas / .block
Last active November 16, 2017 04:00
Stacked chart using d3.js
scrolling: yes
border: yes