Introduction:
Geocoding is the process of converting place names, such as cities, into geographic coordinates. This technique is incredibly useful in Digital Arts and humanities for visualizing spatial data, mapping historical events, or, in the case of my midterm, compiling geographic coordinates given a data set that only lists the names of cities. For my midterm, I wanted to work with the Tate Artists dataset and use their places of death along with their works of art to display a map that could be used to interrogate similarities between the artwork of artists who may have died in the same area. Given the dataset only had the names of the cities and the tool I was using for my visualization, flourish, needed the geographic coordinates, and doing each of the hundreds of rows by hand would be not only difficult but extremely time-consuming I looked for ways to automate the task and this is what I came across. The most helpful source when it came to both learning how and doing this was Video about Geocoding with Python GeoPandas. Some other helpful resources include Folium and GeoPy.
Step 1: Download Python and Install Libraries
If you don’t have Python installed already proceed to python.org and download it. The first real step in the process is installing the required libraries. The ones we will need are pandas, geopy, and openpyx. You can install these libraries using the terminal or command line. For this example, I’ll use the Command Prompt on Windows, but things such as Terminal on mac are also fine.

Step 2: Organize your Data Set In Excel or Sheets
For our purposes, you must organize your data into an Excel sheet and take note of the name of the collum where the city name information is located. For this example, the file will be downloaded to my “Downloads” folder and make sure to take note of the name of the file as well.

Step 3: Write / Copy the Python Script
This next step involves opening a text editor, in this case, Notepad, and writing/ copying the following Python script incorporating the correct names of your columns and files. For this example, I will label them with what to fill in and highlight those places as well. Ensure that you save the file as a .py and into your downloads.

Step 4: Running the Script
The next step in the process is running the script. With both the original Excel and the Python file saved to your downloads go back to your command prompt and run the script by typing in the following. I blacked out my user but make sure the same one at the beginning is in the one highlighted next to Downloads.

Step 5: Check The Results
In order to find your finished product navigate to your downloads folder and you should find a new Excel file with a latitude and longitude column and with that open it up and compare it to your previous file to ensure that everything is uniform and the same and you should have a file with the coordinates.

This is such a cool and practical tutorial—thanks for sharing! I love how you explained geocoding in such a clear and approachable way, especially with how it connected to your midterm project. Automating something as tedious as finding coordinates for hundreds of cities is such a game changer, and I can totally see how this could be super useful for so many different DGAH projects. Your step-by-step breakdown makes the whole process feel really doable, even for someone who’s newer to Python. Definitely bookmarking this for the future!
Hi! Your tutorial provides a clear, structured guide to automating the geocoding process using Python. The step-by-step breakdown makes it easy to follow, and I love how you highlight key details like organizing data, installing libraries, and running the script. It’s a real time-saver for handling large datasets efficiently. Great job making geocoding accessible and beginner-friendly!
I actually didn’t know how to automate geocoding at first, so for my midterm, I manually looked up the coordinates for each city. It was a huge time-sink, especially with so many cities to handle. After learning about this method, I realized how much easier it could have been, and now I’m definitely using it in the future!