Category Archives: Journalism

HacksHackers Manchester – Web APIs for lunch

HacksHackersMcr tried a different format on 14th May – a Learning Lunch. Thanks to Rob for the idea and for leading the meet-up! And thanks to Ziferblat in the Northern Quarter for being the perfect venue.

Web APIs for journalists and… everyone

Application Programming Interface may not sound like funzies for a non-coding journalist but getting your head round them opens up all sorts of possibilities. Obviously, if you’re a dev, you’re going to go in a lot deeper and do some amazing things but that doesn’t mean there isn’t an entry level for journalists too.

An interface just means you have a way of getting at something you want. Let’s say you want to get photos posted on Flickr from a certain location or using a certain camera. You could do it the hard, laborious way…. Or you could use the Flickr API to make it simpler and quicker (relatively speaking). You just construct a specific type of URL in your ordinary browser, then send it to a server which interprets that URL request and sends you a bunch of the data you asked for. BUT, it will send it in computer-speak so it won’t look pretty. The data will probably be in JSON but you don’t need to be fluent in the JSON format to be able to use this data.

Flickr Web APIs – the basics

So, I’m no expert and I’m just playing around with this stuff at this stage but that means I can, at least, see the potential of APIs. I chose the Flickr API. Click on this link and on the right hand side, you’ll see a list of “methods” which just means the different types of data you might want to get at. When you click on one, it gives you further instructions about how to create your API. For a lot of them, you need to get authentication which I’m not going to go into here. So let’s choose a simple example which doesn’t require authentication. Under the People subheading, I clicked on getPublicphotos – which lets you get the data for the public photos of a particular Flickr user.

Now you’re ready to build your URL. Flickr APIs start with:-

Next, you need to specify which Method from that long list you’d like to access. So add this:-


What’s the Method? It tells you at the top of the page of instructions once you click on your chosen method. In this case it’s:-


Now, the instructions tell you there are various “arguments” you need to add to your URL. These are just further details to help the server return what you need. First of all, you need the API key and there are instructions on the page for how to get this password. It’s easy. So you add this to that URL you’re building:-


Then it asks you to add the user id (NSID) for the user whose photos you’re looking for. This is trickier (although maybe I’m missing a simple trick here?) but this is how I ended up getting the NSID for a user. It involves another API, ironically, but it’s a copy&paste job into your browser

That should return the NSID number so add that to your growing URL like this:-


Finally, let’s tell the server we’d like our data returned to us in JSON:-


Put that all together and you get something like this:-

Copy and paste into your browser and see what you get!

Screenshot JSON API request

Not so nice. But you can use a JSON to CSV converter to change this into a more familiar spreadsheet format by simply copying and pasting the text as it is into, say, 

Not hugely useful to a journalist but hopefully a way to understand how an API works and what it can do. So the next stage is to think of some more practical – yet still accessible – project I could work on with an API. Suggestions welcome!

Recommended Articles

Rob’s slides from the HacksHackersMcr Learning Lunch

Web APIs – Learning Lunch – Rob’s blog

Web APIs for non-programmers – a fabulous explainer by Noah Veltman

Hack the Election! Hacks/HackersMcr

Image of The Shed's doorThe great thing about organising Hacks/Hackers meet-ups is getting to meet amazing people from all walks of life who give their time generously and leave you feeling inspired. And hopefully everyone who came along to our event on Monday sixteenth of March felt similarly fired up by our guest speakers.

The Venue

Thanks to the brilliant team at MMU’s Digital Innovation for letting us use their fabulous, industrial space at The Shed. It meant we could provide tea and coffee to everyone on arrival which makes us feel all warm and hospitable! It’s also got full AV facilities and good wifi which meant our guests could show us the full range of their ideas and we also set up a Twitterwall so we could display the #HHMcr tweets as they happened!

Voter apathy?

The meet-up was all about finding inspiration on how to engage younger people in democracy and politics ahead of the election and even make it fun??!! As journalists, we know that although we get excited about elections, our audiences may not share that enthusiasm. Often, that’s because they don’t know where to find the information that can help them to get more involved. Or it may be because they don’t think the election is relevant to them especially here in Manchester with safe Labour seats leading to very low turnout.

The Speakers

Beth Ashton talking at HacksHackersMcrBeth Ashton, Social Media Editor at M.E.N. talked about how they’re putting together a Manchester Manifesto, asking the people of Manchester what they think are the big issues.

Next up was Francis Irving, CEO of Scraperwiki and the programmer behind They WorkForYou which parses Hansard data to show MP’s voting record in parliament. He talked about the suite of open democracy sites put together by Democracy Club .Francis Irving talking at Hacks/HackersMcr

  • YourNextMP - Find out who’s standing in your constituency and how to contact them
  • – Real-time monitoring of election leaflets. Keep track of how politicians are trying to get your vote!
  • Democracy Club’s CVs – a site to help candidates share their CVs with voters
  • MeetYourNextMP – find out how to meet the candidates standing in your constituency and question them with this site listing hustings by constituency.

One of my local candidates happened to be following me as I was tweeting about this and has promised to upload his CV! And, of course, these sites are great sources of potential stories and data for journalists.

Dan Hett talking at Hacks/HackersMcrTo round off the evening, Dan Hett – senior games developer at BBC Childrens, live coder extraordinaire and all-round creative person – inspired us to just go out there and make stuff that is awesome. Throw off your chains and don’t worry if it doesn’t work!

So if any of you were inspired by what you heard to make something, let us know!

Hacks/Hackers Manchester – looking forward

2015 New Year celebration with the date outlined by colourful fiery sparklers on a dark New Year's Eve night

Accessed from CC By 3.0

In an attempt to shake off the sluggishness of New Year and all that, I met with my co-organiser, Rob, today to do some coffee-fuelled forward planning for Hacks/HackersMcr. Here are some of the ideas we’re working on. As always, do let us know if you have any suggestions for themes, speakers, events or skill-shares. Spread the word!

  1. Late Feb/March – Hack the Election! There’s an election coming up. (Had you noticed?!) But how could news organisations get younger people interested in politics? Are games, apps, cool tools the answer? We’re going to bring together hackers, games developers, Apps developers, journalists, students to work in informal groups on their own crazy ideas (you don’t have to actually build anything there and then! Just come up with an idea and maybe a few drawings). Then groups get the opportunity to pitch them and vote on a winner!
  2. May – Digital Mapping. Maps can illuminate ideas in all sorts of amazing ways so we want to bring together journalists, technologists, artists, geographers to tell us about the latest ideas for mapping the future. We’re expecting this to be a weekend event to give us a bit longer to play and we hope to arrange some mini-skillshares so you can learn a few new techniques.
  3. Learning Lunches. Bring your Own Lunch and learn a new skill! We’re thinking APIs, regular expressions – anything, really, that falls into the broad hacks/hackers remit. Again, ideas and offers welcome.

There are a few other ideas knocking around as well but these are the main ones we wanted to share with our members. We’re also going to be exploring some new venues so, again, suggestions welcome. Could your organisation offer a space, for example?

Beginner’s easy guide to digital mapping with TileMill

After the euphoria of learning how to GEOCode my spreadsheet data, I then had to learn what to do with it. Even the so-called beginner tutorials I came across weren’t quite beginner enough for me and so I’ve had to do a lot of rooting around for answers. I’m sure one of the generous members of Hacks/HackersMcr would have shown me all this, but I couldn’t wait for the next meet-up….

Why GEOCode in the first place?

It’s true, if you’re happy plonking a few markers on a google map, then you don’t need to GEOCode. Google Maps has an in-built GEOcoder which automatically converts your postcodes and addresses into longitude/latitude without you even realising it’s doing it. But sometimes we get a little bored of seeing yet another Google map, don’t we?? So if we want to create something a bit more styling’, we need to find a mapping tool which will allow us to do some cool customisation. There are many around but in this blog post, I’m going to be using TileMill by Mapbox.

So with TileMill you can really go to town and customise your maps, add layers of data etc. BUT, it won’t automatically GEOCode your data. So you need to go through the steps on the previous blog post to get your data ready for everything that follows from here.


