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, manipulating, and saving agricultural datasets. Includes functions to:

  • Check CSV file validity
  • Load and filter data by date range
  • Interpolate missing data
  • Save processed DataFrames
  • Match date times between numpy arrays
  • Get a pandas DataFrame as a dictionary

agroecometrics.equations

Contains models and equations for ecological and agricultural analysis, including:

  • TEMPERATURE MODELS: Soil and Air Temperature Prediction Models.
  • Evapotranspiration Models: Dalton, Penman, Hargreaves, etc.
  • Crop Models: Calculate Growing Degree Days (GDD)
  • Photoperiod Models: Photoperiod Predictions.
  • Water Movement Models: Infiltration and hydraulic conductivity

agroecometrics.visualizations

Provides methods for creating plots from the calulations made in equations.

  • Air Temperature plots
  • Soil temperature plots and 3d mesh graphs
  • Rainfall and runoff plot
  • 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')

# 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)
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.

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.0a0.tar.gz (17.6 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.0a0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agroecometrics-0.1.0a0.tar.gz
  • Upload date:
  • Size: 17.6 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.0a0.tar.gz
Algorithm Hash digest
SHA256 d4abcbd9592a9f7fc70efac7f1efe1bede843b8ee01efabcefadc0af7c59c2e6
MD5 0752da48db15048ea4233677d73b4687
BLAKE2b-256 a308b4062fe26764435291ad2c4afbc3fe9f06426db0232f4504d683a28505be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agroecometrics-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 b398bd3e6fb67a812eb1780cb54c3e36cdce3c845d50128cf678e39af722935d
MD5 8dd1959e5e93c069cf2ae093d2439544
BLAKE2b-256 41c004ed6d9b6a1e1105ca72f2ac313d4f4c9da38e70651abef58134f465ae1d

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