7

I'm looking for long lists of structured demographic, economic, agricultural and/or geographic attributes of US States. For example:

<geo name="Iowa" population=3107000 cows_per_capita=1.2* etc=...>
<geo name="Connecticut" population=3597000 cows_per_capita=0.2* etc=...>

*Cows_per_capita are my estimates

A great source would be the CIA Factbook (i.e. US), but I don't know where analogous attributes can be found for individual States (also, it's only really structured by 3rd parties - example).

I feel like Wikidata would be also good source, but it seems the attribute lists are limited to qualitative data.


Formats: Appreciated formats are CSV, JSON, XML, .SQL, and even XLS/ODS files.


License: it's for non-commercial use and I'll give plenty of attribution

5
+50

The US Census Bureau has an API for most of its datasets, which will allow you to retrieve state-based data in a structured form.

You just have to request an API key. They provide examples for each of the datasets - a small and basic dataset like the Population Estimates might be a good place to start. This example shows you what you would get if you select all states and the population and date variables from the 2013 dataset (copy and paste the entire link to get it to work):

http://api.census.gov/data/2013/pep/natstprc?get=STNAME,POP&for=state:*&DATE=6

It's plain text data - the format resembles the list type that's used in Python. I don't know if XML is an option or not.

[["STNAME","POP","DATE","state"],
["Alabama","4833722","6","01"],
["Alaska","735132","6","02"],
["Arizona","6626624","6","04"],
....
["Wisconsin","5742713","6","55"],
["Wyoming","582658","6","56"],
["Puerto Rico Commonwealth","3615086","6","72"]]

If you want a wide variety of variables, but don't want to query tons of different tables, you can try pulling from the demographic profile tables from the 2010 Census (table DP-1) and the American Community Survey (tables DP02 through DP05).

3

country.json should help you out on the country level:
https://github.com/samayo/country.json

  • 1
    This would be a great format if it included US States. – philshem Jun 2 '15 at 19:09
  • yeah i know its not exactly what you seek....just trying to help until a better solution comes through – albert Jun 3 '15 at 0:10
  • 1
    I updated the question to be more focused on structured US State data, since I can (manually) compare a handful of countries. – philshem Jun 6 '15 at 16:16
  • should i delete this? – albert Jul 7 at 2:24
  • 1
    nah, better to leave any resource as it could be useful to other people – philshem Jul 7 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.