This program takes one or more input files and produces a time graph. Supported (and planned) features include:
Gantt charts can be used to plot lifespans, events with duration, eras and historical periods, etc. Biographical Gantt charts can look much like this example.
Numerical data can be plotted as a line chart or a stacked area chart, depending on the command line switch
Text timelines for events without duration
Most planned features supported. The charts should look prettier, though.
Currently this program only supports data files in CSV (comma-separated values) format, although there are plans to add the ability to read data from Excel and OpenDocument spreadsheets, and even JSON.
Files are not required to have column labels, but they may be useful for chart legends in numerical data. The program should have the ability to detect the presence or absence of column labels.
Currently, the program only supports decimal numbers for time indexing. Those decimal numbers can represent whatever you want (years, days, etc).
There are plans to support more date formats.
Three columns:
John Smith,-15.8,40.01
Jane Smith,-13.14,50.6
Archie Smith,10.9,98.6
At least two columns:
1.4,7.825
2.6,14.21
5.1,28.6
7,56.98
8.5,112.5
Optionally, you can assign columns to a secondary y-axis with a JSON string. In order to assign columns, you must name your columns with a header row.
The primary and secondary axes are specified by two objects: primaryAxis and secondaryAxis, respectively. These two objects may contain any combination of the following keywords:
Max: the maximum value of the y axis. Not currently supported Min: the minimum value of the y axis. Not currently supported Interval: the distance between the tick marks. Columns: A list of objects. Each object must contain a name field, which must correspond to a named column. Each object may optionally contain a style field, which specified the style of the line. Currently, only the values "default" and "dashed" are supported.
{
"primaryAxis": {
"max": 100,
"min": 0,
"interval": 10,
"columns": [
{"name": "Column1"}
]
},
"secondaryAxis": {
"max": 1.0,
"min": 0.0,
"interval": 0.1,
"columns": [
{"name": "Column2", "style": "dashed"}
]
}
}
Two columns:
1.4,A thing happened
12,Another thing happened
This program is invoked from the command line. There are two switches for the two different types of data:
There will be one file generated per chart
python3 timeline -g importantPeople.csv importantProjects.csv -l gdp.csv population.csv -a energyProduction.csv -e events.csv