Dow Jones Industrial Average

From Geohashing
Revision as of 02:55, 22 May 2008 by imported>NuclearDog (New page: The Dow Jones Industrial Index is a well known indicator of the overall health of the economy calculated using the current value of a variety of stocks along with the 'Dow Divisor'. The op...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Dow Jones Industrial Index is a well known indicator of the overall health of the economy calculated using the current value of a variety of stocks along with the 'Dow Divisor'. The opening Dow Jones Industrial Index is used in the Geohashing algorithm.

If you're programming a geohashing calculator, mapping service or other related service, you'll need a source for the current and historic DJI value. This page lists known sources and ways to access them and access restrictions.

Conventions

In the following descriptions, tokens will be used in URLs to represent values of the date as specified on this page on the PHP website. Specifically:

  •  %Y is the four digit year (Eg, 1990)
  •  %m is the two digit month number (Eg, 03)
  •  %d is the two digit day number (Eg, 14)

irc.peeron.com

The reference implementation has the DJI values available at:

http://irc.peeron.com/xkcd/map/data/%Y/%m/%d

The values available from this source span January 2nd, 1970 until present day. It's update frequency and source is unknown. The server location is unknown.

Although there are no obvious restrictions in place, no one has come out and stated that this is for public use yet.

xkcd.nucleardog.com

This implementation provides a mySQL backed DJI service. Values can be queried from:

http://xkcd.nucleardog.com/getdow.php?year=%Y&month=%m&day=%d

The year, month and day values are fairly flexible. Leading zeros are not significant. If you request a date that is not in the database, it will return the string 'null'.

The database spans January 2nd, 1970 to the present date.

If you would like it to try and compensate for weekends/other dates with no values, you can pass any value into the GET variable 'compensate', and if you pass it a date with no value, it will work backwards until it finds a date with a value.

The server updates from Google Finance every hour and is located in Texas, United States.

The service is free for public use up to a reasonable volume.