2) Fetch response data from the Open-meteo API and normalize
In this step, the request to the Open-meteo API is performed and the response is stored in a dataframe.
3) Define the DB engine parameters
In this step, the configuration parameters of PostgreSQL DB are defined. These parameter will be used to correctly establish the connection to the PostgreSQL DB.
4) Data pre-processing
In this step we substitute the character "." with "_" for JSON nested levels (to not incur in SQL statement's syntax errors).
6) Make the data ready to be stored on the DB
In this step we concatenate each object's serie. In this way we make the data suitable to be hosted on our SQL DB.
8) Merging
Merge the pre-processed objects into the final dataframe: in this step we create a unique dataframe which contains all the weather metrics.
9) Create function
Function to create the "hourly data" table that will be pushed to our PostgreSQL DB.
10) Create SQL engine
In order to feed the data into the newly created PostgreSQL table, create a SQL engine.
12) Create the dataframe
Create the dataframe which will contain the metadata related to the response - unit of measured.
13) Append the date of the current script's execution
This information will be shown in the dashboard to make sure that the displayed insights are always up to date.