Showing posts with label interactive map. Show all posts
Showing posts with label interactive map. Show all posts

Sunday, 7 May 2017

General Election 2015: the view from second place

In my last blog post I shared a shapefile with the current UK constituency boundaries, which included a lot of other data. One of the variables included was who came second in the 2015 UK General Election. I thought it would be interesting to map this and also include a couple of widgets using the new Builder tools in CARTO (formerly CartoDB). I wanted to do this because I knew UKIP came second in 120 constituencies and I wanted to see where. I also wanted to post an interactive version of the data from my shapefile so people could explore it themselves. The first map below shows who came second in each constituency in 2015 and if you click an area you'll get more information - winner, MP, and so on. Using the widgets below you can then select by winning party and margin of victory, should you want to quickly identify marginal seats, for example.



Here's what the pop-up looks like

In the next map, I've used the 'Majority in 2015' widget to select only those areas with a majority of 3,000 or less and this then updates the 'Winner in 2015' widget so that you can see 41 of these constituencies voted Labour in 2015 and 36 were Conservative.

Many of these could be considered true marginals

At the other end of the scale, I then used the widget slider to select all those constituencies in 2015 which had a majority of 15,000 or more. The final map below shows this. As you can see, 153 of these were Conservative constituencies and 59 were Labour. The colours on the map - remember - are who came second in 2015. So is this a 'no chance of winning here' map? Possibly. I wouldn't be holding out for any shocks though.

Fiddle around with this map here

Here's what the map looks like when you show Labour, Conservative and then UKIP second place finishes.

Labour came second in 253 constituencies in 2015

The Conservatives came second in 181 constituencies in 2015

UKIP came second in 120 constituencies in 2015


I didn't make this so that I could comment on it so have a go yourself in the full screen version.

Friday, 15 July 2016

From CartoDB to CARTO - the future of interactive mapping?

I've been using CartoDB (now CARTO) for a few years for interactive mapping - and have always loved what it can do - from basic mapping to much more complex analysis. Now, with the re-brand as CARTO and the advanced analytical tools available through the new Builder interface it's on a new level. So, credit where credit's due - I thought I'd do a short piece on this now to give my take on the new interface. But first, here's a little gif of me playing around with some commute data - which you can also download yourself if you want to. The dataset was used as part of a project I've been working on with Garrett Nelson - but hopefully more on that in future.

I'm just playing around turning things on and off here

If you've used the old CartoDB interface, the new Builder one might be a bit confusing at first - though you may not actually be able to get access to it yet. But once you have played around with it for a few minutes it soon becomes pretty intuitive. I uploaded a sub-set of commute flow lines for Minnesota and Wisconsin and then decided to add widgets so that I could filter the data using line distance, FIPS codes and commute volumes - as you should be able to see in the larger image below.

Click to enlarge - change the data view by using tools on right

This is very much just a little data sample, but if you want to play around with the interactive CARTO map you can see it here. It's not very pretty and the origins and destinations don't have place names right now - only FIPS codes - but the principle is the same. The Widget interface takes a little bit of getting used to as well, but is really easy to use once you've figured out what's what. See below for a screenshot.

You can add widgets for different data types

Any negatives to report? For me, not now. I'm just enjoying the enhanced analytical tools at hand. But if I was being greedy... I'm not massively keen on the default legends, there doesn't appear to be an 'addition' blend mode and the snap alignment of shapes in the old map editor has me a little flummoxed, but these are minor grumbles.

I'm not getting paid to promote this and I don't know anyone at CARTO - honest - I just think they have produced something that works brilliantly, is simple yet powerful and allows us to manipulate, analyse and share our data in new ways. There are other tools out there but the new Builder, for me, takes things to the next level for a mass audience. To answer the question in the title of the blog: is CARTO the future of interactive mapping, then? Not the future, but probably a very big part of it.


Notes: really, they didn't pay me. Data used are from the American Community Survey. I wrote a working paper on it already. I also blogged about it on my old blog. Finally, if you're one of the few people in the world not to have seen it, Mark Evans created this beautiful site with the same data.