About the Death Toll Chart Generator

It should come as no surprise to learn that in military conflicts, counting the dead is a morbid and difficult task. As wars grow in size and scope, the counts only worsen, not only in number but in accuracy. The chaos of war, the deserters, the missing, the people with no physical, identifiable remains — they all factor into the inaccuracy of reported death tolls.

Once political and historical biases come into play, the numbers might already be so off that the biases might bring them back into alignment with their true values. This is not usually the case though, and most historians argue that in the majority of conflicts, reported death tolls are lower than the true numbers.

I decided to make a chart to see how this all pans out, country by country.

How Does it Work?

If you don't care about how it works, skip this section

Feel free to look at the code. It's barely documented, but it's in javascript and editable if you download index.html (the framework for the layout), chart.js (the main number crunching functions), jquery.js (additional number functions and fancy effects framework), and qsort.js (a custom quicksort algorithm for multi-dimensional arrays). You might also want dash.gif if you want to deploy this on your own computer/server.

In fact, I encourage everybody with data that fits this format — sources, countries, reported death tolls — to download these files and input that data into the program. The parseArguments() function accepts arguments in the form source, country, number, source, country, number for as many sources, countries, and death tolls as you can feed it. I simply input the numbers for WWII, but any conflict with this data will work.

Once I input the data into the parseArguments() function, a few other functions are called which sort the data into arrays, calculate Minimums, Maximums, Medians, and Percent Differences for all the countries and sources as compared to one another. I created my own functions to calculate MINs, MAXs, MEDs, and PDs. The calculation for percent difference was retrieved from wikipedia.

Since the data can be input in any order the user desires, I created functions to group the sources into categories based on the limitations of the layout — computer screen dimensions being the main constraint. That means that instead of each source getting its own "tick" on the chart, the charts are divided into groups of percentage ranges. For example, on a chart 400 pixels high, if the maximum percentage difference it 150% in either direction, and the font takes up 10 pixels in height, this is how it breaks down:

• 2 lines of sources must be available per group = 20px height per group
• 400px chart ÷ 20px per group = 20 groups
• 300% total (150% negative and positive) ÷ 20 groups = 15% range per group
• Therefore, any sources within 15% of other sources are grouped together (with some caveats, i.e. if the cutoff is at 47%, then although a source at 45% diff and a source at 48% diff are very close to one another, they are assigned to different percentage groups).

I think I'll save the nitty gritty of the programming for another day. Plus, I definitely need to clean up the code and document it. Since it is so easy to create the chart if you already have the data using my parseArguments() function, I would like to make the function public and improve the layout to make it more flexible and user friendly.

So What?

I hoped with this chart (and my World War I chart: pdf version/jpg version) to understand where the numbers vary the most, and maybe why they vary so much for some sources. I don't know if I accomplished the latter (the former is easily found by looking for the countries with the largest variation in percentage difference between sources), but I made an important realization regarding the noting of death tolls in historical accounts of military conflicts:

That whenever writing about war, one should take into account the inconsistencies in these numbers and make it clear to the readers what the numbers mean. In some cases, such as the holocaust, the enormous (by any comparison) magnitude of murder is enough to nullify the probable innacuracies inherent in those numbers. But this is not always the case, and historians should not lead readers into a false sense of knowledge of the value the numbers impart, especially if — as is the case with very large wars — the numbers are not agreed upon by all historians.

Lastly, a "thank you" is in order. The numbers would have been much more difficult to find if not for the meticulous compilation of death tolls for world atrocities written by Matthew White.


← Back to the charts