Day 1 - Making a map with points 
(or playing with the What3Words API)

Day 1 - Making a map with points (or playing with the What3Words API)

2022 30 Day Map Challenge

My approach to the 30 Day Map Challenge

In my day job, I spend more time advising people on making map applications and/or admninistering GIS systems, so I decided to use the 2022 30 Day Map Challenge as an avenue to 1) play around with creating maps programmatically and 2) explore software and platforms I haven't had a chance to use before. And of course, just have fun making maps!

Day 1

Day 1 of the 30 Day Map Challenge is to create a map with points. I've been intrigued by the premise of What3Words and decided to use today's challenge as an excuse to create an account and tap into their API.

What is What3Words?

What3Words is a geospatial data and software provider with a fun concept: divide the world into 3 meter grid square and assign each grid square a three word combination. You might wonder why bother when we have street addresses or coordinates -- a street address may not exist for a place (such as in a rural or developing area), and coordinates aren't easy for humans to remember. Also, even if a place, such as a building, does have an address, the address may not correspond with the entrance for that building, or you may want a particular office/room within a building. For example, Baltimore City Hall's address is 100 Holliday St, Baltimore, MD 21202. With What3Word's 3 meter grid square, I can specify the building's exact entrance 'loops.appeal.venue' or a particular room, like the Baltimore city press room 'blur.plenty.rail'.

Screenshot of What3Words showing the 3 meter grid overlaying Baltimore City Hall

The Premise

I've always been curious about the distribution of word combinations in What3Words (they have a nice article here that delves into this a bit), and decided I wanted to plot all locations that share a common word.

November 1 also happens to be my partner's birthday, so in their honor, I chose to plot their favorite word: penguin.

I was envisioning a map where all what3words squares that have 'penguin' as one of their words (for example, 'penguin.secondword.thirdword', 'firstword.penguin.thirdword', or 'firstword.secondword.penguin') were plotted as points -- unfortunately, what I was envisioning wasn't quite possible with What3Words' API (and with a free-tier account to boot). What3Words' autosuggest query had the functionality that most matched what I wanted to do -- it takes a partial 3 word address and returns up to 3 valid 3 word combinations. However, the first two words and at least the first character of the third word must be provided -- which meant I wouldn't be able to search for and pull all valid three word combinations that start with the word 'penguin', or have 'penguin' as their second word, and most certainly couldn't pull all word combinations that end with 'penguin' as the third word.

Cool. Fine.

I improvised and decided to just settle for pulling and plotting a subset of valid three word combinations that contain the word 'penguin'.

The result

I spent some time tinkering with the what3words python library and ended up geocoding 149 semi-randomly generated locations in What3Words that contain the word 'penguin' as either their first or second word. I saved these geocoded results as a csv and plopped them into ArcGIS Online to quickly create a web application.

Interestingly, my results seem to be clustered in Australia -- but keep in mind that, as What3Word notes, there are 57 trillion squares overlaying the world, and about 25,000 words used for land areas and 15,000 used for water areas. My sampling of 149 locations is very, VERY small.

Day1 - What3Words Penguin Points.png

Access the map and code

To view and explore the map and see these penguin word combinations, click here.

I've written up a Jupyter notebook if anyone is interested in geocoding your own combination of words in What3Words. You can find my results and script on my github here. Enjoy!

hello-pinguin.gif