This Notebook uses a .csv file to create visualisations of references to Classical authors across a corpus of texts, divided by author and separated by language of source text and gender of author.

The below cells import the DF and the libraries

In [ ]:
import pandas as pd
data = pd.read_csv("datathesisaug2023.csv")
data
Out[ ]:
Title Year References to Galen References to Hippocrates References to Aristotle Page Count Percentage Galen Percentage Hippocrates Percentage Aristotle Gender Language of Source Link to Source
0 The byrth of mankynde 1540 2 11 0 176 1.13 6.25 0.00 m English https://quod.lib.umich.edu/e/eebo2/A10887.0001...
1 Erreurs populaires 1578 41 60 30 227 18.06 26.43 13.21 m French https://play.google.com/books/reader?id=AffngP...
2 Trois livres appartenans 1582 94 108 47 923 10.18 11.70 5.09 m French https://play.google.com/books/reader?id=q8pEAA...
3 The Happy Delivery of Women 1612 41 64 16 118 31.74 54.23 13.55 m English https://quod.lib.umich.edu/e/eebo/A02362.0001....
4 Observations diverses 1617 1 2 0 540 0.18 0.37 0.00 f French https://archive.org/details/observationsdive01...
5 The womans doctour 1652 46 31 0 270 17.03 11.48 0.00 m English https://quod.lib.umich.edu/e/eebo/A39862.0001....
6 Directory for midwives 1652 21 48 5 250 8.40 19.20 2.00 m English https://quod.lib.umich.edu/e/eebo/A69832.0001....
7 The midwives book 1671 20 36 10 418 4.78 8.61 2.39 f English https://quod.lib.umich.edu/e/eebo2/A93039.0001...
8 Diseases of Women 1672 5 40 2 437 1.14 9.15 0.45 m English https://quod.lib.umich.edu/e/eebo2/A88969.0001...
9 A general treatise 1696 6 5 0 256 2.30 1.35 0.00 m English https://quod.lib.umich.edu/e/eebo/A53915.0001....
10 The compleat midwife’s practice enlarged 1698 16 11 0 351 4.55 3.13 0.00 m English https://quod.lib.umich.edu/e/eebo/A53913.0001....
11 Companion 1699 2 3 1 111 1.80 2.70 0.90 m English https://quod.lib.umich.edu/e/eebo/A31042.0001....
12 A Treatise on the Theory and Practice of Midwi... 1752 9 16 0 454 1.98 3.52 0.00 m English https://play.google.com/books/reader?id=UvM3AQ...
13 Avis au Peuple Sur sa Santé 1762 0 0 0 569 0.00 0.00 0.00 m French https://www.gutenberg.org/cache/epub/61258/pg6...
14 Dictionnaire portatif de santé 1762 4 2 0 427 0.93 0.46 0.00 m French https://play.google.com/books/reader?id=Z42cBX...
15 Abrégé de l’art des accouchemens 1789 0 0 0 208 0.00 0.00 0.00 f French https://play.google.com/books/reader?id=ychEAA...
In [ ]:
import numpy as np
import matplotlib.pyplot as plt

The below code takes the data from the frame and outputs it across the corpus.

In [ ]:
import numpy as np
import matplotlib.pyplot as plt

# Assuming data and other necessary variables are defined

x = np.array(data["Year"])

y1 = np.array(data["Percentage Aristotle"])
color1 = "blue"  # Choose a color for Aristotle's data

plt.scatter(x, y1, color=color1)  # Set scatter dots color to color1
z1 = np.polyfit(x, y1, 2)
p1 = np.poly1d(z1)
plt.plot(x, p1(x), label="Aristotle", color=color1)
plt.legend()

y2 = np.array(data["Percentage Galen"])
color2 = "orange"  # Choose a color for Galen's data

plt.scatter(x, y2, color=color2)  # Set scatter dots color to color2
z2 = np.polyfit(x, y2, 2)
p2 = np.poly1d(z2)
plt.plot(x, p2(x), label="Galen", color=color2)
plt.legend()

