Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created May 18, 2020 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/e43f4ad2d8f7e3ca4b8d761408bc853c to your computer and use it in GitHub Desktop.
Save nfarah86/e43f4ad2d8f7e3ca4b8d761408bc853c to your computer and use it in GitHub Desktop.
insert_to_mongo function
def insert_to_mongo(weather_data, air_pollution_data):
""" insert weather data and traffic data to the proper collections """
print("inserting into mongo")
weather_data_collection.insert_one(weather_data)
pollution_data_collection.insert_one(air_pollution_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment