AgroEcoMetrics
Authors/Creators
Description
AgroEcoMetrics is a useful tool for manipulating agricultural and Ecological data
Source code: (https://github.com/wiscbicklab/AgroEcoMetrics)
Bug reports: (https://github.com/wiscbicklab/AgroEcoMetrics/issues)
Documentation: (https://wiscbicklab.github.io/AgroEcoMetrics/)
It provides:
- Methods for calulating agricultural and ecological data
- Methods for manipulating and cleaning agriculture and ecological data
- Methods for visualizing agricultural and ecological data
Submodules Overview
agroecometrics.data
Provides utilities for loading, cleaning, interpolating, and saving agricultural datasets. Includes functions to:
- Check CSV file validity
- Load and filter data by date range
- Interpolate missing data
- Save processed DataFrames
agroecometrics.equations
Contains models and equations for ecological and agricultural analysis, including:
- Evapotranspiration Models: Dalton, Penman, Hargreaves, etc.
- Solar Radiation Calculations: Compute extraterrestrial radiation (
Ra) - Vapor Pressure Calculations: Estimate saturation vapor pressure (
esat) - Water Movement Models: Infiltration and hydraulic conductivity
- Crop Models: Calculate Growing Degree Days (GDD)
- Even More: Provides even more useful agronometric data tools
agroecometrics.visualizations
Provides methods for creating plots from the calulations made in equations.
- Rainfall and Runoff plot
- Air Temperature plots
- Soil Temperature plots and 3d mesh graphs
- Growing Degree Day Plots
- Photoperiod Prediction plots
Getting Started
Installation
Install via pip:
pip install AgroEcoMetrics
Quick Example
from pathlib import Path
from agroecometrics as AEM
import pandas as pd
# Load your data
data_path = Path("**your_weather_data.csv**")
image_path = Path("**your_saved_plot.png**")
df = AEM.data.load_data_csv(data_path, "**date_time_col_name**", start_date='2024-01-01', end_date='2024-12-31', date_time_format="%m/%d/%Y %I:%M %p")
# Create a Graph of air temperature on a particular day
date_times = df["**date_time_col_name**"]
avg_air_temp = df['**avg_air_temp_col_name**']
air_temp_pred = AEM.equations.model_air_temp(avg_air_temp, date_times)
AEM.visualizations.plot_air_temp(avg_air_temp, air_temp_pred, date_times, image_path)
This script loads weather data filtered to only 2024, creates an air temperature models from the data, and saves a plot of the predicted temperatures from the model against the actual temperatures.
Testing
Within the tests folder is 5 min data for July 5th 2025 and Daily Data for the month of July 2025 both from Arlington Wisconsin. In order to test that AEM is working as expected, you can run tests.py in this same folder. This test will test each of the equations functions, and give you information about whether or not the tests suceeded. If all tests succeed the package is working as expected.
Files
AgroEcoMetrics-main.zip
Files
(46.8 MB)
| Name | Size | |
|---|---|---|
|
md5:2292ca4eaeeb64c4af97017751579d4a
|
46 Bytes | Download |
|
md5:14363b8545753d1939bb63737f7f1d0c
|
46.7 MB | Preview Download |
|
md5:33fbfac0378d0eee96059ee27b7382f3
|
8.7 kB | Download |
|
md5:ca7251fd7292238184332cf51a03a45f
|
32.9 kB | Download |
|
md5:01a982cfb0b9835160f2e8ef2d840a1a
|
3.7 kB | Preview Download |
|
md5:9e2bc85f58768e22f258e9cd751fef53
|
65 Bytes | Preview Download |
|
md5:9d3235c605415414458ea7ea23bf2a63
|
20.4 kB | Download |
Additional details
Identifiers
Software
- Repository URL
- https://github.com/bicklabuw/AgroEcoMetrics
- Programming language
- Python
- Development Status
- Active