Friday, February 21, 2020

Where's the Border?



Earlier this month I created a little map survey tool which can be used to gather data on whether people can point to a named location on a map. That survey tool is intended to be used to collect geographical knowledge for stories such as Morning Consult's Can You Locate Iran? story.

You can see the application in action on my Where's Null Island map on Glitch. This map asks you to point to Null Island on an interactive map and then adds your answer to a database (this map shows all the answers given by Feb 8th). If you want to create your own map survey tool then just click on the Glitch icon on the Where's Null Island map and select the 'Remix' option..

This week I stumbled on Adam Pearce's map New York Neighborhoods Drawn by  New Yorkers. Back in 2015 DNAInfo asked New Yorkers to draw their neighborhood boundaries on an interactive map. Adam's map shows the neighborhood outlines drawn by more than 12,000 people in the DNAInfo survey. Inspired by this map I decided to create another map survey tool which could gather the data from linestrings drawn on a map.

My Hunting Wales map shows this new map surveying tool in action. On this map users are asked to simply draw the border between England and Wales. Each user's submission is then saved to a database.

At the heart of my application is this Mapbox.js Leaflet Draw example map, which uses Leaflet's drawing library to allow users to draw a linestring on top of a map. For my surveying tool I simply extended the 'draw:created' function to convert the linestring data into a GeoJSON format and save the result to a database:

If you want to clone the project on Glitch just click on the Glitch icon on my map and select the remix option (however please use your own Mapbox token number). The map is very easy to adapt to accept user drawn polygons rather than linestrings. To add a polygon button to the map just remove the 'polygon: false,' line in the map's JavaScript code. This will allow your users to draw shapes on the map, which is useful if you want them to draw neighborhood outlines, as in DNAInfo's New York neighborhoods survey.

Another inspiration for my new map surveying tool was a Berliner Morgenpost story from 2015. On the 25th anniversary of reunification the Berliner Morgenpost asked its readers if they could still remember where the border was between East and West Germany.

Using an interactive map readers were asked to draw the border between the former East and West Germany. Around 13,000 people responded by drawing on the map. The Webkid blog has the results of the survey. These results include a heat-map showing all of the 13,000+ guesses made and the real border between the two former countries.

No comments: