Climatic Data Population
File: populate_climate_data.py
Features
Manages climatic data in the database.
Connects to the database with different privileges using
DatabaseConnection.Utilizes
tqdmfor progress bars andgeopyfor geolocation.
Main Functions
create_climatic_data_table: Creates theClimaticDatatable if it does not exist.clean_climatic_data_table: Clears theClimaticDatatable and resets its sequence.populate_climatic_data_table: Populates theClimaticDatatable from a CSV file.update_location: Updates latitude and longitude inClimaticDatausingNominatimgeolocator.
Execution
On running, the script performs table creation, data cleaning, populating with climatic data, and updating location coordinates.
Last modified: 24 March 2024