Download TileMill. Just follow the instructions! It should work very easily. Now I’m going to talk you through how to create a map with two types of data (two layers of data). One is a spreadsheet of GEOcoded data to create markers. The other will show the boundaries of English Government regions (GOR) in the form of boundary lines superimposed on the map.

Click on New Project and give it a catchy name. Don’t leave any spaces between words; TileMill won’t like that. TileMill automatically has a layer (of data) pre-installed which shows the boundary lines of countries. It will look like this.

Screen Shot TileMill project

Import GEOCoded spreadsheet into TileMill

You can use this spreadsheet which is a list of universities and HE institutions that are members of Universities UK. (I scraped the data using Outwit but you can use any data for this exercise). It’s not perfect data but it gives us something to play with. I’ve already GEOCoded it. I then need to download it as a .csv file (comma separated file i.e. excel spreadsheet)

To get this data into your TileMill project, click on the Layer icon on the bottom left hand corner and then click Add Layer. Again, give it an ID without any spaces. Let’s call it Universities. Then go down to Data Source and click Browse. Go and find that GEOCoded spreadsheet you downloaded and click Done.

Screen Shot Add Layer

Now click Save and Style and you should find red dots appearing all over your map. Voila!

Screen Shot Red Dots


Adding a Shape File

This bit’s a little trickier and took me some time and searching to get it to work. A shape file is a file that ends .shp. It contains data that will show up as boundary lines on your map e.g. countries, counties, regions. I’m going to use a shape file that will show the boundaries of English Government Regions (GOR) which you can find online here. Click to download. This will give you a zipped folder containing a number of files only one of which is a .shp file. BUT, TileMill will need the full contents of this folder in order to make sense of the .shp file. You can’t simply copy the .shp file and put it in some random folder on your computer and hope to put that into your Datasource in TileMill. You’ll get a nasty error message like this.

Screen Shot Error

Unable to determine SRS for layer “GOR” at /Users/lizabethhannaford/Documents/MapBox/project/UniversitiesDemo/layers/GOR/Regions.shp

Not nice! That’s because the .shp file has become separated from all the other files it depends on in that zipped folder and so it no longer makes sense. So save the entire zipped folder somewhere sensible that you’ll be able to browse to once you’ve downloaded it. There’s no need to try opening any of the files inside it. Now browse to that zipped folder in the Datasource window.

Screen Shot Folder
Look how cleverly the Regions.shp file now stands alone! Click on it to add it to the end of the Datasource. That file path should now end in .shp so click Done. Then click Save and Style. NO error message this time. Yay!

Screen Shot Boundaries
So we can see the boundary lines but the green fill colour has obscured our dots, annoyingly. But don’t worry! We can fix that by tweaking the CODE in the right hand column. This code is called CartoCSS and, as the name implies, it’s a particular form of CSS that works for styling maps.

Look for #GOR and you’ll find the styling instructions for the shape file layer we just added. We need to reduce the opacity so our dots show through. Let’s change it to 0. Whilst we’re at it, let’s make the boundary line a little thicker by changing it from 0.5 to 1.

Screen Shot tweaked CartoCSS
OK, so it’s no work of art, but it does get us started and opens up some fun possibilities.

Next Steps….

  • Find different shape files to display different boundaries and other features
  • Learn more about CartoCSS and experiment
  • Are there stylesheet libraries that are available to copy and paste?

Hacks/Hackers Manchester – December Meet-Up – Wakelet

Wakelet – collect and organise everything!

One of the things we like to do at Hacks/HackersMcr is showcase local tech companies and, hopefully, learn from their experiences. So we were very pleased to welcome Wakelet (the whole team!) to our December meet-up.

The idea behind Wakelet is that it allows you to bring together all your beautiful/important web content into one place – either for your private use or to share publicly. Each collection is called a Wake and they’re easy to embed on your existing website. Here’s a seasonal one!

I’ve also seen one of my former journalism students at the University of Salford create a Wake of  libel cases in the news to help him with his Law and Ethics Module. He shared it with fellow students on FaceBook as a potential useful learning resource.

So I like Wakelet and I think it’s got potential. It’s FREE and I see it being a really useful learning tool in class to curate and share resources around a subject.

And to show you how easy it is to use, here’s my first Wake….