Monday, February 24, 2020

A Bad Day for the Right in Hamburg

Germany's center-left Social Democratic party (SPD) and the Green party both had a good day in yesterday's state election in Hamburg. It was a very bad day for Angela Merkel's Christian Democrat party (CDU), who plummeted into third place with little more than 11% of the vote. It was also a very bad day for the extreme far-right AfD party, who only just managed to get over 5% of the vote.

You can explore the percentage of the vote won by each party in each electoral district on Hamburger Abendblatt's interactive map of the city state's 2020 election. The map allows you to view an overall map of the results (showing the winning party in each electoral district) and individual choropleth maps for each party. The individual party maps show the percentage of votes won by the party in each district. These individual maps are also annotated to show the three districts where each party gained the highest percentage of votes in the city.

The Hamburger Abendblatt's maps are great for showing the geographical support for each party. For example it is striking how support for the Green party is strongest in the city center and weaker in the city's suburbs. The left-wing Linke party, like the Greens, performed strongest in the center of Hamburg. The strong performance of the Green's and Linke in the center of Hamburg may be why the center-left SPD performed less well in the center than they did elsewhere in the city. The CDU's top three electoral districts are all in the south-east of the city.

If you select the drop-down menu under the vote share graph you can view each party's vote swing since the 2015 election. These swings tell a large part of the story in yesterday's election in Hamburg. The 11.9% increase in the Green vote and the minus 4.7% swing in the CDU vote explains how the Greens overtook the CDU to become the second biggest party in Hamburg. While the SPD remained Hamburg's biggest party overall their celebrations may be muted as the party actually saw a minus 6.6% drop in their vote.

Sunday, February 23, 2020

Covid-19 Maps

One month ago, on 23 January 2020, the John Hopkins' Wuhan Coronavirus (2019-nCoV) Global Cases interactive map was reporting 17 deaths from Covid-19 and 555 total known cases. One month later the John Hopkins map is reporting 2,462 deaths and 78,823 total known cases.

This week there appears to be the first major outbreak of Covid-19 outside of Asia. In the last few days more than 100 cases of Covid-19 have been confirmed in Italy and two people have died from the virus. Last night Italy imposed 'extraordinary measures' to try to halt the spread of Covid-19. Under these new measures the residents of a number of towns in Lombardy and Veneto, in northern Italy, have been asked to stay at home. People are now forbidden to leave or enter this outbreak area without special permission.

As the number of cases of Covid-19 has grown many other institutions across the world have begun mapping incidents of the disease around the globe. Here are some of the other interactive maps which are tracking Covid-19:

Covid 2019 Tracker - this map from the London School of Hygiene & Tropical Medicine shows the number of deaths and total number of cases of Covid-19 in countries around the world. The map also allows you to compare the rise of the Covid-19 outbreak with the 2003 SARS, 2014 Ebola and 2009 Swine Flu epidemics.

COVID-19 Dashboard - a dashboard showing cases of COVID-19 on a 3D globe. The dashboard also includes a graph showing the rise of the outbreak over time, the total number of cases, the number of recoveries and the number of deaths.

Coronavirus Infection Tracker - this map from Japan's Nikkei visualizes the number of Covid-19 cases over time. The map is available in both English and Japanese.

Tracking Coronavirus COVID-19 - an interactive tracking map from the mapping company HERE. It includes both a map and timeline of Covid-19.

COVID-19 Cases and Clusters Outside of Mainland China - this map from the University of Virginia is tracking the spread of the virus outside of China. It includes charts showing a breakdown of Covid-19 cases by age and by recorded symptoms.

How to Read Covid-19 Maps and Charts

All the above maps and charts provide a good general overview of the rise and spread of Covid-19 over time. However you should consider a number of factors when reading the data.

Non-normalized Data

None of the maps show the incident rates for Covid-19 in each country. All the maps linked above show the total numbers of cases and none of them normalize the number of confirmed cases by the country's population. Therefore these maps all show the total number of Covid-19 cases and not the incident rate of the virus in each country.

For example the John Hopkins map is currently showing three cases of Covid-19 in India and two cases in Spain. These numbers are shown on the map using scaled markers of a very similar size. However 2 cases in a population of 49 million constitutes a far higher incident rate of Covid-19 in Spain than the 3 reported cases in a population of 1.28 billion in India. Despite the markers for Spain and Italy being very similar in size the incident rate of Covid-19 (based on reported cases) is far higher in Spain than it is in India.

Data Collection Methods

Maps which show the spread of the virus in different countries are prone to errors from the way that Covid-19 is detected and reported in each country. There have also been changes to the way that the virus is being monitored and recorded since the outbreak was first detected. For example last week China's National Health Commission removed 108 deaths from the overall total, because of a previous double counting of fatalities. At the same time the overall number of deaths and the overall number of cases was also revised upwards as China also changed its methodology for registering Covid-19 cases.

