Last active
June 22, 2025 16:51
-
-
Save jdavidrcamacho/be427cbb04cd16520253e46bbff967bd to your computer and use it in GitHub Desktop.
Timeline of ancient civilizations in the fertile crescent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
# Updated timeline data with BCE year representation, including all events | |
timelines_simple = { | |
# Ubaid Period | |
"Ubaid Period": {"start": -6500, "end": -3800, "color": "salmon"}, | |
# Sumerian periods | |
"Early Sumerian Settlement": {"start": -4500, "end": -4000, "color": "skyblue"}, | |
"Uruk Period (Sumerians)": {"start": -4000, "end": -3100, "color": "skyblue"}, | |
"Early Dynastic Period (Sumerians)": { | |
"start": -2900, | |
"end": -2350, | |
"color": "skyblue", | |
}, | |
"Akkadian Empire & Sumer Decline": { | |
"start": -2334, | |
"end": -2154, | |
"color": "skyblue", | |
}, | |
"Neo-Sumerian (Ur III) Period": {"start": -2112, "end": -2004, "color": "skyblue"}, | |
"Fall of Sumer": {"start": -2004, "end": -1900, "color": "skyblue"}, | |
# Babylonian periods | |
"Old Babylonian Period": {"start": -1894, "end": -1595, "color": "mediumseagreen"}, | |
"Babylonian Empire": {"start": -1595, "end": -1155, "color": "mediumseagreen"}, | |
"Neo-Babylonian Empire": {"start": -626, "end": -539, "color": "mediumseagreen"}, | |
"Fall of Babylon": {"start": -538, "end": -540, "color": "mediumseagreen"}, | |
# Assyrian periods | |
"Early Assyrian City-States": {"start": -2500, "end": -2025, "color": "dodgerblue"}, | |
"Old Assyrian Empire": {"start": -2025, "end": -1378, "color": "dodgerblue"}, | |
"Middle Assyrian Empire": {"start": -1365, "end": -1056, "color": "dodgerblue"}, | |
"Neo-Assyrian Empire": {"start": -911, "end": -609, "color": "dodgerblue"}, | |
"Fall of Assyria": {"start": -612, "end": -609, "color": "dodgerblue"}, | |
# Hittite Empire | |
"Hittite Empire": {"start": -1600, "end": -1178, "color": "orange"}, | |
# Mitanni Kingdom | |
"Mitanni Kingdom": {"start": -1500, "end": -1300, "color": "lightcoral"}, | |
# Phoenicians | |
"Phoenician City-States": {"start": -1200, "end": -800, "color": "purple"}, | |
# Arameans | |
"Aramean States": {"start": -1100, "end": -600, "color": "lightgreen"}, | |
# Chaldeans | |
"Chaldean Dynasty": {"start": -626, "end": -539, "color": "gold"}, | |
# Bronze Age Collapse | |
"Bronze Age Collapse": {"start": -1200, "end": -1150, "color": "crimson"}, | |
# Ancient Egypt periods | |
"Early Dynastic Period (Egypt)": { | |
"start": -3100, | |
"end": -2686, | |
"color": "goldenrod", | |
}, | |
"Old Kingdom": {"start": -2686, "end": -2181, "color": "goldenrod"}, | |
"First Intermediate Period": {"start": -2181, "end": -2055, "color": "goldenrod"}, | |
"Middle Kingdom": {"start": -2055, "end": -1650, "color": "goldenrod"}, | |
"Second Intermediate Period": {"start": -1650, "end": -1550, "color": "goldenrod"}, | |
"New Kingdom": {"start": -1550, "end": -1069, "color": "goldenrod"}, | |
"Third Intermediate Period": {"start": -1069, "end": -664, "color": "goldenrod"}, | |
"Late Period": {"start": -664, "end": -332, "color": "goldenrod"}, | |
"Ptolemaic Dynasty": {"start": -332, "end": -30, "color": "goldenrod"}, | |
} | |
# Plotting with the x-axis reversed (chronological order from left to right) | |
fig, ax = plt.subplots(figsize=(20, 10)) | |
ax.grid(True, which="major", axis="x", linestyle="--", color="gray", alpha=0.7) | |
ax.set_title("Timeline of Ancient Civilizations of the Fertile Crescent", fontsize=20) | |
ax.set_xlabel("Year (BCE)", fontsize=20) | |
ax.set_ylabel("", fontsize=20) | |
# Plot each civilization/event as a horizontal line | |
for idx, (name, details) in enumerate(timelines_simple.items()): | |
ax.hlines( | |
y=idx, | |
xmin=details["start"], | |
xmax=details["end"], | |
color=details["color"], | |
linewidth=12, | |
) | |
ax.text( | |
details["end"] + 5, idx, f" {name}", verticalalignment="center", fontsize=15 | |
) | |
# Create a legend | |
legend_labels = { | |
"Ubaid Period": "salmon", | |
"Sumerian Periods": "skyblue", | |
"Babylonian Periods": "mediumseagreen", | |
"Assyrian Periods": "dodgerblue", | |
"Hittite Empire": "orange", | |
"Mitanni Kingdom": "lightcoral", | |
"Phoenician City-States": "purple", | |
"Arameans": "lightgreen", | |
"Chaldeans": "gold", | |
"Ancient Egypt": "goldenrod", | |
} | |
# Add legend to the plot | |
handles = [plt.Line2D([0], [0], color=color, lw=12) for color in legend_labels.values()] | |
labels = list(legend_labels.keys()) | |
ax.legend( | |
handles, | |
labels, | |
loc="upper left", | |
fontsize=20, | |
facecolor="whitesmoke", | |
framealpha=1, | |
edgecolor="black", | |
) | |
ax.set_xticks(range(-6500, 0, 500)) | |
ax.set_xlim(-6600, 0) # Setting left-to-right chronology | |
ax.set_yticks([]) # This removes the y-axis tick marks | |
ax.tick_params(axis="x", labelsize=20) # Set font size for x-axis tick labels | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment