Visualizing the Pope’s Itinerary in Lisbon Using Python and ChatGPT
I live in Lisbon, which is not exactly a super big city it has
approximately three million inhabitants
and the Pope is coming to visit on this from the 2nd of August to the 6th and that means an increase in about a million people who are going to be coming to Lisbon to see the Pope.
The introvert in me thought: “Oh no! Crowds!”
In this article, I will share how I built a simple interactive visualization tool to avoid the crowds using Python and ChatGPT
Automating Crowd Avoidance
The programmer in me looked at this situation and thought, okay so
how can we automate staying away from the hot spots where you know the Pope will visit?
The solution I found was to write a little interactive map in HTML (exported from Python) that essentially helps me visualize where the Pope is going to be and split it by days so that I know the areas to avoid when I’m walking around Lisbon.
What did I do?
I copied all the itinerary from the official press release and then I threw that into ChatGPT to get some code to structure that into a panda’s dataframe:
# Importing required libraries
import pandas as pd
from datetime import datetime
# Provided text
text = """
Wednesday, 2 August
Rome – Lisbon
07:50 Departure by airplane from Rome/Fiumicino International Airport to Lisbon
10:00 Arrival at Figo Maduro Air Base in Lisbon
10:00 Official Welcome
10:45 Welcome Ceremony at the main entrance of “Palácio Nacional de Belém”
11:15 Courtesy Visit to the President of the Republic at “Palácio Nacional de Belém”
12:15 Meeting with the Authorities, Civil Society and the Diplomatic Corps in the Cultural Centre of Belém
16:45 Meeting with the Prime Minister at the Apostolic Nunciature
17:30 Vespers with Bishops, Priests…