This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(babynames) | |
library(tidyverse) | |
library(scales) | |
theme_set(theme_bw()) | |
################################################################################ | |
## Tweets Day 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(shades) | |
n_rectangles <- 10000 | |
rect_scale_factor <- 1.5 | |
canvas_size <- 100 | |
xlims <- c(0, canvas_size) | |
ylims <- c(0, canvas_size) | |
height <- 2 | |
width <- 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chris Riederer | |
# 2020-05-28 | |
# Make radial plot of baby's sleep times. | |
# To get data, make sure pip is installed. Then: | |
# pip install snoo | |
# snoo sessions --start START_DATE --end END_DATE > all_snoo_sessions.csv | |
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chris Riederer | |
# 2020-05-24 | |
"""Visualize Baby's snoo data.""" | |
import datetime | |
import pandas as pd | |
from plotnine import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Print out text of emails from MBox file.""" | |
from collections import Counter | |
import mailbox | |
import sys | |
import re | |
mbox = mailbox.mbox("friends-001.mbox") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chris Riederer | |
# 2019-06-27 | |
"""Toy experiment with reinforcement learning.""" | |
from collections import Counter | |
import random | |
import time | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2019-06-24 | |
# Python 3 plz | |
"""What would the result of a ranked choice election be given the data from | |
Data For Progress's survey? | |
https://www.dataforprogress.org/blog/2019/6/24/who-else-are-the-major-candidates-supporters-considering | |
http://filesforprogress.org/datasets/june_19_omni/ | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chris Riederer | |
# 2019-02-28 | |
# When should you invest your 401k? | |
library(quantmod) | |
library(dplyr) | |
library(ggplot2) | |
# Pull in S&P data from Yahoo Finance | |
getSymbols("^GSPC", src="yahoo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chris Riederer | |
# 2017-03-21 | |
# Look at election's impact on stock market | |
library("MASS") | |
library(quantmod) | |
library(dplyr) | |
library(ggplot2) | |
# Pull in S&P data from Yahoo Finance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
NewerOlder