Skip to content

Instantly share code, notes, and snippets.

@defiantShaun
Forked from keum/Import CSV file from URL
Created September 17, 2013 18:48
Show Gist options
  • Save defiantShaun/6598904 to your computer and use it in GitHub Desktop.
Save defiantShaun/6598904 to your computer and use it in GitHub Desktop.
#Import CSV file from URL that has latest CSO status with location names and status
#This script only displays on the screen. Need to create list data into a file format.
import csv
import urllib
#URL address that contains cso status with location name. This includes king county and SPU's data
url = "http://your.kingcounty.gov/dnrp/library/wastewater/cso/img/CSO.CSV"
webpage = urllib.urlopen(url)
datareader = csv.reader(webpage)
#Creating empty list to be inserted.
data = [ ]
for row in datareader:
data.append(row)
#this is an edit to test forking (not as dirty as it sounds).
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment