Germany’s U-Boats & Data Visualization

Can data visualization offer answers to our questions about history?

Kaden Hendron
6 min readApr 20, 2016


This is a companion piece to the U-Boat Timeline, an interactive data visualization built with D3.js. A method post on my process and tools can be found on my portfolio site.

U-Boats, Germany’s WWII submarines, endure notoriously in public consciousness, a result of their terrifying wartime effectiveness and dramatic media portrayals. I set out to understand the complex and intriguing history of U-Boats through data visualization.

U-Boats comprise an appealing data set due to their systematic organization (numbered from U-1 to U-4712) and their sheer number (1,153 in total). By contrast, America only commissioned around 300 submarines during WWII, and their naming/organization scheme was not nearly so tidy. Thanks to the painstaking research by contributors on there exists a complete archive of every U-Boat and every ship sunk by a U-Boat. I collected data from the site using the scraping tool and cleaned the data with Excel, compiling a data set comprising thousands of rows. You can access that data through the project GitHub repository.

With my data set assembled, I set out to explore some questions — who were the most effective U-Boat commanders? How did U-Boat effectiveness change over time? Where did U-Boats operate around the world?

The Top U-Boat Commanders

U-Boat commanders enjoy a similar status to fighter aces, ranked and compared for their effectiveness in war. There are three metrics by which to measure a commander’s success: tonnage sunk, ships sunk, and kills. Tonnage is perhaps the most common, as it favors commanders who sunk the largest ships (quality over quantity). Number of ships sunk favors commanders who sunk more ships, but ignores the size or value of those ships (quantity over quality). Kills, perhaps the more morbid of the metrics, gives interesting insight into the human toll inflicted by U-Boats.

Otto Kretschmer, highest ranked U-Boat commander

The above visualization ranks 15 commanders by the three metrics (left to right: ships sunk, tonnage sunk, kills). Otto Kretschmer exceeds all others in both ships and tonnage sunk. His record is particularly interesting for the fact that he only served in wartime for a year and a half until he was captured by Allied forces in March 1941.

Also of note is Günther Prien: by ships sunk, he is only ranked as the 8th most successful commander, but by kills he nearly doubles the next deadliest commander, Wolfgang Lüth. This is due largely to his sinking of two British ships: HMS Royal Oak and SS Arandora Star. Royal Oak, a Revenge-class battleship, was sunk at port with 833 crew killed and only 375 survivors. Arandora Star was sunk en route to Canada with a loss of 804 men — the majority of them Italian and German prisoners of war.

The sinking of the HMS Ark Royal

The above visualization shows the top 15 Allied ships ranked by total dead and survivors. Günther Prien’s two major kills, Arandora Star and Royal Oak, are ranked 1 and 5, respectively. Also of interest is the contrast between the Laconia and HMS Ark Royal; the former a troopship that lost almost 90% of its complement of 741; the latter an aircraft carrier that lost only one man out of its crew of 488.

The U-Boat Threat Over Time

When war broke out in September 1939, the German Navy already had over 50 U-Boats in active service, many of them already on patrol in the North Atlantic. U-30 sunk the British passenger liner SS Athenia only hours after war was declared on September 3rd, proving that Germany’s submarine fleets were prepared to wreak havoc on Britain’s vulnerable merchant vessels.

The above visualization shows the changing number of Allied ships sunk by U-Boats over time. The United Kingdom and the United States, the hardest hit nations, are shown in blue; the other 45 nations which lost at least one ship to U-Boats are aggregated and shown in grey. The peaks in the chart highlight what were known as the First and Second “Happy Times.”

The First Happy Time lasted between June and October 1940, during which time the U-Boat fleets enjoyed significant success against the British. This was in part due to the fall of France and Norway to German invasions and the subsequent freedom U-Boats experienced in those nations’ coastal waters. The end of this period is attributed to the loss of the three most successful early-war commanders: Otto Kretschmer (captured), Joachim Schepke (killed), and Günther Prien (missing and presumed dead).

The Second Happy Time occurred between February and December 1942. British sinkings remained high during this period, but Germany’s primary success was against the Americans, fresh into the war as of the Pearl Harbor attacks in December 1941. For several months, Americans ignored the lessons the British had learned during the First Happy Time: to sail without lights near coastlines and avoid sailing along marked routes. U-Boats lurked within miles of the east coast, sinking merchant vessels leaving American ports.

By mid-1943, the tide turned in favor of the Allies. The above visualization illustrates the relative impunity U-Boats had experienced up until that point in the war; U-Boat losses were minuscule compared to the amount of ships they were sinking. But beyond that point, U-Boats were consistently sunk in even higher numbers than the Allied ships they targeted. This can be attributed to several things: the adoption of convoys by American vessels, increased numbers of military escort ships, Allied air superiority over the Atlantic, and the deciphering of the Enigma code (a vital accomplishment for which Alan Turing is remembered).

The Range and Territory of U-Boats

A surprising aspect of the U-Boat story is the incredible range capable of the submarines. U-Boats operated as far from Germany as the Gulf of Mexico, the Indian Ocean, and the Black Sea. U-Boats even made journeys to Japan to exchange intelligence and technological material; by the end of the war, submarine voyage was practically the only manner by which the two allies could communicate.

The above visualization indicates the locations where U-Boats sank between 1939 and 1945. It illustrates the extensive range of U-Boats— notice the submarines sunk off the coast of Madagascar, in the Java Sea of Indonesia, and in the Arctic Sea north of Russia. The trend across time is also interesting: U-Boats maintained a relatively close range to Europe between 1939 to 1941. 1942 saw a rise in attacks across the Atlantic following America’s entry to the war. 1943 and 1944 saw the increased range of U-Boat attacks but also a growing number of U-Boat losses in the North Atlantic. By 1945, the U-Boats operational range was noticeably restrained to the Atlantic and Germany’s coastal waters.

U-234 upon capture by the U.S. Navy en route to Japan

My goal with this project was to use data to analyze a historical subject not traditionally explored with data visualization. This project was made possible by the comprehensive research compiled by Visit my interactive U-Boat Timeline to see a visual history of all 1,153 U-Boats. All the data used in this article, as well as the source code for the Timeline, is available open-source on the project GitHub repository. I would invite you to download the data and explore your own hypotheses or fact-check mine! I greatly appreciate any feedback or insights.

You can find more of my work at my portfolio site.