HDAG Interview Take Home Assignment **September 2022**
In [ ]:
def square(n):
### TODO: Your code for the function
return ""
## TODO: Your code for printing the first 10 integer squares
In [ ]:
# example list of words
list_of_words = ["take", "home", "data", "analytics", "science", "programming"]
## desired output if max_length = 5
filtered_5 = ["take", "home", "data"]
## desired output if max_length = 9
filtered_7 = ["take", "home", "data", "analytics", "science"]
## TODO: Your code here
In [ ]:
def top_n(string, n):
# TODO: """Your Code Here"""
return ""
In [ ]:
# Example test case
n = 3
posting = """
Herbal sauna uses the healing properties of herbs in combination with distilled water.
The water evaporates and distributes the effect of the herbs throughout the room.
A visit to the herbal sauna can cause real miracles, especially for colds.
"""
output = {
'the' :6,
'herbal':2,
'sauna':2
}
In [ ]:
# RUN THE FOLLOWING TO CLONE THE DATA REPO
! git clone https://github.com/harvardanalytics/fall22comp.git
In [ ]:
# Run this command to download the data
import pandas as pd
departure_data = pd.read_csv("fall22comp/International_Report_Departures.csv")
passengers_data = pd.read_csv("fall22comp/International_Report_Passengers.csv")
In [ ]:
#TO DO: Create top 10 busiest airport barplot.
In [ ]:
## TO DO: Your code for analysis!
In [ ]:
# Run this command to download the data
import pandas as pd
df = pd.read_csv("fall22comp/covid-19_vaccine_tweets_with_sentiment.csv", encoding="unicode_escape")
In [ ]:
#TODO: your classifier + analysis code goes here!
In [ ]:
# Run this command to download the data
import pandas as pd
df = pd.read_csv("fall22comp/adult_data.csv")
In [ ]:
# TODO: Visualize
In [ ]:
# TODO: Build the classifier