Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the jetpack domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /mnt/stor08-wc1-ord1/694335/916773/www.tvhe.co.nz/web/content/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /mnt/stor08-wc1-ord1/694335/916773/www.tvhe.co.nz/web/content/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the avia_framework domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /mnt/stor08-wc1-ord1/694335/916773/www.tvhe.co.nz/web/content/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /mnt/stor08-wc1-ord1/694335/916773/www.tvhe.co.nz/web/content/wp-includes/functions.php:6131) in /mnt/stor08-wc1-ord1/694335/916773/www.tvhe.co.nz/web/content/wp-includes/feed-rss2.php on line 8
Coding – TVHE http://www.tvhe.co.nz The Visible Hand in Economics Thu, 17 Dec 2015 18:36:06 +0000 en-GB hourly 1 https://wordpress.org/?v=6.9.4 3590215 Young participation in UK higher education http://www.tvhe.co.nz/2015/12/18/young-participation-in-uk-higher-education/ http://www.tvhe.co.nz/2015/12/18/young-participation-in-uk-higher-education/#comments Thu, 17 Dec 2015 17:02:30 +0000 http://www.tvhe.co.nz/?p=12710 HEFCE publish some great maps of participation in higher education and, even better, release the data. I’ve reproduced the map of young participation rates below with a slightly finer grained, sequential colour map, which I think helps to pick out the regions of low participation. Areas where fewer young people progress to higher education are highlighted in red.

]]>
http://www.tvhe.co.nz/2015/12/18/young-participation-in-uk-higher-education/feed/ 4 12710
Quandl update http://www.tvhe.co.nz/2013/10/18/quandl-update/ http://www.tvhe.co.nz/2013/10/18/quandl-update/#comments Fri, 18 Oct 2013 02:48:26 +0000 http://www.tvhe.co.nz/?p=10221 It’s been a few months since I wrote about how much I love Quandl so you might be wondering how things are working out for me. The good stuff is still really good but there are a few things that still need work.

The good

  • I can import data directly from R/Python code without having to go near the ONS website. It’s at easy as Quandl.get('UKONS/ABMI') and I have a properly indexed dataframe ready to go.
  • Once I’ve written the import I can re-run the code and it automatically pulls the latest data so I never need to worry about when the last release was. People lucky enough to have Bloomberg/Datastream probably don’t think this is a big deal but I’m not one of those people.
  • The Quandl maintainers are incredibly good at adding new data sources and you can even upload your own datasets now.
  • It charts the series on the website for you and gives you embeddable charts like this in seconds, without leaving your browser. That is incredibly useful when you want to have a quick look at a series without having to download the data and chart it yourself.Graph of UK Real GDP, % change

The frustrating

  • Quandl are great at adding datasets and great at aggregating data but there’s very little organisation of it so far. For instance, the UK’s GDP series is available from the ONS in three different datasets at two different frequencies and in various forms (raw, SA, %age change, etc). Quandl hosts them all, which is great, but doesn’t draw the links between them. For someone who knows the data that’s fine but it could prove very confusing for a novice. The ONS give the series the same code across all releases so perhaps linking the releases is something that could be done in future.
  • Searching for data is a nightmare. If I search ‘UK GDP’ there are 17417 pages of results and the official ONS data isn’t even on the first page. Okay, let’s narrow the search by suggested sources to the ONS. Now there are only nine pages of results but the GDP series still aren’t on the first page. Luckily, I know the ONS code for GDP, YBHA, so let’s search on that. Uh-oh, no results! How am I going to find this series?! Well, I can see that the other series are coded by Quandl as UKONS/[dataset]_[ONS code]_[frequency], so let’s try just pulling the series UKONS/QNA_YBHA_Q from a Python interpreter. Success, I’ve got the series! But I still can’t see the metadata, or the webpage, or embed a chart, or do any of the other great website things. Update: Abraham Thomas of Quandl helpfully points out that I could go to the address to get the metadata and the link will be automatically expanded.

As Quandl has grown it’s added data very quickly but it’s now at the point that it’s becoming a bit unwieldy without effective search and organisational tools. I really hope that’s next on the devs list of things to do so it can become the fantastic repository that it has the potential to be.

]]>
http://www.tvhe.co.nz/2013/10/18/quandl-update/feed/ 2 10221
How Quandl changed my life http://www.tvhe.co.nz/2013/08/01/how-quandl-changed-my-life/ http://www.tvhe.co.nz/2013/08/01/how-quandl-changed-my-life/#comments Thu, 01 Aug 2013 08:38:05 +0000 http://www.tvhe.co.nz/?p=9268 This post is a little out of the ordinary for TVHE but I thought I’d talk a bit about the tools I use every day. If you’re anything like me you spend an inordinate amount of time cleaning up data. Even something as simple as using GDP in a regression involves finding the right page on the ONS/Stats NZ website, downloading a CSV, then importing the CSV while being careful not to catch any of the extra junk in there. If you’re unlucky enough to get an Excel spreadsheet you usually have to also spend time cleaning up the sheet to import into your favourite programme. I have spent many hours wishing that the ONS/Stats NZ provided a FRED-like API so I could just suck in the latest time series from their server in my code. Something’s wrong when it’s easiest to get the latest UK data from the St Louis Fed!

Thankfully, there is an amazing website that has recently launched called Quandl, which indexes millions of time series from around the world. Importantly, they offer custom-built packages for interacting with their data in R, Python, Stata, Java etc. So now I can grab the UK’s GDP series in Python like this

import Quandl
Quandl.get('UKONS/ABMI')

The first time I did it was great, but then I realised I only had the Blue Book’s annual series and I really needed the quarterly series. Unfortunately Quandl didn’t scrape the Quarterly National Accounts so I thought I was out of luck. I sent an email to their helpdesk asking about adding new series and, incredibly, got an email back from a dev within a day offering to upload all the datasets I could provide urls for. So now, a couple of weeks later, if you want the quarterly series it’s as easy as

Quandl.get('UKONS/QNA_ABMI_Q')

I think this is the beginning of a beautiful friendship for me, but Quandl really need your help. They’re growing fast and keen to expand so, if you know of a dataset they should index, send them an email and make it happen for all of us!

PS. If you’re a Python user you’ll be thrilled to hear that Quandl’s package returns pandas dataframes! You may be surprised at how happy that made me.

]]>
http://www.tvhe.co.nz/2013/08/01/how-quandl-changed-my-life/feed/ 1 9268