These are notes to accompany the interactive map (below and on its own page) of the last five millennia of nations, empires and dynasties. You can click on the map to navigate geopraphically or use the slider to navigate in time. You can also click the blue links within one of up to four additional tables, depending on the context.
The original data used for this visualisation can be divided into two kinds:
The map images are based on a 1920-by-1080 (full HD) mask GIF: mask.gif
This is the Robinson projection with λ₀ set to 10°, as used by many Wikipedia maps. White areas are land, blue areas are sea and black areas are beyond the projection limits. The value of the red (or green) channel tells you how "landy" a pixel is (from no land at 0x00 to 100% land at 0xFF). The value of the blue channel tells you how "oceany" a pixel is.
Due to the nature of Robinson's projection, the land area represented by a single pixel in the mask is a function of the latitude and the pixel's red value; the longitude is irrelevant. Fully-white pixels near the equator represent 340 km². Those at the poles represent less than 6 km².
These thirty GIF files are hand-transcribed approximations (using Paint Shop Pro 5!) of the following maps from the Atlas of World History:1
| GIF name | Year | Reference | Section | GIF image |
|---|
Each GIF file uses the index of each pixel to assign that section of land to a particular region.
Indices 0x00 and 0xFF are reserved for "Ocean" and "Unclaimed" respectively, but other indices are assigned to different regions in different files.
For instance, index 0x03 is assigned to the "Roman Empire" in "year-b0200.gif" but to "Andorra" in "year-1848.gif".
The mappings are explicitly defined in whim.tsv.
This tab-separated value text (TSV) file holds the main chronology.
Each line represents a single, timed entry.
Comments are preceded by a hash "#".
The columns are as follows:
~" signifying "BCE".
Ranges are two years separated by a hyphen "-".
For example, "~123-456" represents the year range 123BCE to 456CE.
| Verb | Parameters | Notes | Example |
|---|---|---|---|
| NATION | code hue name |
Introduces a new nation, code.
hue is an integer representing a hue angle (in degrees) from the HWB colour space.
name is the English-language name of the new nation.
|
873 NATION JE 300 Jersey |
| REGION | code parent [hue] name |
Introduces a new region, code, that is a child of parent.
If hue is missing, the new region inherits the hue of its parent.
name is the English-language name of the new region.
|
1250 REGION FI SE 210 Finland |
| EMPIRE | code hue name |
Introduces a new empire, code.
Empires do not have pixels assigned directly to them, but may contain a hierarchy of other empires, nations and regions.
name is the English-language name of the empire.
|
1282 EMPIRE ~AT 165 Habsburg Empire |
| PARTOF | code parent |
Changes the parent of a nation/region/empire, code, to a different nation/region/empire, parent.
|
1066 PARTOF JE GB |
| DEPART | code parent |
Detaches the nation/region/empire, code, from its current parent nation/region/empire, parent.
|
1990 DEPART LT ~RU |
| DEFUNCT | code |
Removes an existing nation/region/empire, code.
It must not belong to a hierarchy nor have any remaining pixels.
|
1990 DEFUNCT DD |
| NAME | code name |
Changes the name of a nation/region/empire, code, to name.
name is the English-language name.
Names can change through time.
|
1990 NAME NA Namibia |
| HUE | code hue |
Changes the hue of a nation/region/empire, code, to hue.
hue is an integer representing a hue angle (in degrees) from the HWB colour space.
Hues can change through time.
|
1635 HUE MN 210 |
| CAPITAL | code name latitude longitude |
Specifies the capital city for nation/region/empire, code.
name is the English-language name of the capital city.
latitude and longitude are the capital's geographic coordinates expressed as signed decimals.
Capitals can change through time.
|
226 CAPITAL IQ Baghdad 33.3153 44.3661 |
| EMBLEM | code stub |
Specifies the emblem or flag file for nation/region/empire code.
If stub file name does not start with an underscore "_", the image is assumed to be a flag and is rendered without a coloured background oval.
See below for a list of emblems.
|
1940 EMBLEM ~FR fr-1940 |
| APPEAR | code stub index |
Fades in a nation/region, code, based on the pixels with index index in checkpoint GIF file stub.
The new nation/region is expected to have no visible pixels on the map before this instruction and does not cover existing nations/regions.
The transition occurs between the years specified in the range.
If only one year is specified, the range is computed based on that year (longer durations for earlier years).
|
800 APPEAR HOLY year-0800 1 |
| SNAP | code stub index |
Like 'APPEAR' but happens instantaneously.
The new nation/region is expected to have no visible pixels on the map before this instruction and does not cover existing nations/regions.
|
1959 SNAP AQ year-1974 255 |
| CONJURE | code stub index |
Like 'SNAP' but covers at least one existing nation/region.
The new nation/region is expected to have no visible pixels on the map before this instruction.
Note that this is the least aesthetically pleasing transition.
|
1945 CONJURE YU year-1950 252 |
| EMERGE | code stub index |
Grows an existing nation/region, code, until it matches the pixels with index index in checkpoint GIF file stub.
The transition occurs between the years specified in the range.
|
1137-1270 EMERGE ET year-1279 13 |
| EXPAND | code stub index |
Grows an existing nation/region, code, into pixels with index index in checkpoint GIF file stub.
Extant pixels not in stub are not removed.
The transition occurs between the years specified in the range.
|
1783-1812 EXPAND US year-1812 1 |
| SHRINK | code stub index |
Shrinks an existing nation/region, code, leaving only pixels with index index in checkpoint GIF file stub.
Pixels in stub that would result in growth are ignored.
The transition occurs between the years specified in the range.
|
1848-1880 SHRINK ET year-1880 49 |
| ERODE | code |
Shrinks an existing nation/region, code, to nothing.
The transition occurs between the years specified in the range.
|
1783-1806 ERODE HOLY |
| MORPH | code stub index |
Grows/shrinks an existing nation/region, code, until it matches the pixels with index index in checkpoint GIF file stub.
The transition occurs between the years specified in the range.
|
1783-1812 MORPH RU year-1812 16 |
| EVOLVE | code before after evolutions |
Evolves an existing nation/region, code, from specification before to specification after using the rules listed in evolutions.
See below for the format of specifications and evolutions.
The transition occurs between the years specified in the range.
|
1880-1914 EVOLVE BR latest year-1914 already:BR:31,expand:*:31,shrink:BR:34:CO,shrink:BR:161:VE |
| SPLIT | before after stub index |
Splits part of an existing nation/region, before, to create a new nation/region, after.
The pixels to be split off are those in checkpoint GIF file stub with index index.
The new nation/region is expected to have no visible pixels on the map before this instruction.
The split occurs between the years specified in the range.
If only one year is specified, the range is computed based on that year (longer durations for earlier years).
|
1888 SPLIT MY BN year-1914 27 |
| FLIP | before after |
Flips all pixels of an existing nation/region, before, to another nation/region, after.
The transition occurs between the years specified in the range.
If only one year is specified, the range is computed based on that year (longer durations for earlier years).
|
1950 FLIP TIBET CN |
| EVENT | notes |
Adds an event to the history.
notes is the English-language text with references to empires/nations/regions denoted by their codes enclosed in square brackets, "[]".
The special form "[|]" is used to refer to the original name of the code before the preceding 'NAME' or 'DEPART' instruction.
|
1453 EVENT [|] succeeded by [TR] after fall of Constantinople |
| CHECKPOINT | stub indices ignore |
Marks a checkpoint GIF file, stub.
indices is a comma-separated list of codes corresponding to the pixel indices in the image.
ignore is a comma-separated list of codes to ignore during sanity checking.
See the source code for more details.
|
~3000 CHECKPOINT year-b3000 EG,SD,MINOA,PERSIA,GR,INDUS,ANDES,CN2 XX |
| SKIP | year |
Fast forwards most pixel transition processing until year year.
Only useful during development to speed up response times.
|
~3000 SKIP 2025 |
Specifications in the 'EVOLVE' instructions (and internally within the code) adhere to the following syntax:
| Specification | Notes | Example |
|---|---|---|
| empty | An empty set of pixels. | empty |
| latest | The latest set of pixels for the relevant nation/region code. | latest |
| (x,y) |
A single pixel at full HD coordinates (x,y).
|
(1090,310) |
| stub |
The set of pixels in checkpoint GIF file stub for the relevant nation/region code.
|
year-1812 |
Evolutions in the 'EVOLVE' instructions (and internally within the code) adhere to the following syntax:
| Evolution | Notes | Example |
|---|---|---|
| already:before:after |
Matches pixels that are before in the source specification and after in the destination specification.
before is a code string.
after is either a code string or an index integer, depending on the destination specification.
These pixels will be left untouched.
|
already:ELAM:9 |
| expand:before:after[:target] |
Matches pixels that are before in the source specification and after in the destination specification.
before is a code string or "*" meaning any unmatched pixel value.
after is an index integer.
target is a code string for the desired pixel value.
If target is omitted, it is assumed to be the code for the relevant nation/region.
Matching pixels will be transitioned to target.
|
expand:*:15 |
| shrink:before:after[:target] |
Matches pixels that are before in the source specification and after in the destination specification.
before is a code string.
after is an index integer or "*" meaning any unmatched pixel value.
target is a code string for the desired pixel value.
If target is omitted, it is assumed to be "XX".
Matching pixels will be transitioned to target.
|
shrink:BR:17:BO |
| PNG stub | Emblem | PNG image |
|---|
It takes close to a minute to compute the values of all two million pixels over the course of five thousand years. To speed up page load, pixel values are precomputed and stored in a simple TSV file. Although many megabytes in uncompressed size, it is far quicker to load these values than recompute them. The TSV file has the following columns:
Floating-point numbers are necessary here because pixel transitions are not guaranteed to occur on integer year boundaries due to the nature of the pixel flood algorithms. However, three decimal places is more than enough accuracy.
The user interface is fairly minimal. Clicking on the main map canvas generates a pixel coordinate that is converted to latitude and longitude via the Robinson projection. This is used to update the tables:
The year slider changes the current year or "plays" time forwards and/or backwards. When the year "settles" to a specific value, it is used to update the tables:
Clicking on a blue link within a table updates the currently-selected year and/or region. The tables are then updated appropriately.
A separate web page, whimrec.html, is used to generate individual frames of animation. These can be composited into an animated GIF or a video using gifski or ffmpeg:
These are rendered as sixty second clips at thirty frames per second, by default.