Saturday, February 22, 2020

Airlines Hit in the Pocket by Coronavirus

The New York Times has created an impressive side-by-side animated map comparison which visualizes the huge drop in both domestic and international flights over China since the outbreak of coronavirus. In response to last month's outbreak of the virus airlines have canceled more than 200,000 flights - both domestically, within the country, and internationally, to & from China.

In 13,000 Missing Flights the NYT visualizes the scale of this reduction in air traffic by animating a day's flights over China on January 22nd (before the outbreak) and a day's flights on February 13th (after the outbreak). The NYT article goes on to show how flights have not only dropped significantly within China but also internationally as air travel from China has dropped to other Asian countries and to Europe & the USA.

The NYT says that Chinese tourists account for 20% of the world's tourism spending, more than any other country in the world. It argues that the loss of this spending will have an economic effect on many countries across the globe. The drop in air traffic will also obviously have an effect on airlines. The International Air Transport Association says that loss of air traffic could translate into a $27.8 billion revenue drop for airlines in 2020.

Wales Is Smaller Than You Think It Is

In the UK the country of Wales is often used as a unit of measurement. According to the BBC Wales has been used to describe things as varied as :-
  • the area an asteroid could wipe out 
  • how much damage a nuclear bomb could destroy
  • the levels of deforestation in the Amazon

Using Wales as a unit of measurement isn't new. According to Google Book's Ngram Viewer the phrase something is the '.... size of Wales' has been showing up in literature fairly consistently since 1842.

Despite this long history there is actually one very major problem with using Wales as a unit of measurement. That problem is that Wales is actually smaller than you think it is.

Yesterday I asked the readers of Maps Mania to draw where they think the border between England and Wales is on an interactive map. The results were (to me at least) a little surprising. You can explore all the border lines drawn by Maps Mania readers for yourself on this Hunting Wales interactive map.

As you can see from the screenshot above the majority of people think that the border between Wales & England is actually a lot further east than it really is (the real border is shown in green). The conclusion therefore has to be that most people think that Wales is actually much bigger than it really is.

What is even more surprising is that there is a very small part of Shropshire (in England) which every single person who responded to the survey thought was in Wales. The small hamlet of Anchor is in southwest Shropshire, England. In my survey not one person included Anchor in England. Everybody thought it was in Wales.

A corner of a native field which shall remain never England


Obviously my map survey has no real validity. Only around 50 people responded to my map survey. Therefore there isn't a large enough sample to make any reasonable conclusions about where people think the border between Wales & England really is. The readership of Maps Mania is also very global. This means that a lot of the people who drew on the map were not British and may have a less thorough knowledge of UK geography than the majority of British people (although I suspect it is actually better). So if you are British person it is probably safe to continue using Wales (and football pitches) as your standard unit of measurement (particularly if you want to exaggerate the size of something).

Friday, February 21, 2020

Get Me Geodata!

Hans Hack is on a bit of a creative blitz. In the last couple of weeks he has released the impressive How Big size comparison map tool and the equally impressive shape comparison tool, Reprojector. Both of these tools can be used to get the GeoJSON data needed to compare different locations or sized objects on top of an interactive map.

Now Hans has released yet another interactive mapping tool. This new tool can be used to retrieve geographical data from OpenStreetMap. OpenStreetMap is the world's biggest source of geographical data which is available to use under an Open Database Licence. If you work with interactive maps in any way then you will want to be able to access OpenStreetMap data. My favorite tool for accessing OSM data is Overpass Turbo, which is a relatively easy to use web based interface for using the Overpass API.

Overpass Turbo uses the Overpass Query Language so it isn't completely straightforward to use without help (although the built-in wizard is very useful and there is a lot of support and examples on the internet for how to write Overpass Turbo queries).

Hans Hack's new tool Gimme Geodata seems to be designed as an entry level tool for grabbing data from OpenStreetMap. The tool is a fantastic resource if you want to quickly grab the boundary of any country or administrative level in the world in GeoJSON format. Click on the Gimme Geodata interactive map and it will provide a list of all the available boundaries which you can download.

For example if you click on Chinatown in New York City you are presented with the option to download any or all of the following boundaries:
  • Chinatown
  • Manhattan Community Board
  • Manhattan Island
  • Manhattan
  • New York City
  • New York County
  • New York State
  • New York Timezone
  • Contiguous United States
  • United States
Select any combination of these borders and you can then download the selected borders in GeoJSON format.

Gimme Geodata is probably the simplest and easiest tool available for grabbing polygons of different administrative areas. The tool certainly doesn't have the range of Overpass Turbo but if all you need is country / regional borders or polygons of countries or regions then Gimme Geodata is fantastic. I already know I'm going to be using Gimme Geodata - a lot.

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.

