Easy Map Boundary Extraction with GeoPandas | by Lee Vaughan | Jan, 2025

Editor
1 Min Read


QUICK SUCCESS DATA SCIENCE

How to visualize country borders with Python

A colorful cartoon of a surgeon carefully using tweezers to extract a map border from a map of Europe. The border looks like a piece of thread.
Extracting a border imagined by DALL-E3

I recently came across a geography game where you’re shown a segment of border between countries and asked to name them. Here’s an example; can you guess the two countries that share this border?

A simple red line depicts the border between the USA and Mexico.
Guess this famous “open” border (by the author)

Here’s another “open” border. What’s the country to the north?

A simple red line depicts the border between the USA and Canada.
Guess the border (by the author)

What countries share this super long border:

A simple red line depicts the border between Chile and Argentina.
Name that border! (by the author)

Older Boomers may be familiar with this infamous border region:

A simple red line depicts the border between Laos, Cambodia, and Vietnam.
Guess the border (by the author)

In order these were the US-Mexico, US-Canada, Argentina-Chile, and Vietnam-Laos-Cambodia borders.

Share this Article
Please enter CoinGecko Free Api Key to get this plugin works.