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 as fdata

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

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

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

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

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

API key

Set your key in one of three ways:

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

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

# 3. Per-request
df = fdata.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, fgis_ams, flashsale_url, exportsales_api, exportsales_weeklysummary
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. Available on release day and preserves revision history across subsequent releases. USDA NASS Same as nass
fgis_ams Weekly grain inspections for export. Parsed from AMS website. USDA AMS inspc (inspections)
flashsale_url Large single-day export sales reported under daily reporting requirements. USDA FAS flash_sales
exportsales_api Weekly export sales and shipments by commodity and destination. USDA FAS net_sales, exports, outstanding
exportsales_weeklysummary Weekly export sales summary totals. USDA FAS net_sales, exports, outstanding

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.1.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.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastagsdata-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fe958fcf2f9fad72ddf04b137dd888bf352e6bef364c2773239b92806b289fa8
MD5 fa628af83795a668ecec294e08b29640
BLAKE2b-256 2d9ffb75d699199eeadd6d07a6e7d2cabe876bf5d7290818a3353e4b9b5d07cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastagsdata-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5bc101afadbad052c62ddfe90057e24519bda639383115574181e1a6f0d3a5
MD5 8d9736d50b620e841d8d400ca46154ad
BLAKE2b-256 bf888bd636d3259132f8b4d4d55d38266dd601dabb4ec764ba1ddb95a129be06

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