Thursday, February 20, 2020

The Migratory Patterns of Birds

The Cornell Lab of Ornithology is running the largest citizen science project in the world. For fifteen years bird watchers across the globe have been reporting their observations to eBird. The result is a huge database of over 750 million observations, recording dated sightings of thousands of species of birds.

The eBird Science team has used the observations made in North America to create animated migration and seasonal abundance maps for 610 bird species. The maps visualize the abundance of each species across North America and allow you to observe their migratory patterns over the course of each year.

The abundance maps show where each bird species is most common across the continent. These maps use different colors to show the relative abundance of a bird species at different times of the year. The migratory maps allow you to view the migratory patterns of whole populations of bird species across the whole continent of North America. For example in the map above you can observe the abundance of waterfowl in different locations over the course of a year. Note how in the winter the Mississippi River Valley shows up on the map as thousands of waterfowl visit.

Wednesday, February 19, 2020

The Arctic is Melting

The rate of global warming in the Arctic is about twice as fast as the global average. You can see how this global heating is affecting sea ice extent on this impressive map visualization from Aftenposten. The article accompanying the map is in Norwegian but you don't need to speak Norwegian to appreciate the impressive interactive map.

As you scroll through The Arctic is Melting a map of the Arctic visualizes the level of sea ice extent over time for every year since 1985. The purple colored areas on the map show the thin ice that melts in summer. The white ice shows the thicker perennial ice, which has visibly shrunk in just the last decade. In recent years the ice in the Arctic has become younger and thinner. This means that the ice melts faster and earlier every year.

You can view many other mapped visualizations of the loss of sea ice in the Arctic on the Maps Mania Arctic tag.

Where in the World - Map Games

Map games can be a lot of fun to play. They can also be a lot of fun to make. The following three interactive map games are all fun to play. They are also all on GitHub. This means that each of these games is easy to clone and adapt if you want to create your own map based geography game.


Play the Game & Clone the GitHub

In this simple map game you are given six different cities to identify by clicking on their correct locations on an interactive map. You gain points based on how near you are to the correct location and by how quickly you answer.


Play the Game & Clone the GitHub

In this Mapbox based game you are shown different cities around the world. All you have to do is select the correct name for the city from a choice of four. If you guess correctly then you progress to the next round. Each city shown is more difficult than the last. The object of the game is to name as many cities as you can. The game finishes as soon as you guess a city wrongly.

Map Quiz

Play the Game & Clone the GitHub

Map Quiz is actually a compendium of a number of different map games in one package. On Map Quiz you can choose to play map games which test your knowledge of countries, cities or even national flags. If you guess correctly in this game you are rewarded with a little information box containing the selected country's flag, population and area size.

How Big is Big?

1,500 square miles

Data visualization expert Hans Hack has developed two interactive mapping tools which are great if you need to explain the size of something by showing it on a map. His How Big tool uses scaled circles or squares to visualize simple area sizes and his Reprojector tool can be used to show the size of areas with more complex shapes.

Massive swarms of locusts are currently destroying crops in Kenya, Ethiopia, Somalia, Tanzania and Uganda. The food supply of tens of millions of people is threatened by swarms as big as 1,500 square miles. Each swarm can include up to 150 million locusts per sq km. A single swarm can cover 120 miles in a day devouring all crops encountered on the way.

It can be hard to comprehend how large 1,500 square miles actually is. Which is why Hans Hack size comparison map tool can be very handy. How Big is an interactive map which allows you to show how large an area is by overlaying a circle or square of that size over any location. This allows you to make direct comparisons between the sized shape and places that you are familiar with.

Type in an area size into the How Big interactive map (in meters, hectares, kilometers or miles) and the map will display a circle or square of that size over the location of your choice. If you want to use the generated circle or square in your own maps you can even download a GeoJSON file of your sized shape.

If you want to show the size of more complex shapes then Hans Hack can help you there as well. His Reprojector interactive mapping tool allows you to compare different areas with each other by moving GeoJSON shapes around. The tool is great for comparing two (or more) different geographic areas with each other.

The Reprojector tool allows you to upload any GeoJSON polygon onto an interactive map. This GeoJSON can be anything you want, including country or state borders. Once you have uploaded a polygon onto the Reprojector map you can move the shape around to overlay the polygon on any location in the world. When you are happy with the location of your polygon you can then download a GeoJSON file with the data to display your polygon in its new position.

You can see in the screenshot above an example where I positioned a GeoJSON polygon of Italy on top of the state of Texas. If you want to experiment with moving different country polygons around on the Reprojector map then you might find GeoJSON Maps of the Globe useful. This simple tool allows you to click on a country on an interactive map and then download it as a GeoJSON file (which you can then upload onto the Reprojector map).