y3 = np.array(data["Percentage Hippocrates"])
color3 = "green"  # Choose a color for Hippocrates's data

plt.scatter(x, y3, color=color3)  # Set scatter dots color to color3
z3 = np.polyfit(x, y3, 2)
p3 = np.poly1d(z3)
plt.plot(x, p3(x), label="Hippocrates", color=color3)
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends of References over Time")
plt.savefig('ClassicalGraphs/Corpus.png', dpi=100, bbox_inches='tight')
plt.show()

The below code creates the output for the individual authors.

In [ ]:
x = np.array(data["Year"])

y1 = np.array(data["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,2)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

plt.ylabel("References to Aristotle Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends of References over Time")
plt.savefig('ClassicalGraphs/Aristotle.png', dpi=100, bbox_inches='tight')
In [ ]:
x = np.array(data["Year"])

y1 = np.array(data["Percentage Galen"])
plt.scatter(x,y1, color=color2)
z1=np.polyfit(x,y1,2)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Galen", color = "orange")
plt.legend()

plt.ylabel("References to Galen Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends of References over Time")
plt.savefig('ClassicalGraphs/Galen.png', dpi=100, bbox_inches='tight')
In [ ]:
x = np.array(data["Year"])

y1 = np.array(data["Percentage Hippocrates"])
plt.scatter(x,y1, color=color3)
z1=np.polyfit(x,y1,2)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Hipporates", color = "green")
plt.legend()

plt.ylabel("References to Hippocrates Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends of References over Time")
plt.savefig('ClassicalGraphs/Hippocrates.png', dpi=100, bbox_inches='tight')

Next, we create the output for the composite graph by language of the source

In [ ]:
langue = data[data['Language of Source'] == 'French']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

y2 = np.array(langue["Percentage Galen"])
plt.scatter(x,y2, color=color2)
z2=np.polyfit(x,y2,1)
p2=np.poly1d(z2)
plt.plot(x, p2(x), label = "Galen", color = "orange")
plt.legend()

y3 = np.array(langue["Percentage Hippocrates"])
plt.scatter(x,y3, color=color3)
z3=np.polyfit(x,y3,1)
p3=np.poly1d(z3)
plt.plot(x, p3(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends French authors")
plt.savefig('ClassicalGraphs/French.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'French']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends French authors")
plt.savefig('ClassicalGraphs/AristotleFrench.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'French']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Galen"])
plt.scatter(x,y1, color=color2)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Galen", color = "orange")
plt.legend()

plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends French authors")
plt.savefig('ClassicalGraphs/GalenFrench.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'French']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Hippocrates"])
plt.scatter(x,y1, color=color3)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Hippocrates", color = "green")
plt.legend()

plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends French authors")
plt.savefig('ClassicalGraphs/HippocratesFrench.png', dpi=100, bbox_inches='tight')

Next, we do the same for the English sources, first the composite, then individual

In [ ]:
langue = data[data['Language of Source'] == 'English']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

y2 = np.array(langue["Percentage Galen"])
plt.scatter(x,y2, color=color2)
z2=np.polyfit(x,y2,1)
p2=np.poly1d(z2)
plt.plot(x, p2(x), label = "Galen", color = "orange")
plt.legend()

y3 = np.array(langue["Percentage Hippocrates"])
plt.scatter(x,y3, color=color3)
z3=np.polyfit(x,y3,1)
p3=np.poly1d(z3)
plt.plot(x, p3(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends English authors")
plt.savefig('ClassicalGraphs/English.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'English']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends English authors")
plt.savefig('ClassicalGraphs/AristotleEnglish.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'English']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Galen"])
plt.scatter(x,y1, color=color2)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Galen", color = "orange")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends English authors")
plt.savefig('ClassicalGraphs/GalenEnglish.png', dpi=100, bbox_inches='tight')
In [ ]:
langue = data[data['Language of Source'] == 'English']

x = np.array(langue["Year"])

y1 = np.array(langue["Percentage Hippocrates"])
plt.scatter(x,y1, color=color3)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends English authors")
plt.savefig('ClassicalGraphs/HippocratesEnglish.png', dpi=100, bbox_inches='tight')

Finally, we repeat for gender: composite and individual

Female authors

In [ ]:
fem = data[data['Gender'] == 'f']

x = np.array(fem["Year"])
y1 = np.array(fem["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

y2 = np.array(fem["Percentage Galen"])
plt.scatter(x,y2, color=color2)
z2=np.polyfit(x,y2,1)
p2=np.poly1d(z2)
plt.plot(x, p2(x), label = "Galen", color = "orange")
plt.legend()

y3 = np.array(fem["Percentage Hippocrates"])
plt.scatter(x,y3, color=color3)
z3=np.polyfit(x,y3,1)
p3=np.poly1d(z3)
plt.plot(x, p3(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Female Authors")
plt.savefig('ClassicalGraphs/FemaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
fem = data[data['Gender'] == 'f']

x = np.array(fem["Year"])
y1 = np.array(fem["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Female Authors")
plt.savefig('ClassicalGraphs/AristotleFemaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
fem = data[data['Gender'] == 'f']

x = np.array(fem["Year"])
y1 = np.array(fem["Percentage Galen"])
plt.scatter(x,y1, color=color2)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Galen", color = "orange")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Female Authors")
plt.savefig('ClassicalGraphs/GalenFemaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
fem = data[data['Gender'] == 'f']

x = np.array(fem["Year"])
y1 = np.array(fem["Percentage Hippocrates"])
plt.scatter(x,y1, color=color3)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Female Authors")
plt.savefig('ClassicalGraphs/HippocratesFemaleAuthors.png', dpi=100, bbox_inches='tight')

Male authors

In [ ]:
fem = data[data['Gender'] == 'm']

x = np.array(fem["Year"])
y1 = np.array(fem["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

y2 = np.array(fem["Percentage Galen"])
plt.scatter(x,y2, color=color2)
z2=np.polyfit(x,y2,1)
p2=np.poly1d(z2)
plt.plot(x, p2(x), label = "Galen", color = "orange")
plt.legend()

y3 = np.array(fem["Percentage Hippocrates"])
plt.scatter(x,y3, color=color3)
z3=np.polyfit(x,y3,1)
p3=np.poly1d(z3)
plt.plot(x, p3(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Male Authors")
plt.savefig('ClassicalGraphs/MaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
men = data[data['Gender'] == 'm']

x = np.array(men["Year"])
y1 = np.array(men["Percentage Aristotle"])
plt.scatter(x,y1, color=color1)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Aristotle", color = "blue")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Male Authors")
plt.savefig('ClassicalGraphs/AristotleMaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
men = data[data['Gender'] == 'm']

x = np.array(men["Year"])
y1 = np.array(men["Percentage Galen"])
plt.scatter(x,y1, color=color2)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Galen", color = "orange")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Male Authors")
plt.savefig('ClassicalGraphs/GalenMaleAuthors.png', dpi=100, bbox_inches='tight')
In [ ]:
men = data[data['Gender'] == 'm']

x = np.array(men["Year"])
y1 = np.array(men["Percentage Hippocrates"])
plt.scatter(x,y1, color=color3)
z1=np.polyfit(x,y1,1)
p1=np.poly1d(z1)
plt.plot(x, p1(x), label = "Hippocrates", color = "green")
plt.legend()

plt.ylabel("References Relative to Number of Pages in Text")
plt.xlabel("Year")
plt.title("Trends Male Authors")
plt.savefig('ClassicalGraphs/HippocratesMaleAuthors.png', dpi=100, bbox_inches='tight')