Generate Geo-Coordinates from Street Names CSV (Latitude & Longitude)

Level: Intermediate
Automation
Details
Level
Intermediate
Date
July 12, 2026
Author
Lächelnder Mann mit kurzem braunem Haar und Bart vor orangem Hintergrund.
Jonas Arleth
Blog Post

An AI like ChatGPT can do a lot of work for us that is actually boring and no one wants to do. Here on my channel, I always give you challenges and application examples that came up in my everyday work as a web designer and how I solved them with chat GPT or other AI tools.

In this example, I wanted to integrate a dealer list with over 300 addresses into an interactive map on a customer website. To do this, I needed the respective latitude and longitude coordinates, which I wanted to generate automatically from a CSV file. ChatGPT wrote me the Python code for this.

Step-by-step guide

  1. Open the CSV file with addresses in Numbers on the Mac.
  2. Make sure you use the following column descriptions: “Street,” “Zip Code,” “City,” “Country,” “Latitude,” and “Longitude.”
  3. Open the terminal (enter the Spotlight search on the Mac terminal)
  4. Type: “pip install geopy.” If the code doesn't work, you'll need to install Python first.
  5. Save the code below to a koordinaten.py text file:
  6. Store the file “koordinaten.py” and the “addresses.scv” in a “Script” folder on the desktop on the Mac
  7. In the terminal on the MacBook, enter the following: python3 /users/yourusername/desktop/script/coordinates.pyReplace “your username” with your actual username on the Mac.
  8. Sit back and relax until the ergebnisse.csv is complete. Depending on the number of entries, this may take time.

Code:


From geopy.geocoders import nominatim
Importing csv

geolocator = nominate (user_agent="my-app”)

with open ('adressen.csv', newline=”, encoding='utf-8') as csvfile:
reader = csv.DictReader (csvfile, delimiter='; ')
with open ('ergebnisse.csv', 'w', newline=”, encoding='utf-8') as a result file:
fieldnames = ['street', 'zip code ',' city ',' country ',' latitude ',' longitude ']
writer = csv.dictWriter (resultfile, fieldnames=fieldnames)
writer.writeheader ()
For row in reader:
address = f "{row ['street']}, {row ['zip code ']} {row [' city ']}, {row [' country ']}”
try:
location = geolocator.geocode (address)
writer.writerow ({
'street': row ['street'],
'zip code': row ['zip code '],
'place': row ['location'],
'country': row ['country'],
'latitude': location.latitude,
'length': location.longitude
})
Except:
writer.writerow ({
'street': row ['street'],
'zip code': row ['zip code '],
'place': row ['location'],
'country': row ['country'],
'latitude':”,
'length':”
})

I used the following Promt for Chat GPT:

I have a “adressen.csv” file, which contains a street name, zip code, city and country. I need the latitude and longitude coordinates for each of these addresses.

For this purpose, a new csv file “results” should be created, which lists street name, postal code, city, country, latitude and longitude.

If there is an error with an address, the latitude and longitude fields should simply be left empty.

It has to be a free solution that doesn't require me to sign up anywhere.

Can you help me with that?


More content

Blog Archiv

How Claude Automatically Manages My Webflow CMS (Prompt + Workflow)

How to connect Claude with Webflow and Notion to automate blog posts, translations, and CMS content significantly faster using AI.
Video
Kategorie
Automation
Skill
Beginner

Anschauen
Beitrag anschauen

Connect a Newsletter Form via Webflow Logic (Mailerlite & More)

Build a newsletter signup form and connect it to Mailerlite or other tools using Webflow Logic — no code needed.
Kategorie
Automation

Anschauen
Beitrag anschauen

Multi-Step Forms and Configurators in Webflow (Easy!)

Create impressive multi-step forms and configurators in Webflow using Inputflow — without complex custom code.
Video
Kategorie
Automation
Skill
Intermediate

Anschauen
Beitrag anschauen

Generate Geo-Coordinates from Street Names CSV (Latitude & Longitude)

Learn how to automatically generate latitude and longitude coordinates from an address list using Python — useful for Webflow map integrations.
Video
Kategorie
Automation
Skill
Intermediate

Anschauen
Beitrag anschauen

Publish Webflow Form Submissions Directly via CMS

Learn how to automatically publish Webflow form submissions as CMS items using Make — great for collecting user-generated content.
Video
Kategorie
Automation
Skill
Beginner

Anschauen
Beitrag anschauen

How I Organize My Content as a Web Designer (Notion, etc.)

Jonas shows how he manages his content calendar in Notion — a practical system for web designers who also create content.
Video
Kategorie
Automation

Anschauen
Beitrag anschauen