CITE THIS NOTEBOOK: Civil War history with Ulysses S Grant and geography by Peter Burbery. Wolfram Community DEC 13 2022.
I think civil war history is interesting. I like learning about Ulysses S Grant and the Civil War.
In[]:=
Ulysses S. Grant
PERSON
["PropertyAssociation"]
Out[]=

other names
{Hiram Ulysses Grant,Ulysses Simpson Grant,U. S. Grant,U.S. Grant,General Grant,President Grant,Ulysses Grant},
astrological sign
Taurus,
date of birth

Sat 27 Apr 1822
,
place of birth

Clermont County, Ohio, United States
,
brothers
Missing[NotAvailable],
children
{Frederick Dent Grant,Jesse Root Grant,Ellen Wrenshall Grant,Ulysses S. Grant, Jr.},
Chinese zodiac sign
Horse (Yang Water),
daughters
{Ellen Wrenshall Grant},
date of death

Thu 23 Jul 1885
,
place of death

Wilton
,
entity classes
{},
father
{Jesse Root Grant},
full name
Hiram Ulysses Grant,
gender

male
,
height

5
′
8.90
′′
,
husbands
{},
image

,
killed by
Missing[NotAvailable],
space missions
Missing[NotAvailable],
mathematical contributions
Missing[NotAvailable],
mother
{Hannah Grant},
notable film appearances
Missing[NotAvailable],
notable film direction credits
Missing[NotAvailable],
notable film production credits
Missing[NotAvailable],
notable film writing credits
Missing[NotAvailable],
name
Ulysses S. Grant,
nationality

United States
,
net worth
Missing[NotAvailable],
notable artworks
Missing[NotAvailable],
astronomical discoveries
Missing[NotAvailable],
notable books
Missing[NotAvailable],
famous chemistry problems
Missing[NotAvailable],
notable facts
{Presidency marred by economic failure and corruption but known for support of civil rights for freed slaves and Native Americans,Commanded the Union Army in the Civil War, accepting Robert E. Lee's surrender at Appomattox,Never held elected office prior to the presidency but won his first term by an Electoral College landslide,His Vicksburg Campaign is considered a strategic masterpiece and a turning point of the war,First president to serve two full terms since Andrew Jackson,Graduate of the United States Military Academy and a lifelong soldier, promoted to the rank of lieutenant general by Abraham Lincoln},
notable inventions
Missing[NotAvailable],
physics contributions
Missing[NotAvailable],
occupation
{politician},
parents
{Jesse Root Grant,Hannah Grant},
pets
Missing[NotAvailable],
siblings
Missing[NotAvailable],
sisters
Missing[NotAvailable],
sons
{Frederick Dent Grant,Jesse Root Grant,Ulysses S. Grant, Jr.},
spouses

Julia Grant
,
weight
Missing[NotAvailable],
wives

Julia Grant

Make a plot of Ulysses S Grant and events in his life:
In[]:=
TimelinePlot
American Civil War
MILITARY CONFLICT
,
Mexican–American War
MILITARY CONFLICT
,DateInterval
Ulysses S. Grant
PERSON

date of birth
,
Ulysses S. Grant
PERSON

date of death

Out[]=
Learn about the battles Grant fought in:
In[]:=
UlyssesSGrantBattles=
Siege of Vicksburg
MILITARY CONFLICT
,
Battle of Shiloh
MILITARY CONFLICT
,
Siege of Petersburg
MILITARY CONFLICT
,
Battle of Belmont
MILITARY CONFLICT
,
Battle of Missionary Ridge
MILITARY CONFLICT
,
Chattanooga Campaign
MILITARY CONFLICT
,
Battle of Fort Henry
MILITARY CONFLICT
,
Battle of North Anna
MILITARY CONFLICT
,
Battle of the Crater
MILITARY CONFLICT
,
Siege of Corinth
MILITARY CONFLICT
,
Battle of Jackson, Mississippi
MILITARY CONFLICT
,
Appomattox Campaign
MILITARY CONFLICT
,
Battle of Lookout Mountain
MILITARY CONFLICT
,
Battle of Appomattox Court House
MILITARY CONFLICT
,
Battle of Spotsylvania Court House
MILITARY CONFLICT
;
Make a timeline plot through the civil war:
In[]:=
TimelinePlotJoin
American Civil War
MILITARY CONFLICT
,UlyssesSGrantBattles,ImageSize->Full
Out[]=
Make a vertical plot:
In[]:=
TimelinePlotJoin
American Civil War
MILITARY CONFLICT
,UlyssesSGrantBattles,ImageSize->Full,PlotLayout->"Vertical"
Out[]=
Make a map of the battles:
Plot an event series with GeoListPlot
Add labels:
Use tooltips that display the name of the battle when you hover over them for labels instead:
Use geomarkers with tooltips to mark the locations of battles instead of dots:
Use geomarkers with normal text labels to mark the locations of battles instead of dots:
Specify a vector background:

Analyzing the Siege of Vicksburg

Analyze one of Grant’s greatest strategic victories, the decisive victory over the Confederacy the Siege of Vicksburg.
Who were the commanders in the battle?
Make a map of the battle:
What were the strengths of the two forces?
Clarify which side the numbers correspond to:
Make a bar chart of the forces:
Find the casualties:
Make a bar chart:
Make a list of the days of the siege:
Analyze how long it lasted:
Find other battles that occurred simultaneously:

Chattanooga Campaign

I think making a function would be a good idea:
I like the font JetBrains Mono.

Bristoe Campaign

There’s some missing information that shouldn’t be missing for the Second Battle of Rappahannock Station. The Second Battle of Rappahannock Station has 2000 Union troops and 2000 Confederate troops.

Appomattox Campaign

I started analyzing Union victories.

Union Victories

Analyzing the battle of Phillipi

The first entry is the Western Virginia campaign. I live in Huntington, West Virginia and I think its neat that West Virginia was formed out of the Civil War. I think its cool that the first battle of the Civil war was the Battle of Philippi.
I made a map showing the geodesic path from my location to the battle of Philippi.
Find the nearest city for use with Travel Directions.
Here are the directions I could take to visit the battle site.
Here is the travel distance and travel time:
I can use non-missing property association to remove some of the missing values:
I can use the function ContainsMissing created by Arnoud Buzzing to get only known values:
This data is much better.

Timeline Investigation

There are a lot of battles. When I tried to plot them all I tried different plot layouts to get the best result. I’m not sure which one is the best. I tried the default, packed, stacked, grouped, and overlapping. I used ImageSize->Full to see the maximum possible extent. I could have used manipulate here to avoid making several big plots but I wanted to be able to use ImageSize->Full which wouldn’t work with Manipulate because the controls would take some of the image space and also to avoid trying to remember what the previous output was.
I also made a manipulate to quickly compare different options:

Analyzing battles by year

I will split the battles by year:
Analyze the number of wins per year:
Make a plot:
It seems like the Union started really winning in 1864. That seems to be the tipping point. In 1863 Abraham Lincoln issued the Emancipation Proclamation and in 1864 Ulysses S. Grant and Sherman started crushing the South to pound them until they accepted defeat. There are fewer battles in 1865 because the war ended in 1865 with Robert E. Lee’s surrender to Ulysses S. Grant at Appomatox Court House. The time line plots take up a lot of storage unfortunately.
I will analyze battles from 1864 because there seems to be the most victories then.
Make a timeline plot:
I have to come a conclusion that TimelinePlot is not good for analyzing large amounts of data. Even 86 Union victories in 1864 is hard to visualize on a TimelinePlot. I think its better to map with GeoGraphics and other Geo visualization functions or use aggregation functions like summing the number of victories and plotting them on a ListPlot for analysis.
I didn’t realize there were naval conflicts outside the U.S. I looked the conflicts up and there were two Union victories of Union ships over Confederate ships. The Battle of Cherboug resulted in a Union ship sinking a Confederate ship off Cherboug, France. The Bahia incident involved a Union ship capturing a Confederate ship at Port of Salvador, Bahia, Brazil.
Restrict the analysis to battles in North America:
I’m testing a function to know if a function is withing North America:
I want to change some settings so I can stop specifying GeoBackground to vector and units to metric:

Analyze battles where Ulysses S Grant fought

I wanted to create a function to not return any Missing values.
I tested my function on the Siege of Vicksburg:
I think this is small enough to make a time line plot.
Make a map:
Make a bubble chart with the number of troops:
I made a bubble chart where yellow bubbles represent the number of Union troops and green bubbles represent the number of Confederate troops.

Battle outcomes

Here are the outcome notes:
I had to modify the data to make a plot:
Grant won most of his battles. He lost the battle of Cold Harbor. He then delivered a decisive victory for the Union at Vicksburg. The outcomes for the Battle of North Anna, Battle of Spotsylvania Court House, Battle of the Wilderness, and Battle of Totopotomoy Creek were inconclusive. Grant won a Union strategic victory through the Overland Campaign. The Union army sustained heavy losses and casualties during the Overland Campaign while fighting against the Confederate army. Although Grant suffered severe losses during the campaign, it was a strategic Union victory. It inflicted proportionately higher losses on Lee’s army and maneuvered it into a siege at Richmond and Petersburg, Virginia, in just over eight weeks. Grant delivered a Union victory at the Battle of Belmont, the Battle of Champion Hill, the Battle of Fort Donelson, the Battle of Fort Henry, the Battle of Jackson, Mississippi, the Battle of Missionary Ridge, the Battle of Port Gibson, the Battle of Shiloh, the Chattanooga Campaign, the Siege of Corinth, the Siege of Petersburg, and the Vicksburg Campaign. The Second Battle of Petersburg was a Confederate victory, unfortunately. However Grant won a decisive Union victory during the Appomattox Campaign and at the Battle of Appomattox Court House where Robert E. Lee surrendered. Grant also won a victory at the Third Battle of Petersburg.