Tag Archives: twitter

Matters relating to the social media platform Twitter

Merry Christmas 2015

As another year draws to a close at Cranfield University, sure enough we have another Christmas map for you. As with previous years, we’ve collected a sample of tweets from Twitter that match a number of Christmas related keywords and mapped them using the same process we outlined last year.

The colour range from green to red indicates the density of Christmas related tweets from low to high in that county, relative to the normal density of twitter activity in that area (taken from a random sample of all tweets in the UK).

We’ll let you draw your own conclusions from the map. This time we thought we’d use the opportunity to focus on some of the web mapping technologies we’ve started using this year in other projects and hope to develop our use of heading into 2016. The biggest difference between the map you see above and some of the other maps we’ve published in the past is that this one doesn’t makes use of any GIS server or map hosting platform. Traditionally we’ve used either Geoserver or ArcGIS Server to publish our map tiles and other geospatial data for consumption with JavaScript web mapping APIs. Alternatively, web map hosting services can be used if one doesn’t have access to their own GIS Server, these include ArcGIS Online, Mapbox, CartoDB and others. The example here doesn’t use any of these services, but instead is running from a set of map tiles hosted on this very webserver. Interactivity (roll your mouse over the map to view the county names) is provided via a set of UTF-Grid tiles, also hosted on this webserver.

UTFGrid tiles use a combination of JSON encoding and ASCII grid files that sit alongside the map’s image tiles. For each PNG image tile there is a corresponding ASCII tile with a one pixel to one ASCII character mapping. An accompanying JSON lookup table provides the full set of attributes so that you can go beyond a simple raster map and offer full identify style interactivity.

UTFGrid functionality is available in many of the popular JavaScript web mapping APIs, either out of the box or as easily downloadable plugins. This particular map makes use of the Mapbox JS API, an extension of the Leaflet API.

The tiles used by this map are generated using the TileMill software and stored as a .mbtiles file (which is actually an SQLite database). A small PHP file, acting as a tile server, exposes this SQLite/MBTiles database to web mapping APIs as a large nested folder of image and UTFGrid files in the usual {z}/{x}/{y}.png or {z}/{x}/{y}.json fashion.

We like this approach to web mapping as it is reasonably lightweight and portable. The whole application, including web pages, JavaScript, map tiles and PHP tile server can be picked up and dropped onto any web server that supports PHP and is ready to go. It might not provide some of the advanced features you get with more heavyweight solutions, but a simple interactive map with query-able attributes is often all that’s needed for many web mapping applications. It’s also extremely fast and can be built using entirely open source software and tools.

More information on some of the packages and technologies used can be found here:

Merry Christmas and a happy New Year from all at Geothread!

Merry Christmas from all at Geothread

Once again, we’re preparing to wrap up for the year here at Cranfield University. Before we sign off, we’ll leave you with something that’s become a bit of a tradition with the Geothread team over the past couple of years; our Christmas Twitter map. Last year we mapped the spread of festive cheer across the country, according to Twitter users. Once again, we’ve collected a sample of 60,000 georeferenced tweets mentioning the word Christmas, along with a handful of other related keywords. These have been grouped by county and then normalised against a random sample of tweets taken earlier in the year to eliminate the effects of population density.

Comparing against the same map last year, it’s clear that there are several areas that are consistent in their anticipation of the festive season; Central Wales and North Yorkshire in particular. Anglesey and Conwy in North Wales certainly seem to be getting excited about things this year, whilst Cumbria and the Scottish Highlands don’t seem to be feeling the same level of enthusiasm that they did 12 months ago.

Christmas tweets 2014
Apologies to anyone we missed out in Ireland. Unfortunately the random sample of tweets we used for normalisation did not include coverage of all of the British Isles, which is why there are some holes in the final map.

As a bonus this year, we’ve included an interactive map of the raw data collected from twitter, for you to explore below.

Merry Christmas and a happy New Year from all at Geothread!

Spreading some festive cheer

Before we wrap up for the Christmas and New Year break at Cranfield University, here’s fun little map we’ve put together. Using the twitter4j Java library and the Twitter API, we collected a sample of 80,000 geotagged tweets over a three day period this week that matched a short list of festive and Christmas related keywords. The data was then plotted onto a map of the UK and grouped by county. The totals were then normalised against a random sample of 38,000 tweets, also grouped by county, that were collected earlier in the year. This removed the effect of Twitter population density, leaving the concentration of Christmas tweets in relation to that county’s normal levels of Twitter activity.

The Highlands, Cumbria, North Yorkshire, Norfolk and central Wales certainly seem to be getting into the spirit of things. The south of England on the other hand has some catching up to do, in comparison. We should add that at no stage have we measured sentiment (good or bad), simply instances of related keywords.

Merry Christmas and a happy New Year from all at Geothread!

Festive cheer Twitter map

Santa sightings

It seems appropriate that we leave you with something festive and fun before we take a break here at Cranfield University for Christmas and New Year. We’ve pooled together our mapping and data processing expertise and are proud to present you with The Unofficial Santa Sightings Map, 2012. The map takes its data from Twitter in the form of geotagged tweets posted over the past few days. It would appear Santa’s been doing a fair bit of travelling this week, with a surprising number of sightings as far north as the Highlands of Scotland.

A very merry Christmas and happy New Year to you all, see you in 2013.

Santa sightings, 2012

Santa sightings, 2012