import sys
import csv
import urllib2
import pprint

"""
Take status csv file from url and coordinate csv file to create 
data dictionary format and convert that format into geojson type. 
This geojson data can then be loaded into GitHub page to view
using it's mapping component

"""


@@ -44,16 +44,29 @@
  pprint%0A
+import json%0A%0A
 %0A%22%22%22%0ATak
@@ -291,8 +291,1535 @@
 t%0A%0A%22%22%22%0A%0A
+%22%22%22%0AInput data strcture and output data structure (geojson)%0A%0AGiven remote rows from cso_status_data. Data when downloaded from url %0A11TH.CSOSTATUS_N,3%0A30TH.CSOSTATUS_N,3%0A3RD.CSOSTATUS_N,3%0A%0AAnd local cords in the form of%0A%5B%7B'CSO_TagName': 'ALKI', 'X_COORD': '-122.4225', 'Y_COORD': '47.57024'%7D,%0A %7B'CSO_TagName': 'ALSK', 'X_COORD': '-122.40695', 'Y_COORD': '47.55944'%7D,%0A %7B'CSO_TagName': 'MURR', 'X_COORD': '-122.4', 'Y_COORD': '47.54028'%7D,...%5D%0A%0A%0Aformatted_geojson_data_dict = %7B'type':'FeatureCollection','features':%0A%5B%7B'type':'Feature','properties':%7B%7D,'geometry':%7B'type':'Point','coordinates':%5B%5D%7D%7D%5D%7D%0A%0ANEED a Data structure template in python to look like this then convert to  GeoJSON %0A%0A%7B'type':'FeatureCollection%22,%0A  'features': %5B%7B'type': 'Features',%0A                'properties':%7B'CSO_TagName': 'ALKI',%0A                              'Value': 3%7D,%0A                'geometries':%7B'type':'point',%0A                'coordinates':%5B-122.322,%0A                              47.607%5D%7D              %0A                %7D    %0A               %5D   %0A%7D%0A%0A%22%22%22%0A%0A# Downloading csv status values from the web.%0Acso_status_data = urllib2.urlopen(%22http://your.kingcounty.gov/dnrp/library/wastewater/cso/img/CSO.CSV%22)%0A%0A# Read CSV into a list%0Atext = cso_status_data.readlines()%0Acso_status_csv = csv.reader(text)%0Apprint.pprint(cso_status_csv)%0A%0A%0A#Reading CSO with Coordinate in csv file locally and create list, subtitue with full data%0Acso_cord = open('partial_coord.csv', 'r')%0Areader = csv.DictReader(cso_cord)%0Alocation = list (reader)%0Acso_cord.close()%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

add update code