Skip to content

Instantly share code, notes, and snippets.

@davidbradway
davidbradway / .block
Last active February 9, 2018 19:37 — forked from mbostock/.block
Lab Notebook Meta-data. A look at prices charged at the Duke University Bookstore over 20 years.
license: gpl-3.0
@davidbradway
davidbradway / used_leaf.csv
Last active October 5, 2018 20:47
This is a list of used Leaf cars pulled from CarMax on Oct 5th 2018
Year Model Price Mileage Dealer City State Transfer Fee Stock #
2013 S 7998 53 Pleasanton Pleasanton CA 949 16298916
2011 SL 7998 83 West Sahara Las Vegas NV 799 16260846
2011 SL 7998 71 Ontario Los Angeles CA 949 16287068
2011 SL 8599 44 Serramonte San Francisco CA 949 15868010
2011 SL 8599 43 Clackamas Clackamas OR 999 16338496
2011 SL 8599 48 LAX Los Angeles CA 949 16529550
2012 SV 8599 60 Henderson Las Vegas NV 799 16260281
2011 SV 8599 50 Sacramento/Roseville Roseville CA 949 16298061
2012 SL 8998 54 Henderson Las Vegas NV 799 16111897
import pandas as pd
import matplotlib.pyplot as plt
# Import Data
data = pd.read_csv('scrubbed.csv')
data.head()
#Prepare "shapes" column for donut plot entry
shapes = data['shape'].value_counts(normalize=True) * 100
Keys = shapes.keys().to_list()
# conda create -n pd python
# (source) conda activate pd
# conda install pandas
# conda install matplotlib
# remove pd environment
import json
import os
import datetime as dt
import pandas as pd