Navigation Menu

Skip to content

Commit

Permalink
Adjust column order to reflect CDC page change.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyDB committed Jan 21, 2013
1 parent 7df7c4f commit 2329496
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions fluscrape.py
@@ -1,7 +1,6 @@
import re
import csv
import requests
import cookielib
import simplejson
from bs4 import BeautifulSoup

Expand Down Expand Up @@ -37,7 +36,7 @@ def run(verbose=True):
outwriter = csv.writer(outfile, delimiter=",")
headers = [
'WEEK_NUM', 'WEEK_END', 'HHS_REGION', 'OUTPATIENT_ILI', 'PCT_FLU_POS',
'NUM_JURIS', 'A_H3', 'A_2009_H1N1', 'A_NO_SUBTYPE', 'B', 'PED_DEATHS'
'NUM_JURIS', '2009_H1N1', 'A_H3', 'A_NO_SUBTYPE', 'B', 'PED_DEATHS'
]
outwriter.writerow(headers)

Expand Down Expand Up @@ -70,13 +69,13 @@ def run(verbose=True):
ili = col[1].string
pct = col[2].string.strip('%')
num_juris = col[3].string
a_h3 = col[4].string
a_2009_h1n1 = col[5].string
a_2009_h1n1 = col[4].string
a_h3 = col[5].string
a_no_subtype = col[6].string
b = col[7].string
ped_deaths = col[8].string
parsed_row = (
week_num, week_end, region, ili, pct, num_juris, a_h3, a_2009_h1n1,
week_num, week_end, region, ili, pct, num_juris, a_2009_h1n1, a_h3,
a_no_subtype, b, ped_deaths
)
if verbose:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
@@ -1,3 +1,3 @@
beautifulsoup4==4.1.3
mechanize==0.2.5
simplejson==2.6.2
beautifulsoup4>=4.1
simplejson>=3.0
requests>=1.0

0 comments on commit 2329496

Please sign in to comment.