Video introduction to model publishingΒΆ
If you want to follow along with the example shown in the video, you can copy the snippets below:
Command to fetch zipcode lookup table:
wget https://s3-us-west-2.amazonaws.com/dominodatalab-fzd/free-zipcode-database.csv
Contents of
zip_pop.py
script used in the model:import pandas as pd zips = pd.read_csv("free-zipcode-database.csv") def zip_pop (my_zip): my_zip_pop = zips.loc[zips['Zipcode'] == my_zip]['EstimatedPopulation'].values[0] return my_zip_pop