Skip to content

Instantly share code, notes, and snippets.

@BroaderImpact
Last active February 18, 2023 17:52
Show Gist options
  • Save BroaderImpact/e864decc601b8830403cc56754b948d6 to your computer and use it in GitHub Desktop.
Save BroaderImpact/e864decc601b8830403cc56754b948d6 to your computer and use it in GitHub Desktop.
Assembling Geospatial Data for Interactive Map of Organizations

Assembling Geospatial Data for Interactive Map of Organizations

Coordinating the work of a coalition is difficult on a local level. The problem is further compounded for statewide and national coordination. The need for clear, concise visualization of organizations committed to the cause of IIC was presented by a member organization.

import folium

# Create a map object
map = folium.Map(location=[37.0902, -95.7129], zoom_start=4)

# List of Interfaith Immigration Coalition organizations and their locations
orgs = ["Interfaith Action of Central Texas", "Interfaith Works of Central New York", "Interfaith Worker Justice", "Interfaith Ministries for Greater Houston"]
cities = ["Austin, TX", "Syracuse, NY", "Chicago, IL", "Houston, TX"]

# Loop through the organizations and their cities
for org, city in zip(orgs, cities):
    # Get the latitude and longitude of the city using geocoding
    location = folium.Map(location=city).location
    # Create a marker for the location
    marker = folium.Marker(location=location, popup=org)
    # Add the marker to the map
    marker.add_to(map)

# Display the map
map

By compiling publically available data on member organization HQs, a map was constructed of the dozens of organizations working with the IIC. Interactive map linked here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment