Created
December 8, 2014 03:47
-
-
Save pmallory/f89bceacb8c55d158728 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# coding: utf-8 | |
import csv | |
from collections import Counter | |
from pprint import pprint | |
with open('./440801.csv') as f: | |
# data from | |
obs = [] | |
csv = csv.DictReader(f) | |
for line in csv: | |
obs.append(line) | |
temps = Counter() | |
for date in obs: | |
mint = .18*int(date.get('TMIN'))+32 | |
maxt = .18*int(date.get('TMAX'))+32 | |
for temp in range(0,100): | |
if mint < temp < maxt: | |
temps[temp] += 1 | |
print temps.most_common(1)[0][1]/float(len(obs)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment