Hacker News new | past | comments | ask | show | jobs | submit login
Bureau of Labor Statistics Public Data API (bls.gov)
59 points by kmfrk on Sept 14, 2013 | hide | past | favorite | 25 comments



An interesting micro-site – it seems very much more aimed at people who know BLS data already, and much less aimed at coders. The FAQ answers the question "What is an API?", but doesn't even have a list of the IDs required in order to get any data whatsoever out of that API. It does however point to this page which is helpful, if not comprehensive: http://www.bls.gov/help/hlpforma.htm

And the API itself seems quite simple and easy to use - so it looks like good access to important data.


I think HN took the API down about 10 min ago.

Before people start iterating every code variation to hit the API and fill their DBs, I think you can download the data from here: http://www.bls.gov/data/


or from here if you already know all the series codes: ftp://ftp.bls.gov/pub/time.series/


There should probably better documentation for all of the data, since it isn't uncommon to see headlines that use the wrong time series for a particular concept.

That said their phone support is pretty excellent, and you'll likely get a direct line to the researcher preparing the data.


Hmm, seemed pretty straight forward to me, clicked on databases which took me to http://www.bls.gov/data/

Clicking on 'Top Picks' (its a badge but its also a link) got me to here: http://data.bls.gov/cgi-bin/surveymost?cu with some series indicators in it.

Clicked on Food and Beverage, selected some years, added a graph and got back the CPI for food and beverages between 1990 to present.


A couple of years ago I did a research project using the current population survey (CPS) from the BLS and I was surprised about how much interesting data there is.

I'm not sure if they've improved since 2011, but at the time it was very hard to parse and order the public data sets since the headers have changed so much over time and the data is not harmonized. I can't tell if BLS has done much data consolidation through this API, but if you're looking to consume this data I recommend just downloading it and parsing it yourself.

The IPUMS project from the University of Minnesota[1] is an excellent resource for anyone actually wanting to look at BLS / CPS data over time. They do a lot of the gruntwork for gathering CPS results across the years and synthesizing the various codes, field names, and standards into a coherent data set.

For anyone interested in actually using CPS data, a colleague and I wrote a (rather shitty) Java program to parse IPUMS data into a local longitudinal dataset. The code was written by sophomores in college, so I can't promise that this code is any good, but it's probably a good place to get started if you're interested[2].

[1] http://www.ipums.org/ [2] https://github.com/c-johnson/CPSMatcher


This is great. BLS was a huge help to me in my last year of university when I was freaking out trying to figure out what to do with my life. Just seeing what professions most people have, and which ones are growing vs. shrinking, was very illuminating. Methinks more people need to see this data.


This is huge. I can't wait to use this. Now we just need the same thing from the CDC, FDA, DOJ, DOE, etc.


Hey Alex,

I'm a Presidential Innovation Fellow focusing on open data initiatives at the FDA. I'm working to get a number of our datasets made public and available via APIs. I'd love to talk to you about what would be useful to you (and others) and how we can help. Feel free to email me at sean.herron@fda.hhs.gov if you want to chat.


Sean thanks for the offer, I'll definitely shoot you a note in the next couple days.


Some data from the CDC, FDA, and more are available from data.gov and healthdata.gov. Many agencies choose to adopt a open data platform like socrata.com (I know these guys and they rock). Is there anything specific you're looking for from CDC/FDA? Health data is my thing.


Thanks for the advice. Shoot me an email, I'd love to ask your opinion on a couple things related to an open data project I'm doing.


Emailed you but never got a reply


That's incredible... a statistical data JSON API that provides Java and Ruby code snippets, but not Python, R, or even Javascript. My right-wing friends would cite this as further evidence that the Obama administration is out of touch.

Maybe it's a backhanded complement and they think that Python and R folks can figure this out on their own...? :-)


Indeed. Pretty quick work with RCurl & RJSONIO… https://gist.github.com/hrbrmstr/6566865


Has anyone found a way to find series ids? I keep getting "message":["Invalid Series for Series xyz1234"]



When is this department going to collect the data ( or perhaps it already does? ) - Which major in college actually gets jobs for students (say within 5 years of graduation - according to their training) ? Last time I called them, they told me, you should do your own statistics if you want to answer that. Does anyone know?


A lot of schools provide that sort of data but of course it is biased. You could also use proxies for this such as LinkedIn and other self-reported data like https://angel.co/colleges


Looks like there is no CORS support: an OPTIONS calls result in a 403 Forbidden, and 'Origin' headers don’t get us 'Access-Control-Allow-Origin' response headers.

Which is a shame because a Web-only client would have been fun - and easy as the API is wide open and doesn’t require registration.


How timely is the data? As in: When new data/reports are available, when will they be accessible via the API?

I was unable to determine if using the API could provide a first mover advantage for trading applications that take BLS data into consideration.


Here is a link to releases:

http://www.bls.gov/bls/newsrels.htm

I vaguely remember an article that said that some folks get the BLS data a few milliseconds faster than everyone else and avail themselves of this first mover advantage -- don't quote me on that, though. Regardless, I somehow doubt this API will be useful for first mover advantage unless perhaps you are already doing this type of technical trading in the finance industry.


You're probably referring to this Rolling Stone article:

http://www.rollingstone.com/politics/blogs/taibblog/16-major...


This is awesome.. but are we sure this is brand new? I feel like I've seen this before (then again, I do dream about government APIs and data). I do know the page says "Last Modified Date: August 19, 2013"

Does anyone know more?


+1 for not calling it a "REST API".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: