by Klaus Graefensteiner
22. June 2010 02:00
Introduction
Every now and then I need to work with US states data, but I never seem to find the right format on the interweb. The best I found so far is the following wiki article: http://en.wikipedia.org/wiki/U.S._state.
Figure 1: US states
In preparation of this article I created a Microsoft Excel spreadsheet that contains the following information for each of the 50 US states:
- name
- abbreviation
- capital
- most populous cit
- population
- square miles
- time zone 1
- time zone 2
- DST (daylight savings time)
Figure 2: Looking at the states table
Next I converted the spreadsheet into a comma separated file using the Excel Save As command. The CSV I transformed into XML using PowerShell and the XML to JSON conversion was also done using this XML TO JSON online converter .
Download
The set of four files can be downloaded here: StatesData.zip
Ausblick
I hope this will make your live a little bit easier, since you don’t have to find and convert states data yourself.