Rain in the US

Question

Suppose you have the following dataset, which contains information about a year's worth of US weather. Using Pandas, plot the top 10 locations that recieved the most rain in 2016. You will want to utilize the temperature field to flag when precipitation is rain (if it's too cold, the precipitation will be snow).

To help get you started, below is code to load the dataset into a Pandas dataframe. You can also make a copy of this Google Colab notebook.

%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
data = pd.read_csv("https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/weather.csv") 
data.head()
Data.Precipitation Date.Full Date.Month Date.Week of Date.Year Station.City ...
0 0.00 2016-01-03 1 3 2016 Birmingham ...
1 0.00 2016-01-03 1 3 2016 Huntsville ...
2 0.16 2016-01-03 1 3 2016 Mobile ...
3 0.00 2016-01-03 1 3 2016 Montgomery ...
4 0.01 2016-01-03 1 3 2016 Anchorage ...

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now