So, I have a csv for Ukraine and Russia conflict and I was trying to plot a graph such that I can see the NUMBER OF FATALITIES vs EVENT_TYPE.
So, firstly I grouped by EVENT_TYPE
result1 = ukraine_russia_data.groupby(['EVENT_TYPE']).sum()
result1.head(20)
and the result is as follows here
Then I proceed to plot my graph using the following code -
#Plot a graph to show the relationship between Event type and Fatalities
events = ukraine_russia_data['EVENT_TYPE'].unique()
plt.bar(events, result1['FATALITIES'], color=['cyan', 'black', 'purple', 'green'])
plt.xticks(events, rotation='vertical', size=8)
labels, location = plt.yticks()
plt.ylabel('Number of Caualities')
plt.xlabel('Type of Event Occurence')
plt.show()
But the graph is showing VIOLENCE AGAINST CIVILIAN as the highest instead of EXPLOSION/REMOTE VIOLENCE as shown