I was curious about all of the birth years that US has been in and which birth years have no had to go to war. Turns out pretty much everyone except this latest generation (Gen X).

I found this data source: https://www.familysearch.org/en/wiki/Ages_of_Servicemen_in_Wars

As of writing this article (2023-09-21), the data is as follows:

There are multiple ways to get a timeline. Easy way is to just copy paste that content and ask ChatGPT to generate a visualization for you. However, where is the fun in that. You can also use python, mermaid, or plantuml. Python is self explanatory, you can write code to plot this information. Mermaid and platuml are services (and programming packages) that can create charts and diagrams. The require their own syntax which is usually pretty straight forward.

Here is the syntax for the timeline above in Mermaid (note both plantuml and mermaid support many other formats than timeline; however for this example we will just use timeline).

gantt
    title Wars and Typical Years of Birth
    dateFormat  YYYY
    axisFormat  %Y

    section King William's War
    War           :1689, 1697
    Years of Birth:1629, 1681
    
    section Queen Anne's War
    War           :1702, 1713
    Years of Birth:1642, 1697

    section King George's War
    War           :1744, 1748
    Years of Birth:1684, 1732

    section French and Indian War
    War           :1755, 1763
    Years of Birth:1695, 1739
    
    section Revolutionary War
    War           :1776, 1783
    Years of Birth:1715, 1767
    
    section Indian Wars
    War           :1780, 1890
    Years of Birth:1720, 1880
    
    section Barbary Wars
    First         :1800, 1805
    Second        :1815, 1815
    Years of Birth:1740, 1799

    section War of 1812
    War           :1812, 1815
    Years of Birth:1752, 1799

    section Mexican War
    War           :1846, 1848
    Years of Birth:1788, 1832

    section Civil War
    War           :1861, 1865
    Years of Birth:1801, 1849

    section Spanish American War
    War           :1898, 1898
    Years of Birth:1838, 1882
    
    section Philippine Insurrection
    War           :1899, 1902
    Years of Birth:1838, 1886
    
    section World War I
    War           :1917, 1919
    Years of Birth:1858, 1900

    section World War II
    War           :1941, 1945
    Years of Birth:1881, 1927
    
    section Korean War
    War           :1950, 1953
    Years of Birth:1890, 1935
    
    section Vietnam War
    War           :1965, 1973
    Years of Birth:1905, 1955

    section Gulf War
    War           :1991, 1991
    Years of Birth:1931, 1973

    section Afghanistan War
    War           :2002, 2002
    Years of Birth:1942, 1984
    
    section Iraq War
    War           :2003, 2023
    Years of Birth:1943, 1989

You can then put the code into a Mermaid live editor (right on their site). Paste in the code and click the sync button and you will get the following output.

Sidenote: pantuml also has a live editor.

Mermaid has options to save to PNG, SVG and export to PNG and SVG. I noticed that the save and export have different themes. I liked the export to SVG theme better and used that for the screenshot above.

Leave a Reply

Your email address will not be published. Required fields are marked *