Friday, April 12, 2019

A Street View of Thrones


A Viz of Thrones is a map and data visualization about the characters and episodes of the HBO series Game of Thrones. The map allows you to view the setting in Westros or Essos where every single scene in all seven screened seasons of A Game of Thrones takes place.

At the heart of a Viz of Thrones is a mapped timeline which allows you to drill down into any scene, in any episode of all seven screened seasons of the television series. If you select an episode from the season timeline then the map sidebar will show all the individual scenes in that episode. Select any scene in the chosen episode and character markers will be added to the interactive map. The map therefore shows you both the location of the chosen scene and the characters who appear in it. If you click on a character's marker on the map you can even find out the length of their screen time in the chosen scene.


If you enjoy exploring these fictional locations on the interactive map then you might like to explore the real locations where these scenes were shot using Google Maps Street View. In Game of Thrones: The Old Views and the NewGoogle has curated a collection of Game of Thrones shooting locations which can be explored using Google Maps panoramic imagery. The collection includes the real shooting locations for King's Landing and Winterfell. Google's collection of magical Street Views is split into three main Houses, the Starks, Lannisters and the Mother of Dragons.


If you are impressed by A Viz of Thrones then why not create your own interactive Game of Thrones map. Thanks to Carto you don't even need to create your own basemap of Essos and Westeros. Carto's Game of Thrones Basemap of the Seven Kingdoms provides a great canvas on which you can add all of your Games of Thrones geo-data.

If you want to know how to add all your GoT geo-data to the Carto basemap then you need Patrick Triest's tutorial Building Aa Interactive Game Of Thrones Map (Part I) - Node.js, PostGIS, and Redis. The first installment of this two part tutorial explains how you can build a searchable backend to serve your data to the map. Part II of the tutorial shows you how to build a responsive interactive map for this data using Leaflet.js.

If you were wondering what a Node.js, PostGIS, and Redis powered Game of Thrones map looks like then you can find out on Patrick's Atlas of Thrones. The map includes lots of categorized points of information that you can view on the map. Including castles, towns, regions and landmarks. You can navigate to these via the categorized menu or by using the built-in search function.

Thursday, April 11, 2019

Is Your Neighborhood Improving or Declining?


Around 36.5 Americans live in areas which have seen economic decline and larger numbers of residents living on low incomes. According to a new report from the University of Minnesota most metropolitan areas in America have witnessed economic decline since 2000. While a limited number of cities such as Washington D.C. and Los Angeles have experienced gentrification most metropolitan areas in America have seen an increase in the percentage of the low income population.

If you want to know if your neighborhood is declining or becoming more gentrified then you can refer to the University's new interactive map which visualizes which census tract areas are becoming poorer and which are becoming richer overall. The map shows the level of low income displacement or low-income contraction in each census tract in the USA. In other words it reveals which neighborhoods have seen a decrease in the number of people on low incomes (2000-2016) and which areas have seen an increase in the low income population. Low income is defined as "those below 200 percent of the federal poverty line".

The Low Income Displacement and Concentration in U.S. Census Tracts, 2000 to 2016 interactive map colors census tract areas by the change in the number of the low income population. If you click on a census tract you can view details on the percentage of the population who were low income in 2000 and the percentage in 2016. You can also view other details about the local population, such as the changes in the number of local residents with a 'Middle-High Income', the number on a 'Low Income', the number 'Below Poverty' and the number living in 'Extreme Poverty'. The demographic information provided also shows changes to the numbers of Asian, black, Hispanic & white residents, the local number of college graduates, and changes to the number of rental, vacant & owner properties.

The full report, American Neighborhood Change in the 21st Century: Gentrification and Decline outlines some of the main patterns revealed by the map. For example, the data reveals that nonwhite Americans are far more likely to live in economically declining areas than white Americans. The data also shows that white flight is strongly linked with neighborhood change. In economically expanding areas between 2000-2016 the white population grew by 44%. In economically declining areas the white population fell by 22% over the same period of time.

