# Damage due to natural disasters

## Question

Suppose you are given this dataset on storm events in 2019 from NOAA.

Using this data, you're asked to calculate the following:

• Total monetary damage in 2019
• Top 5 states in 2019 with highest monetary damage
• Plot the total monetary damage by month

The code below will help trim down the dataset so you can focus on a few columns. Below are descriptions for the included fields:

• EVENT_ID: Unique ID for the storm event

• STATE: State where the event occured

• EVENT_TYPE: Type of storm event

• BEGIN_DATE_TIME: The end time of the event. Format is MM/DD/YYYY 24 hour time AM/PM

• BEGIN_YEARMONTH: The year and month of the event

• DAMAGE_PROPERTY: The estimated amount of damage to property incurred by the weather event. For example, 10.00K = 10,000; 10.00M = 10,000,000. You will need to convert this field in order to successfully do the calculations listed above.

• DAMAGE_CROPS: The estimated amount of damage to crops incurred by the weather event. For example, 10.00K = 10,000; 10.00M = 10,000,000. You will need to convert this field in order to successfully do the calculations listed above.

You can find more information regarding the dataset fields here and you can view other years of data here.

To help get you started, below is Python code that imports the data and only includes the fields needed to do the analysis. You can also view the code in this Google Colab notebook.

``````# Importing packages
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

df = df[['EVENT_ID',
'STATE',
'EVENT_TYPE',
'CZ_TYPE',
'BEGIN_DATE_TIME',
'BEGIN_YEARMONTH',
'DAMAGE_PROPERTY',
'DAMAGE_CROPS'
]]