Poland to Hungary by Bicycle

The story behind and the open sourced code to display your routes with Python.

My Love Story with Bikes

I discovered a long time ago that biking was a fantastic way to explore new places.

It incorporates route planning, field orientation, physical activity, and yes, it is a sustainable and highly effective mode of transportation.

Also, two-wheel machines generate very interesting mechanical behaviors that I had the chance to study and model during my engineering studies.

Trip Motivation

This year I got an invitation to assist Formula 1 in Budapest with a few friends.

Since it was early in the first quarter, the geopolitical landscape was not entirely clear, so I pondered whether taking a flight would be the best option.

Then, one afternoon, I had the thought: Let’s plan a bike trip to Budapest if you’re not sure that planes will work, get yourself there on your own strength.

Setting off on the Bike Adventure

My journey began in Poland, and the first stage of the trip took me through the breathtaking Tatra Mountains. As I cycled along the mountainous terrain, I marveled at the stunning landscapes and crisp, fresh air that surrounded me.

Discovering Slovakia

One of my most memorable nights was spent in Kremnica, where I stayed beside a flowing river. The soothing sounds of the water lulled me to sleep, leaving me feeling refreshed and energized for the next day’s ride.

As I continued my journey, I had the opportunity to explore an ancient volcano in Banská Štiavnica. The fascinating geological site added an element of adventure to my trip and provided a unique insight into the region’s history.

In the town of Devičie, I was treated to genuine local hospitality. I bonded with fellow guests, and one of them, a singer, delighted us all with a surprise performance after dinner. The warm atmosphere and friendly company made for a memorable evening.

Along the way, there were ancient castles, like this one in Kremnica (Slovakia): Kremnica Castle

Crossing the Danube

My journey took me to the banks of the Danube River, where I caught a boat at Visegrád just in time. The experience of crossing the mighty Danube, with its stunning scenery and historical significance, was truly remarkable.


The Final Stretch to Budapest

With renewed determination, I pedaled the remaining distance to Budapest, where my friends eagerly awaited my arrival. We celebrated my accomplishment with a delicious lunch and a rejuvenating session at a thermal bath, the perfect way to relax and unwind before attending the Formula 1 Grand Prix (unfortunately, not as a driver) the following day.

It was an adventure filled with challenges, breathtaking scenery, and unforgettable experiences. It not only allowed me to explore three countries on my own terms, but also taught me valuable lessons about perseverance, adaptability, and the importance of connecting with others along the way. As I look back on this incredible journey, I am grateful for the memories and the people I met along the way, and I can’t wait for my next cycling adventure.

At this point, you might be wondering, how does this all relate to code and open source?

The Route - Poland to Hungary

After the route, I was wondering if there were any tools to analyze the .GPX files that I was saving during the trip.

I found a couple of libraries (gpxpy, folium) that could be combined and generate the desired output.

Thanks to them and the code that I made available below, we can see the route that I followed:

Also, the elevation profile of the route:

As well as the cumulative elevation that we have been climbing:

The adventure: What now?

After this experience, I have decided that I will connect this route from the Nort - From Tallin (Estonia) and to the South (Athens) in the upcoming years.

That will require some conditioning training, that certainly will give me new ideas connected with Data Analysis applied for bikepacking, that I will be posting very soon.

Code: Next Steps

Curious to know how to plot your GPX files in Python?

I have created this repository where I uploaded the files that are generating this map.

For this you just need to use: pandas, gpxpy and folium libraries!

Try me with Google Colaboratory

If you have a Google account, you can run this code by uploading the .GPX file of the route that you want to visualize and avoid any installation in your computer.

Google Colab