-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Using this script
# Batch forward geocode
addresses = [
"1600 Pennsylvania Ave, Washington, DC",
]
batch_response = client.geocode(addresses, fields=["cd"])
for result in batch_response.results:
print(result)
returns data, but no content for districts like the API docs show (name...)
GeocodingResult(address_components=AddressComponents(number='1600', predirectional=None, street='Pennsylvania', suffix='Ave', postdirectional='SE', formatted_street='Pennsylvania Ave SE', city='Washington', county='District of Columbia', state='DC', zip='20003', postal_code=None, country='US'), formatted_address='1600 Pennsylvania Ave SE, Washington, DC 20003', location=Location(lat=38.879222, lng=-76.981981), accuracy=1, accuracy_type='rooftop', source='Statewide (City of Washington)', fields=GeocodioFields(timezone=None, congressional_districts=[CongressionalDistrict(name='Delegate District (at Large)', district_number=98, congress_number='119th', ocd_id='ocd-division/country:us/district:dc/cd:at-large')], state_legislative_districts=None, state_legislative_districts_next=None, school_districts=None, census2000=None, census2010=None, census2011=None, census2012=None, census2013=None, census2014=None, census2015=None, census2016=None, census2017=None, census2018=None, census2019=None, census2020=None, census2021=None, census2022=None, census2023=None, census2024=None, acs=None, demographics=None, economics=None, families=None, housing=None, social=None, zip4=None, ffiec=None, riding=None, provriding=None, provriding_next=None, statcan=None))
What needs to be changed? All addresses I try fail. Using the web browser on the Geocodio api demo works.