Authors

Cale Kochenour

Certificate Student 19-20

Topics

Tags

Capstone Project

aWherePy: Crop Smarter with Python

By Cale Kochenour

What is aWherePy?

aWherePy is a Python package that provides capabilities to work with the aWhere API. It allows users to retrieve formatted weather and agriculture data for use in data analytics applications. I built aWherePy to bring the aWhere API capabilities to Python users. The capabilities within this Python package can be integrated with other Python packages to create analytical insights and inform smarter agricultural decisions.

What Can I Do with aWherePy?

Prior to aWherePy, aWhere's agronomic and weather data API was only accessible with R. aWherePy creates a Python solution for the aWhere API and provides Python code to:

  • Call the aWhere API;
  • Extract data from the aWhere API returns;
  • Clean and georeference extracted data;
  • Track crops and agricultural data over time;
  • Create an aWhere-sized (9 km x 9 km) grid from a shapefile; and,
  • Rasterize existing remote sensing and GIS data to the aWhere grid.

aWherePy weather and agronomics modules provide the functionality to get historical norms, observed values, and forecast values for weather and agriculture metrics that are formatted, georeferenced, and ready for data analysis and visualization.

aWherePy grids module provides functionality to rasterize data to the aWhere grid (9x9 km cells). This allows you to integrate other geospatial and remote sensing data (e.g. world population data, normalized difference vegetation index data) with aWhere API data to create advanced analytical insights.

aWherePy fieldscropsplantings, and models modules provide access to advanced agricultural models that track crop data over time and produce information that allows you to make real-time agricultural decisions and adjustments.

Create an aWhere Grid for Rocky Mountain National Park, Colorado

This figure shows the results of creating an aWhere grid from the Rocky Mountain National Park, Colorado boundary. aWherePy buffers the input boundary to ensure the full study area is captured by the grid. In addition, aWherePy provides functionality to extract the individual grid cell centroids, which are passed to the aWhere API to retrieve data.

Colorado Rocky Mountain National Park awhere grid

Get Weather Data for Rocky Mountain National Park, Colorado

This figure shows the observed precipitation values and precipitation norms for a single aWhere grid cell in Rocky Mountain National Park, for a 10-day period in May 2014. Visualizations like this are typical in an aWherePy workflow where you would like to check observed or forecasted values against historical norms. Showing the difference between the two identifies which days measured above or below the norms.

Co. Rocky Mountain National Park awhere weather

Rasterize World Population Data to the State of Vermont aWhere Grid

These two figures show the Vermont state aWhere grid and the World Population data (100-meter spatial resolution) resampled to the aWhere grid. The resampling aggregated data by sum for this example. Additional aggregation statistics (mean, median, max, min) are also available. Another potential use case would be to rasterize the statewide normalized difference vegetation index (NDVI) data to the aWhere grid.

Vermont Awhere grid

Vermont population aWhere grid

Why Should I use aWherePy?

You are most likely wondering why you would use aWherePy within your geospatial, remote sensing, earth science, or data science workflows. aWherePy provides the capability to access the aWhere weather and agricultural data and integrate this data with your workflows. This allows you to make real-time decisions and adjustments, saving energy, time, and money.

Don't crop harder; crop smarter.

How Can I Learn More About aWherePy?

To learn more about and use aWherePy, review the aWherePy GitHub and the aWherePy Read the Docs pages.

You can also contact the developer of aWherePy, Cale Kochenour, with any questions that you have.