Back to Openai Agents Python

spending

examples/sandbox/extensions/daytona/usaspending_text2sql/schema/tables/spending.md

0.15.35.5 KB
Original Source

spending

One row per prime award transaction from NASA. Each row represents a financial action — an initial obligation, modification, amendment, or de-obligation on a federal award.

Columns

ColumnTypeDescription
rowidINTEGER PKAuto-increment row identifier
award_idTEXTUnique award identifier. Multiple rows share the same award_id when an award has multiple transactions
award_piid_fainTEXTHuman-readable award number: PIID for contracts (e.g., 'NNJ13ZBG001'), FAIN for assistance
parent_award_piidTEXTParent IDV contract number. Links task/delivery orders to their parent contract vehicle (contracts only)
award_typeTEXTCategory: 'contract', 'grant', 'idv', or 'other'
descriptionTEXTFree-text description of the transaction or award purpose
action_dateTEXTDate of this transaction (ISO 8601: YYYY-MM-DD)
fiscal_yearINTEGERFederal fiscal year (Oct-Sep; FY2024 = Oct 2023 - Sep 2024)
federal_action_obligationREALDollar amount of this specific transaction. Can be negative for de-obligations
total_obligationREALCumulative obligation for the entire award at the time of this transaction
base_and_all_options_valueREALTotal potential ceiling value of the contract including all unexercised options. Contracts only; NULL for grants
recipient_nameTEXTLegal name of the recipient organization
recipient_parent_nameTEXTParent company name (e.g., subsidiaries like 'Lockheed Martin Space' roll up to 'Lockheed Martin Corporation'). Contracts only; empty for grants
recipient_stateTEXTTwo-letter US state code of recipient's address. Empty for foreign recipients
recipient_cityTEXTCity of recipient's address
recipient_countryTEXTCountry name (e.g., 'UNITED STATES', 'UNITED KINGDOM')
awarding_officeTEXTNASA center/office that made the award (e.g., 'GODDARD SPACE FLIGHT CENTER', 'JET PROPULSION LABORATORY'). Values are uppercase
funding_officeTEXTNASA center/office providing funding (often same as awarding). Values are uppercase
naics_codeTEXTNorth American Industry Classification System code. Primarily for contracts; may be empty for grants
naics_descriptionTEXTHuman-readable NAICS description
psc_codeTEXTProduct/Service Code for contracts, CFDA number for assistance. Different classification systems in the same column
psc_descriptionTEXTHuman-readable description of the PSC (contracts) or CFDA program (assistance)
place_of_performance_stateTEXTState where work is performed. Two-letter codes for contracts, full names for assistance. May differ from recipient_state
place_of_performance_cityTEXTCity where work is performed
period_of_perf_startTEXTAward period of performance start date (YYYY-MM-DD)
period_of_perf_endTEXTAward period of performance end date (YYYY-MM-DD). This is the current end date and may reflect extensions
extent_competedTEXTCompetition level. Values include 'Full and Open Competition', 'Not Available for Competition', 'Not Competed', etc. Contracts only; empty for grants
type_of_set_asideTEXTSmall business set-aside type. Values include 'Small Business Set-Aside', '8(a) Set-Aside', 'HUBZone Set-Aside', 'Service-Disabled Veteran-Owned Small Business Set-Aside', 'Women-Owned Small Business', etc. Contracts only
number_of_offersINTEGERNumber of offers/bids received. 1 = effectively sole-source even if technically competed. Contracts only; NULL for grants
contract_pricing_typeTEXTPricing structure: 'Firm Fixed Price', 'Cost Plus Fixed Fee', 'Cost No Fee', 'Time and Materials', etc. Contracts only
business_typesTEXTRecipient organization type for assistance awards: nonprofit, university, state government, tribal, etc. Grants only; empty for contracts

Notes

  • Aggregating to award level: use GROUP BY award_id with SUM(federal_action_obligation) to get total spending per award. The total_obligation column is a snapshot at each transaction and may not reflect the final total.
  • Contract ceiling vs obligation: base_and_all_options_value is the potential maximum; total_obligation is what's actually committed. A contract may have $10M obligated against a $500M ceiling.
  • Parent company roll-up: Use COALESCE(NULLIF(recipient_parent_name, ''), recipient_name) to group subsidiaries under their parent. Only populated for contracts.
  • recipient_name may vary slightly for the same entity across rows (e.g., 'BOEING CO' vs 'THE BOEING COMPANY'). Use LIKE or UPPER() for fuzzy matching.
  • award_type is derived from USAspending type codes: A/B/C/D -> 'contract', 02-05 -> 'grant', IDV_* -> 'idv'.
  • federal_action_obligation can be negative (de-obligations, corrections). Sum them to get net spending.
  • naics_code and naics_description are only populated for contracts; empty for grants/assistance.
  • psc_code contains Product/Service Codes for contracts and CFDA numbers for assistance awards. psc_description contains the corresponding description. These are different classification systems stored in the same column.
  • Contracts-only columns: base_and_all_options_value, recipient_parent_name, parent_award_piid, extent_competed, type_of_set_aside, number_of_offers, contract_pricing_type are only populated for contracts/IDVs.
  • Grants-only columns: business_types is only populated for assistance awards.