Skip to main content

Python client for FastAgsData — single source for cleaned alternative ags data

Project description

fastagsdata

Single source for cleaned alternative ags data.

Python client for the FastAgsData API — cleaned USDA agricultural fundamentals delivered as pandas DataFrames.

Install

pip install fastagsdata

Quick start

import fastagsdata

fastagsdata.set_key('your-api-key')

# Get WASDE corn ending stocks
df = fastagsdata.get('wasde', comdty='c', param='stx')

# Get NASS yields for Illinois
df = fastagsdata.get('nass', comdty='c', param='yld', shape_id='us.il')

# Multiple commodities and years
df = fastagsdata.get('wasde', comdty=['c', 's', 'w'], year=[2023, 2024])

# Wildcard params
df = fastagsdata.get('nass', comdty='c', param='prg%')

API key

Set your key in one of three ways:

# 1. Set globally
fastagsdata.set_key('your-api-key')

# 2. Environment variable
export FASTAGSDATA_API_KEY=your-api-key

# 3. Per-request
df = fastagsdata.get('wasde', api_key='your-api-key')

Get your API key at fastagsdata.com.

Parameters

Parameter Description Example
source Data source wasde, nass, nass_txt, export_sales, inspections, flashsales
comdty Commodity c, s, w, w.win, w.spr, b, sg, fs, mx, o, ry, sf
param Parameter yld, ap, stx, prg% (supports % wildcards)
shape_id Geography us, us.il, us.ia
shape_lvl Administrative level 0 (national), 1 (state), 2 (county)
year Matches source, generally marketing year 2024, [2023, 2024]

All parameters support comma-separated strings or Python lists.

Sources

Source Description Link Parameters
wasde World Agricultural Supply and Demand Estimates. Monthly balance sheet projections for major crops. USDA WASDE stx (ending stocks), prd (production), yld (yield), ap (area planted), ah (area harvested), and more
nass Final values from NASS QuickStats. No revision history — always reflects the latest number. Updated day after each text release. USDA QuickStats yld, ap, ah, prd, stx, prg% (crop progress)
nass_txt Parsed directly from NASS text releases (Stocks, Acreage, Crop Progress & Conditions, Crush, Grind). Available on release day and preserves revision history across subsequent releases. USDA NASS Same as nass
export_sales Weekly export sales and shipments by commodity and destination. USDA FAS net_sales, exports, outstanding
inspections Weekly grain inspections for export by port and commodity. USDA AMS inspections
flashsales Large single-day export sales reported under daily reporting requirements. USDA FAS flash_sales

Note: Not all commodity/param combinations from QuickStats are currently saved. If you need a combination that isn't available, reach out to support@fastagsdata.com and it will be added within 24 hours.

Note: Not all NASS text reports are currently being parsed. To request additional reports, reach out to support@fastagsdata.com.

Response

Returns a pandas DataFrame with columns: date_ref, date_release, source, comdty, shape_id, param, value, year. Date columns are datetime64 type.

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

fastagsdata-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

fastagsdata-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file fastagsdata-0.1.0.tar.gz.

File metadata

  • Download URL: fastagsdata-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for fastagsdata-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4bef87bff050422d1596a99a5a568f684d26b4cef949fb091c12586de8641193
MD5 a04902eec9403b02ba0ace0dfc0fce7d
BLAKE2b-256 36208c2c8ab1a55ed7dbd65b8be94baf90e1724f080a32960908579ec2e3547e

See more details on using hashes here.

File details

Details for the file fastagsdata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastagsdata-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for fastagsdata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff935e11e926e5536257237272ea0d2d9fd0ed5674992054c57e838b92044ac7
MD5 914f25838a010c2d63d64721ec6803cc
BLAKE2b-256 e3f8f1f58b86590a5145d9ea846eef46ffb614437daa31bb3f057d84ed68fb1b

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