Skip to main content

Agricultural ecology metrics and visualization tools.

Project description

AgroEcoMetrics

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)

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
  • Photoperiod Prediction plots

agroecometrics.settings

Used to have consistent references to data within the dataframe. The example below shows how to print the current labels and to change labels

data_labels = AEM.settings.get_labels()
print(data_labels)
AEM.settings.set_labels({'temp_avg': 'Temperature', 'date_time': 'Date'})

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
file_path = Path("your_weather_data.csv")
df = AEM.data.load_data(file_path)

# Create a Graph of air temperature on a particular day
air_temp_pred = AEM.equations.model_air_temp(df)
AEM.visualizations.plot_air_temp(df, air_temp_pred, Path("your_saved_plot.png"))

# Add Growing Degree Days (GDD) to your dataset
gdd_to_df(df, temp_avg=df["TempAvg"].values, temp_base=10)

# Save your CSV file with new data
AEM.data.save_data(df, Path('your_updated_data.csv'))

This script loads weather data, computes growing degree days, and adds the results to your DataFrame.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agroecometrics-0.1.0b2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agroecometrics-0.1.0b2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file agroecometrics-0.1.0b2.tar.gz.

File metadata

  • Download URL: agroecometrics-0.1.0b2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for agroecometrics-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 1dc9562bb3c4bb3d81727bfcb485cf13069d4d73211578b6f8a4bd682b13e06d
MD5 0a5fd1daa967529dc2a5ae6ef1d3bbb9
BLAKE2b-256 7e4439cfc8f65a44b701673519edba6a4756f4ec05f0590f5f6ca2efd5d89195

See more details on using hashes here.

File details

Details for the file agroecometrics-0.1.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for agroecometrics-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 b85788c40c0363c16b1269be61272ed4f6901c8f8563fd05460725f0cbe73a39
MD5 318d1663352838368f16267dfbea66ea
BLAKE2b-256 67839c18968f99f6d87a58ab4f128f92aee4e80af65ed2e6cce9a3af452402ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page