<jupyter_start><jupyter_text>Universal Geocoder SampleThis is a sample test of the Seattle Universal Geocoder. Instructions:1. Import universal_geocoder.py and 2. Call universal_geocoder.geocode(latitude,longitude)3. Returns a list with the following location values:        * 0 - Informal Neighborhood Short Name    * 1 - Informal Neighborhood Long Name    * 2 - Council District    * 3 - Zip Code    * 4 - Urban Village    * 5 - Block Group    * 6 - Geographical Area<jupyter_code>import universal_geocoder
import pandas as pd
# load the coordinates
df_Origins = pd.read_csv('V:\Asset Management Program\Data Science\Geographies\\SeattleCensusBlocksandNeighborhoodCorrelationFile.csv')
print (df_Origins.head())
#print (df_trip)
Location = []
geocode = []
NeighborhoodShort = []
NeighborhoodLong = []
CouncilDistrict = []
ZipCode = []
UrbanVillage = []
BlockGroup = []
GeographicalArea = []
Latitude = []
Longitude = []

for index, row in df_Origins.iterrows():
    
    geocode = universal_geocoder.geocode(float(row['CT_LAT']),float(row['CT_LON']))
    #print (geocode)
    
    Location.append(row['BLOCKGROUP'])
    NeighborhoodShort.append(geocode[0])
    NeighborhoodLong.append(geocode[1])
    CouncilDistrict.append(geocode[2])
    ZipCode.append(geocode[3])    
    UrbanVillage.append(geocode[4])    
    BlockGroup.append(geocode[5])
    GeographicalArea.append(geocode[6])
    Longitude.append(row['CT_LON'])    
    Latitude.append(row['CT_LAT'])


df_geo = pd.DataFrame()
df_geo['location'] = Location
df_geo['neighborhood_short'] = NeighborhoodShort
df_geo['neigbhorhood_long'] = NeighborhoodLong
df_geo['council_district'] = CouncilDistrict
df_geo['zipcode'] = ZipCode
df_geo['blockgroup'] = BlockGroup
df_geo['urban_village'] = UrbanVillage
df_geo['geographical_area'] = GeographicalArea
df_geo['latitude'] = Latitude
df_geo['longitude'] = Longitude

df_geo.to_csv("V:\\Asset Management Program\\Data Science\\Data\\Blockgroup_geocode.csv", mode='w', header=True, index=False)
print (df_geo.head())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12359550561797752, 'fraction_numerical': 0.008304836345872008, 'mean_word_length': 5.320987654320987, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654176', 'license': 'MIT', 'n_tokens_mistral': 714, 'n_tokens_neox': 674, 'n_words': 130, 'path': 'notebooks/universal_geocoder_sample.ipynb', 'repo_name': 'amandalynne/Seattle-Mobility-Index', 'size': '2047'}