Placekey Blog

Product updates, industry-leading insights, and more

Introducing the Placekey QGIS Plugin

by Placekey

Nearly anyone who has worked with geospatial datasets has likely come across the following scenario: how can one link additional attributes to physical location points on a map? This is a hard problem because data related to places, such as addresses and points-of-interest, or POIs, is often messy and inconsistent. Placekey was invented to solve this problem.

Placekey

Placekey was designed to be a free, universal, standardized identifier for physical places. A Placekey consists of two components: the where, which describes the geospatial point on a map (represented by an H3 hexagon), and the what, which describes what the point is actually referring to (for example, a Starbucks and its address). 

The Placekey API enables users to feed in raw address and POI information and receive Placekeys, which can then be used to join disparate data sources together. Behind the scenes, Placekey does the hard work of address and POI normalization, validation, and geocoding in order to ensure, broadly, that the same place always resolves to the same Placekey, and that different places always resolve to different Placekeys. Placekey is built to handle a wide variety of address formats, buildings with unit numbers, and POIs being referred to by different names (and even by different street numbers).

The QGIS Python Plugin

The QGIS Placekey plugin allows you to easily append Placekeys to your spatial data inside QGIS. It is then easy to link disparate datasets by taking advantage of QGIS’ native functionality for joining on an attribute.

The plugin is implemented as a geospatial algorithm within the Processing Toolbox, so it can be combined with different workflows inside QGIS. The plugin takes the features of a layer, table, or file in your QGIS instance, passes the data to the Placekey API, and gives you the option to either copy your original table with the added Placekey column or simply return the feature ids and the resulting Placekeys.

Case Study: Joining Two Layers Using the Placekey QGIS Plugin

To show the plugin in action, suppose you are working with the following layer containing store names and addresses for a few Costco locations in the United States:

Suppose, for the purposes of your analysis, you want to add phone numbers, the managers’ names, and opening dates for these stores using the table below:

Note, however, that the geocodings are slightly different, and the store in St. Louis, Missouri is listed with the city as ‘Concord’ and ‘SAINT LOUIS’ in the first and second datasets, respectively.

Joining these layers together is easy with Placekey:

  1. Get a Placekey API key
  2. Install the Placekey QGIS Plugin, either using the link or directly using the QGIS Plugins Manager
  3. Within QGIS, open the Processing Toolbox
  4. Enter your API key into the “Manage Placekey API Key” section and press “run”
  5. Add Placekeys to the first layer by selecting the layer, clicking “Add Placekey” in the Processing Toolbox and following the menu workflow
  6. Repeat this process for the second layer or table of attributes you want to join
  7. Use the QGIS “Join Attributes by Field Value” function to merge the two layers on the Placekey

This short video by Riccardo Klinger, a QGIS contributor and the creator of the Placekey QGIS Plugin, walks through the process highlighted above. After performing these steps the layers are joined into one, like so:

Notice that the different city names and geocodings did not affect the join when using Placekey as the join attribute.

__________________________________________

About us:
Placekey is a free, universal standard for a physical place. For more information on Placekey, please refer to the following resources. Happy Placekeying!

Get ready to unlock new insights on physical places