Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1 |
-
---
|
2 |
-
license: bsd-3-clause-clear
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: bsd-3-clause-clear
|
3 |
+
---
|
4 |
+
Source: [Source: HeyJackass.com](https:///heyjackass.com)
|
5 |
+
import matplotlib.pyplot as plt
|
6 |
+
import pandas as pd
|
7 |
+
|
8 |
+
# Data from your CSV
|
9 |
+
data = {
|
10 |
+
'Year': [2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015],
|
11 |
+
'Homicides': [219, 257, 261, 276, 254, 211, 211, 257, 262, 174]
|
12 |
+
}
|
13 |
+
|
14 |
+
# Convert to DataFrame
|
15 |
+
df = pd.DataFrame(data)
|
16 |
+
|
17 |
+
# Plot bar graph
|
18 |
+
plt.figure(figsize=(10, 6))
|
19 |
+
plt.bar(df['Year'].astype(str), df['Homicides'], color='skyblue')
|
20 |
+
plt.title('Homicides Per Year')
|
21 |
+
plt.xlabel('Year')
|
22 |
+
plt.ylabel('Number of Homicides')
|
23 |
+
plt.xticks(rotation=45)
|
24 |
+
plt.tight_layout()
|
25 |
+
|
26 |
+
# Show the plot
|
27 |
+
plt.show()
|