Agro Weather is a Python application that collects meteorological data from a given weather station and calculates agricultural parameters such as evapotranspiration (ETc) and water requirements. The data is stored in a SQLite database for further analysis.
- Clone the repository:
git clone https://github.com/antoniofcano/agro-wu.git
- Install the dependencies:
pip install -r requirements.txt
-
Import the necessary classes:
from bbdd_meteorologica import GestorBBDD, EstacionMeteorologica from agro_calculations import AgroCalculations
-
Create an instance of the
EstacionMeteorologica
class:estacion = EstacionMeteorologica(api_key, station_id)
-
Create an instance of the
GestorBBDD
class:gestor = GestorBBDD(db_name, table_name, estacion, latitude, elevation, growth_stage)
-
Call the
actualizar_datos
method to update the data in the database:gestor.actualizar_datos()
- Replace
api_key
,station_id
,db_name
,table_name
,latitude
,elevation
, andgrowth_stage
with your actual values. latitude
should be in decimal degrees.elevation
should be in meters.growth_stage
should be one of the following: 'initial', 'crop development', 'mid-season', or 'late season'.