Voronoi Mapping on the Fly


Jackson Voekel has created an interesting interactive map which allows you to create a Voronoi map on the fly. His Voronoi Leaflet Map allows you to add any number of markers to any location in the world and create a Voronoi map showing different regions based on the proximity to each of your added points.

A Voronoi map partitions a location into different regions based on the distance to specified points on the map. The screenshot above shows an example Voronoi map created using the Voronoi Leaflet Map. This map divides London into areas based on the nearest Premiership football team. To create the map I dropped a map marker on London's six EPL teams and then drew a large polygon around much of London. The Voronoi Leaflet Map then instantly divided my large polygon into six distinct London regions, each of these regions being determined by the nearest EPL team.

The beauty of Jackson's map is that you can use it to create Voronoi maps on the fly. For example you could drop markers on Manhattan subway stations to see New York divided into regions based on the nearest subway stop. Alternatively, you could drop markers on the U.S. state capitals to create a new map of the United States, where the country is divided up into new states based on the proximity to state capitals.

I believe that the Voronoi Leaflet Map uses Turf.js. If you are interested in making your own interactive Voronoi maps then here is the documentation on creating Voronoi maps with Turf.js.

The State of Play in the Australian Election


The Australian Prime Minister has announced that the country will hold a general election on May 18th. All 151 seats in the House of Representatives and half of the seats in the Senate will be contested in the election. The current Prime Minister Scott John Morrison leads the Liberal Party into the election. His party are generally behind in the polls to the Labor Party. However Mr Morrison leads Bill Shortern (Labor) as the preferred candidate for Prime Minister in those same polls.

The Guardian has released an interactive map which shows the two party preferred margin in each seat in the lower House of Representatives, following the most recent redistribution. The map shows the lead held by either the Labor or Liberal party over each other in each seat at the last election. If you hover over a seat on the State of Play map you can view the actual percentage of the margin and the name of the party which currently holds the seat.


The Australian Parents Council has also released an interactive map which shows the current Australian federal electorates and all the schools in each electoral seat. The map also contains links which allow you to read about each party's education policy. The APC Electoral Map colors each seat to show the political party of the sitting member. If you click on a seat on the map you can view the name of the current member, their winning margin and details about all the schools in the seat. If you click on a political party name in the map legend you will be taken to the party's education policy on their official website.

Wednesday, April 10, 2019

The Real-Time Air Pollution Map


Berkeley Earth claims that 1.6 million people are dying from air pollution every year in China alone. Berkeley Earth is a non-profit organization who are investigating evidence of climate change. As part of that task they have released a real-time map of air pollution around the world. The Real-time Map of Air Pollution shows real-time information on particulate matter air pollution less than 2.5 microns in diameter (PM2.5).

The data for the Berkeley Earth air pollution map comes from thousands of surface monitoring stations across the globe. The map typically shows data from about two hours behind real-time. As you will probably see when looking at the map large areas of China and India typically experience dangerous levels of air pollution. If you hover over an area on the map you can read an assessment of the current air pollution conditions at that location.


Berkeley Earth also maintains a number of databases on historical global temperature records. There are some interesting mapped visualizations of this data. For example Lisa Charlotte Rost has used historical temperature data from Berkeley Earth to visualize how much the average temperature has risen or fallen in every European city since 1960.

The interactive map in Which European cities have gotten warmer? (Spoiler: All of them) uses colored markers to show the average temperature difference in European cities. If you hover over a city's marker you can view the name of the city and the number of degrees centigrade that the average temperature has risen in the city since 1960.

Axios also used Berkeley Earth data to create an animated map of summer temperatures, All the heat records broken this summer on one map. Axios' map uses data compiled by Berkeley Earth from May 1 through July 31 2018. The map animates through this time period plotting all the locations around the world which experienced a daily, monthly or all time temperature record. The overall picture at the end of the animation, showing all the records at once, is a stark illustration of how practically the whole of the northern hemisphere experienced record breaking temperatures last year.

The Animated History of the London Tube


It seems to have become accepted knowledge that the current map of the London Underground is too cluttered for purpose. A lot of cartographers have therefore been tearing their hair out recently by trying to redesign the London Tube Map. All of them have missed the obvious solution.

The reason why the London Underground is now so hard to map is that the network has too many lines and too many stations. My solution is to therefore demolish all London Underground stations built after 1900.

The London Underground in 1900 was a much smaller and much more manageable public transport system. It was also much easier to map. In fact it is small enough to make an animated map which shows the development of the network from 1863-1900. The London Underground began when the Metropolitan Line opened in 1863 with seven stations between Paddington and Farringdon. By 1990 the network had grown to include a District Line and the beginnings of the Northern Line.

You can see how the London Underground grew in its first 40 years on my History of the London Underground. If you press the 'Start' button on the map the London Underground lines will start to appear on the map in the order in which they were constructed. The animated tube lines were created using the Leaflet.Polyline.SnakeAnim. If I ever have a spare month I might get around to adding the next 118 years of construction to the map.

If you want to complete the map or reuse the code then you are welcome to do so. You can clone the project on Glitch.

Tuesday, April 09, 2019

Real-Time Planes on a 3D Globe


Live Flights is an experimental project from HERE which shows real-time flights to and from a number of international airports around the world on an interactive 3D globe. On this interactive globe you can see small red and blue airplanes traversing the world in real-time - showing the real locations of real planes.

The red planes shown on the globe are traveling towards the selected airport and the blue planes are traveling away from the airport. On a HERE Tweet that linked to the map I read a lot of negative comments suggesting that this was a poor imitation of FlightRadar24. I think this criticism is a little unfair and Live Flights is actually an interesting experiment in visualizing live flights in a different way.

Showing flights in real-time on top of an interactive globe rather than on top of a more traditional flat map brings in another dimension. Moving from 2D to 3D allows us to see the altitude of planes on the globe. If you zoom in on a cluster of planes on the globe you should be able to see that the planes are actually shown at different altitudes (the differences in altitude of planes can become more clear if you rotate the map back & forth a little).

If you hover over individual plane markers on the globe you can view details on the plane, its operating airline, where the plane is flying to and where it is flying from.

The Map Context Frame for Navigation


The Map Context Frame is an interesting prototype "to support (interactive) map navigation by placing contextual information around a (interactive) map". When using interactive maps users often zoom in and out on the map to determine their location. For example users might zoom out on a map to confirm their relative position in terms of nearby towns, cities and other well known landmarks. The Map Context Frame is an aide to navigation which is designed to provide contextual spatial cues in the map frame so that users don't need to zoom in and out to determine their location.

The Map Context Frame provides a number of contextual spatial cues around the edge of the map showing the direction and distance to locations outside of the current map view. The spatial cues shown are different at different zoom levels. When zoomed out to a level which shows country labels on the map the spatial cues in the context frame will point towards countries outside the current map bounds. When you zoom in on the map the context cues will change from pointing towards other countries to instead show towns and cities outside the current map bounds.

You can read more about the purpose of the Map Context Frame and its methodology on its GitHub page and in the research paper A Context Frame for Interactive Maps (PDF).

The Map Context Frame system obviously must involve some kind of ranking to decide which location are the most important and therefore should be shown in the context frame. One factor in this ranking algorithm could be distance. If I'm searching around within a U.S. state at a zoom level which shows a few towns on the map then the context frame could show me the nearby towns & cities not in the current map view. Another factor in a ranking algorithm could be population size. Again if I'm searching within a state the context frame could show me nearby towns not in the current map view but also some of the biggest cities and the state capital (even if they are further away).

The demo map doesn't show local points of interest. This is probably because this is where it gets more difficult. If you are zoomed right in on a location in the demo map the context frame still shows you towns and cities. Whereas at this level of zoom nearby neighborhoods would probably be a greater aide to navigation. As would nearby points of interest, such as stations, museums and other well know local landmarks.

An alternative to using a Map Context Frame with an algorithm determining the context locations is to create a map with predetermined context locations. For example if you have a map on your website showing the location of your office then you might want to determine for yourself which locations to show in the context frame. For example you might want the context frame to point towards and show the distance to nearby stations, bus-stops and cafes. If that is the case then you might like Leaflet EdgeMarker.

Leaflet EdgeMarker is a plugin for the Leaflet map library which creates a map context frame with arrows pointing to predetermined locations outside of the current view. If you use Leaflet EdgeMarker you need to determine for yourself the locations which the arrows in the context frame will point to. Here is a demo of the Leaflet EdgeMarker in action.

Monday, April 08, 2019

The Cherry Blossom Business


Cherry Blossom season in Japan is a huge cultural and social event. It is also hugely important to Japan's tourism industry. Every Spring cherry blossom trees across the country burst into bloom. According to Kansai University those blooms attract 63 million people who travel to and within Japan to witness the phenomenon. That tourism is worth around $2.7 billion (301 billion yen) to the Japanese economy.

Bloomberg has released a story map exploring the big business of Japan's cherry blossom season. In The Big Business of Japan’s Cherry Blossoms Bloomberg uses the story map format to show how the timing of the cherry blossom season varies across the country. The map goes on to show the location of 600 viewing spots which are popular with tourists and the volume of visitors to those spots in 2018.  A flow map is also used to show the number of tourists visiting Japan in March and April 2018 and which countries those visitors came from around the world.


If you can't afford to travel to Japan to experience cherry blossom season in person then you can bring cherry blossom season to your own town instead. Sakura is a fun website which allows you to visualize how your street would look if you could transport it to Japan in the springtime. The effect is so amazing that it can even transform my grey London street into the beautiful road of my dreams.


If you have a WebGL capable browser then share your location with Sakura to view your own home covered in pink cherry blossom on Street View.

Why Vultures Don't Like Borders


Vultures can fly huge distances over the course of a single day - but not if they have to cross an international border. In just one day vultures can fly 300 to 400 kilometers in search of food. However scientists in Spain have discovered that Spanish vultures don't like to fly into Portugal.

Spanish biologists fitted 71 Griffon and Cinereous vultures in the Portuguese-Spanish border region with GPS trackers. They discovered that the birds hardly ever crossed the border into Portugal. This border region consists largely of river valleys and there are no geographical or climatic reasons why the birds should stop at the border. There must therefore be another reason why the vultures prefer to remain in Spain.

It is true that most vultures don't carry passports, but that isn't the reason why they avoid Portugal. The reason is the availability of dead livestock. There just happens to be more dead animal carcasses lying in Spanish fields than there are in Portugal (where the authorities collect and dispose of livestock). After the mad cow disease scares of the 1980's & 1990's the European Union introduced directives that required the incineration of cow carcasses. This law was passed to ensure that when cows died they were not allowed to decompose naturally. This is not good news for vultures who like nothing more than snacking on the dead bodies of other animals.

Partly because of the environmental effects of the directive on the disposal of cow carcasses and partly due to the containment of the disease the EU has since relaxed the rules on the disposal of dead livestock. Member states and their own regulatory bodies now have more independence as to how farmers should dispose of dead cows. In Spain the authorities now allow dead cattle to decompose naturally in authorized areas. In Portugal the national government has done nothing to change the regulatory system of disposing of dead cows since the 1991 EU directive. Therefore Portuguese farmers must still incinerate dead cattle.

It appears that vultures have quickly learnt that they are unlikely to find food in Portugal. They therefore avoid the country and dine instead on the more readily available Spanish carrion.

From Invisible barriers: Differential sanitary regulations constrain vulture movements across country borders, Eneko Arrondo et al. Via El Pais