Hi all,
I'm after some assistance.
I need to sum the total_casualties if the same type of disaster occurs twice (or more) in the same year. My dataset looks approximately like this one:
Country Year Disaster_type Total_casualties
Afghanistan 1990 Flood 2134
Afghanistan 1990 Flood 3456
Afghanistan 1993 Epidemic 111
...
Afghanistan 2020 Storm 345
Albania 1992 Landslide 222
Albania 1992 Landslide 111
Albania 1994 Storm 555
...
Albania 2014 Epidemic 5675
What I want to obtain is a dataset like this one:
Country Year Disaster_type Total_casualties
Afghanistan 1990 Flood 5590
Afghanistan 1993 Epidemic 111
...
Afghanistan 2020 Storm 345
Albania 1992 Landslide 333
Albania 1994 Storm 555
...
Albania 2014 Epidemic 5675
Note that now the the total casualties in "Afghanistan 1990 Flood" is the sum of the same disaster type occurred twice in Afghanistan in the same year (the same in Albania 1992 landslide). How can I obtain this?
Any help is highly appreciated.