Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
GeoJson
Map
Python
QGIS
Uncategorized

Python Maps

Our guest today is Dr. Adam Symington, the lead data scientist at Geollect. Although now he is known for his impressive geovisualization, built using Python, his professional training is as a computational chemist. After completing his schooling with University of Bath he stuck around to complete postdoc work on the development of machine learning models used to track the movement of atoms within materials. At Geollect, he uses a similarly inspired approach to track the movement of ships using AIS data. Python plays a significant part in this work, and is the driving technology behind his spatial visualization hobby project- PythonMaps.

The Path to Learning Python

Anytime someone new to geospatial asks the greater GIS community what the best skill they can learn to increase their value is, the answer is the same- Python. Highly praised as flexible and easy to learn, Python is an excellent choice for those looking to bolster their resume. Of course, just because a group of computer scientists say Python is easy to learn, does not mean that the process is necessarily intuitive to those learning it as their first programming language. 

Everyone has their preferred style of learning. There are a huge variety of books, tutorials, and full-on web courses designed to teach Python to beginners, many of these resources are even free.

Regardless of which medium you choose, it is important to start from the beginning, and dedicate some time to really understanding the fundamentals of Python.

Internalizing explicit explanations of what is a variable, what is a function, what is an object, etc… lays the groundwork for the more complex concepts ahead, such as defining methods, loops, and arrays. 

Once you are comfortable with your knowledge of the basics, it’s time to start coding. The most important part of your Python journey is to stay excited about what’s next. Find a problem that you find super interesting, and then find as many ways as possible to solve it using Python. The motivation to answer your original question will be essential when it is time to power through the inevitable knowledge gaps and challenges you will encounter in your projects, and when solving real world problems. 

What is PythonMaps?

PythonMaps began as COVID lockdown project, where Dr. Symington was experimenting with creating Python-driven geo visualizations to further his own skills. As time went on, and he developed more expertise, and consequently higher and higher quality maps, he went public. Now you can find his work on Twitter, LinkedIn, and Reddit.  

PythonMaps is the perfect example of why it is valuable to learn Python through personal projects. When there is genuine interest driving a project, it is much easier to find the motivation to learn new technologies and skills to support it. 

Although Python offers thousands of libraries, only four are really used for most PythonMaps projects. These are matplotlib, geopandas, rasterio, and rioxarray.

Matplotlib and geopandas are classic data visualization libraries. Matplotlib’s focus is more on traditional datasets, but it does have a number of mapping functions. You can also check out the Matplotlib Basemap Toolkit API to add additional functionality and context to your creation. Geopandas is a geospatial expansion on the highly popular pandas data science library. It provides functionality to read and write geospatial data into dataframes, as well as a slew of great options for geospatial data analysis, summation, and visualization.

Where the above options are generally geared towards vector data, fear not, there are programmatic options for working with raster data in Python as well. Two useful libraries are rasterio, and rioxarray. Both of these libraries allow the reading and writing of a variety of popular raster formats, rioxarray has the added benefit of explicitly supporting cloud optimized geotiffs (COGs). These libraries can also provide core functionalities like reprojecting, resampling, and masking rasters. 

There are many more data vizualization libraries available, but it is worth keeping in mind that for beginners, the most popular libraries will be the easiest to work with.

This is due to the larger knowledge bank of documentation, and existing troubleshooting conversations on platforms like StackExchange

Having a mission in mind and playing around with these libraries is a great way to get started on producing your own content, but if you need some specific ideas, or a bit more help, Dr.Symington has a number of tutorials here

What Are the Benefits of Mapping with Python? 

In today’s information age, the power of a strong social media presence cannot be underestimated. This does not mean you need to be producing daily, or even weekly content, but it does mean that you should be investing some conscious time and effort into what does go public. Curating a professional online presence pays its own dividends, but even if you don’t get famous, your time will be far from wasted. 

If your goal is fame, great. As you spend some time building up your Python and cartography skills, start thinking about how you want to present your creations, and yourself. Do you want to create a brand, like MapScaping, or would you rather take the personal route and present yourself as your brand, like Joe Morrison?

Building a brand allows you to distance yourself from criticism, and grow the project beyond what you alone can accomplish. On the other hand, making your brand personal may make it easier to attract a following.

It also has the potential to amplify the successes, and failures, that you encounter as there is no buffer between you, your work, and the criticisms of the internet. 

The internet is infamous for harsh criticisms. Behind the safety of a screen, people are more willing to share their unfiltered opinions, but this is not always a bad thing. If you stay open-minded (and have a thick skin), those criticisms can be read as feedback.

Paying attention to negative comments that have some substance to them can show you where you still need to improve, in the same way that praise can tell you what you are doing right. 

If your objective is not fame, then what does the return on investment look like here? Well, as many say, it is about the journey, not the destination. Learning Python and improving your cartography skills can do great things for your career and portfolio. It shows that you can succeed at self-directed learning, and can create value as an independent worker. Being able to communicate effectively is one of the most valuable skill sets in data science, and maps are a classic tool for visual communication. 

Remember to focus your projects on topics you enjoy, and no matter the outcome, it will never be time wasted. 

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.