/'\_/`\ __ /\ \ /\ _ \
/\ \ __ _____ _____ /\_\ ___ __ \ \ \ \ \ \L\ \
\ \ \__\ \ /'__`\ /\ '__`\/\ '__`\/\ \ /' _ `\ /'_ `\ \ \ \ __\ \ __ \
\ \ \_/\ \/\ \L\.\_\ \ \L\ \ \ \L\ \ \ \/\ \/\ \/\ \L\ \ \ \ \L\ \\ \ \/\ \
\ \_\\ \_\ \__/.\_\\ \ ,__/\ \ ,__/\ \_\ \_\ \_\ \____ \ \ \____/ \ \_\ \_\
\/_/ \/_/\/__/\/_/ \ \ \/ \ \ \/ \/_/\/_/\/_/\/___L\ \ \/___/ \/_/\/_/
\ \_\ \ \_\ /\____/
\/_/ \/_/ \_/__/
A python wrapper for accessing the Mapping L.A. API.
Mapping L.A. is the Los Angeles Times’ resource for boundaries, demographics, schools, and news in Los Angeles County. With this API, you can quickly retrieve the boundaries of neighborhoods and regions in KML, KMZ or GeoJSON format.
The code owes a lot to the fine work on python-sunlightapi and python-nytcongressapi.
A demonstration of the API in action can be found in latimes-mappingla-redirect.
Get it going
>> from mappingla import mappingla
Retrieve all neighborhoods or regions
>> hood_list = mappingla.neighborhoods.all()
>> print hood_list[0].name
Acton
>> region_list = mappingla.regions.all()
Retrieve a neighborhood or region using its slug
>> dtla = mappingla.neighborhoods.get(slug='downtown')
>> westside = mappingla.regions.get(slug='westside')
Find the neighborhood or region that contains a pair of coordinates
>> mappingla.neighborhoods.get(lat=34.053, lng=-118.245)
<Neighborhood: Downtown>
>> mappingla.regions.get(lat=34.053, lng=-118.245)
<Region: Central L.A.>
Retrieve the boundaries of a neighborhood or region in KML, GeoJSON or KMZ format
>> dtla.kml
...
>> dtla.json
...
>> dtla.kmz
...
>> westside.kml
...
>> westside.json
...
>> westside.kmz
...