Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

27 Commits

Repository files navigation

dynasty

A dynamic visualization tool for dynasties and other succession timelines. Renders dynasty timelines with life, reign and, (if applicable) reign as co-monarch.

Originally built for this visualization of the reigns of the roman emperors.

Roman emperors

Usage

Clone this repository and open index.html in your browser to try it locally. You'll need a local HTTP server for this to work in some browsers. In this case, if you have Python 3, just run python3 -m http.server and go to localhost:8000 in your browser.

To create your own visualizations, prepare 2 CSV files following the format outlined below, and change the variables emperor_file and dynasty_file in the beginning of script.js.

You'll also want to set the other config variables, TITLE, DATA_SOURCE and CREDIT. If you want, you can also disable these things with the SHOW_INFO flag, such that only the actual visualization is rendered. If you want to disable the dynasty labels and bars as well, you can do it by setting the SHOW_DYNASTIES flag.

If you want the visualization as a self-contained SVG, just click the "Download as SVG" button.

CSV files

The visualzation is generated from 2 CSV files, a list of all emperors, and a list of all dynasties. The paths to these files can be configured in the first few lines of script.js by changing the variables emperor_file and dynasty_file.

emperor_file

namebirthdeathascensionabdicationascension (co-emperor)abdication (co-emperor)
stringdatedatedate or "n"date or "d" or "n"date or "n"date or "a" or "d" or "n"
Augustus23/9/-6319/8/1416/1/-27dnn
Valerian#195#260_2701/10/253#260nn
Constantius31/3/250#3061/5/30525/7/306#293a

Explanation of optional parameters:

parametermeaning
nnot applicable (e.g. if an emperor never served as co-emperor)
dabdication date same as death date (died in office)
aco-emperor abdication date same as ascension date to emperor

dynasty_file

name of the dynastyfirst emperor's namelast emperor's namedisplay color
stringstringstringhex color
Julio-ClaudiansAugustusNero#c00465
FlaviansVespasianDomitian#47c00a
AntoninesNervaCommodus#bc0b0b

Date format

The date format is relatively complex because it has to account for incomplete historical records. Dates can be be expressed as precise dates, as full years (very common among roman emperors) and as ranges of time.

nameformatexamplenatural language
Exact dated/m/y4/4/-34April 4, 34 BC
Full year#y#-34At some point during 34 BC
Range between exact dates#d/m/y_d/m/y#2/3/-11_12/7/19At some point between March 2, 11 BC and July 12, 19 AD
Range between full years#y_y#-11_19At some point between January 1, 11 BC and December 31, 19 AD
Range between exact date and full year#d/m/y_y#2/3/-11_19At some point between March 2, 11 BC and December 31, 19 AD

About

dynamic visualization of dynasties

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages