HomeContactLinks

Useful Datasources

By Flib

2009-05-12

Category: Reference

The Problem

A site is only as good as the content it contains and reusing existing content in new ways is an easy way to minimise the effort required to produce new applications.

In this short article, I explain a few of the freely available data sources online. Some of these may be covered at a future date in more detail. This is really just aimed as a quick overview.

The Solution

Currency Data

I have already covered some of the freely available exchange rate feeds in a previous article so I wont cover it again unless I have something new to say. However there is one point that is useful when dealing with currencies.

The first two letters of a currency code are the iso 3166 code of the country that owns that currency.

This means that even if you have never seen the currency code before, you can support it. You just need a list of iso3166 codes, although this table also shows some that don't follow that pattern.

Country codes - ISO3166-1

ISO3166-1 is an international standard that covers a set of short codes that allow unambiguous identification of a country. They may lag behind political developments by a couple of years and some of the decisions are politically motivated, but its a good starting point. The country domain names (ccTLDs) are derived in part from ISO3166.

French and English versions of the data are available

This table is useful to see at a glance the status of any particular code and its validity.

Region Codes - ISO3166-2

ISO also provides a list of subdivision codes for many countries as specified in ISO3166-2. They don't exist for all countries, but are useful where availble.

Country Data - CIA World Factbook

Much of the information the US government and its agencies produce is in the public domain. The CIA World Factbook is one such resource.

Its updated every 2 weeks and contains statistics about different countries around there world.

You can download the whole factbook for offline processing. The text version is easier to import into your own programs.

Phone country codes

Phone numbers consist of a country code and then its up to a particularly country to specify how they use any following numbers. The country codes are specifed in ITU standard E.164. Put simply, the first digit of the country code determines its global region, then the 2nd and possibly 3rd digits specify the country.

I wont publish the data here, since its available on the ITU site. However, some people might find the following useful.

Prefix (Zone)RegionComment
1North AmericaThis covers the whole of the North American continent, including many islands off the coast.
2AfricaThis covers the whole of the African continent, including many islands off the coast.
3/4Europe 
5Mexico, Central and South America 
6Southeast Asia and Oceania 
7Russia and Kazakhstan 
8East Asia and Special ServicesSpecial services includes satellite phones and international freephone (00800)
9West, South and Central Asia 

UN Lo/code - Location Data

The UN with its international remit makes a lot of data available. One of the most common is the Lo/code system. This builds upon ISO3166 to provide an unambiguous codes for places around the world. The data is available here and includes latitudes for many places.

FIPS - Location Data

FIPS (Federal Information Processing Standard) location codes are used throughout the US govenment. They cover the US and some of its outlying areas and can be found here.

©2009 AskFlib.com

Powered by Sysdom Support Services