{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# USDA Data Exploration\n",
"USDA’s Foreign Agricultural Service data API portal provides users the ability to obtain programmatic access to publicly available agricultural commodity data from the Export Sales Report (ESR), Global Agricultural Trade System (GATS), and Production, Supply & Distribution (PSD) databases. This notebook explores ESR and PSD data. More information about these data sources [can be found here.](https://apps.fas.usda.gov/opendataweb/about)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# general imports\n",
"import cmath\n",
"import numpy as np\n",
"import pandas as pd\n",
"import streamlit as st\n",
"import requests\n",
"import geopandas as gpd\n",
"from datetime import date"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## USDA Export Sales Report (ESR) Data\n",
"USDA's Export Sales Reporting Program monitors U.S. agricultural export sales on a daily and weekly basis. Export sales reporting provides a constant stream of up-to-date market information for 40 U.S. agricultural commodities sold abroad.\n",
"\n",
"A single statistic reveals the significance of the program: in a typical year, the program monitors more than 40 percent of total U.S. agricultural exports. The program also serves as an early alert on the possible impact foreign sales have on U.S. supplies and prices.\n",
"\n",
"The weekly U.S. Export Sales report is the most currently available source of U.S. export sales data. The data is used to analyze the overall level of export demand, determine where markets exist, and assess the relative position of U.S. commodities in foreign markets."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"from requests.auth import HTTPBasicAuth\n",
"# function that gets data from USDA endpoint and converts response to pandas dataframe\n",
"def get_usda_data(endpoint_url):\n",
" # USDA API Key\n",
" key = {\"API_KEY\": \"aefd68b9-cfdc-4c9e-a800-b457ff5adade\"}\n",
" request = requests.get(url=endpoint_url, headers=key)\n",
" # convert response to pandas dataframe\n",
" return (pd.read_json(request.text))\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# Basic endpoints. See below for endpoints that return data commodity and country specific data\n",
"regions_url = \"https://apps.fas.usda.gov/OpenData/api/esr/regions\"\n",
"country_url = \"https://apps.fas.usda.gov/OpenData/api/esr/countries\"\n",
"data_release_url = \"https://apps.fas.usda.gov/OpenData/api/esr/datareleasedates\"\n",
"commodity_url = \"https://apps.fas.usda.gov/OpenData/api/esr/commodities\"\n",
"units_url = \"https://apps.fas.usda.gov/OpenData/api/esr/unitsOfMeasure\"\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" regionId | \n",
" regionName | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" EUROPEAN UNION - 27 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" OTHER EUROPE | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" EASTERN EUROPE | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
" FORMER SOVIET UNION-12 | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
" JAPAN | \n",
"
\n",
" \n",
" 5 | \n",
" 6 | \n",
" TAIWAN | \n",
"
\n",
" \n",
" 6 | \n",
" 7 | \n",
" CHINA | \n",
"
\n",
" \n",
" 7 | \n",
" 8 | \n",
" INDIA | \n",
"
\n",
" \n",
" 8 | \n",
" 9 | \n",
" OTHER ASIA AND OCEANIA | \n",
"
\n",
" \n",
" 9 | \n",
" 10 | \n",
" AFRICA | \n",
"
\n",
" \n",
" 10 | \n",
" 11 | \n",
" WESTERN HEMISPHERE | \n",
"
\n",
" \n",
" 11 | \n",
" 99 | \n",
" UNKNOWN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" regionId regionName\n",
"0 1 EUROPEAN UNION - 27 \n",
"1 2 OTHER EUROPE \n",
"2 3 EASTERN EUROPE \n",
"3 4 FORMER SOVIET UNION-12 \n",
"4 5 JAPAN \n",
"5 6 TAIWAN \n",
"6 7 CHINA \n",
"7 8 INDIA \n",
"8 9 OTHER ASIA AND OCEANIA \n",
"9 10 AFRICA \n",
"10 11 WESTERN HEMISPHERE \n",
"11 99 UNKNOWN "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Regions with Region ID's\n",
"get_usda_data(regions_url)"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" countryCode | \n",
" countryName | \n",
" countryDescription | \n",
" regionId | \n",
" gencCode | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" EUROPEAN | \n",
" EUROPEAN UNION - 27 | \n",
" 1 | \n",
" None | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" UNKNOWN | \n",
" UNKNOWN | \n",
" 99 | \n",
" AX1 | \n",
"
\n",
" \n",
" 2 | \n",
" 1010 | \n",
" GREENLD | \n",
" GREENLAND | \n",
" 11 | \n",
" GRL | \n",
"
\n",
" \n",
" 3 | \n",
" 1220 | \n",
" CANADA | \n",
" CANADA | \n",
" 11 | \n",
" CAN | \n",
"
\n",
" \n",
" 4 | \n",
" 1610 | \n",
" MIGUEL | \n",
" ST. PIERRE AND MIQUELON | \n",
" 11 | \n",
" None | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 205 | \n",
" 9350 | \n",
" GUAM | \n",
" GUAM | \n",
" 9 | \n",
" GUM | \n",
"
\n",
" \n",
" 206 | \n",
" 9410 | \n",
" CAN EN I | \n",
" CANTON AND ENDERBURY ISLANDS | \n",
" 9 | \n",
" None | \n",
"
\n",
" \n",
" 207 | \n",
" 9510 | \n",
" AM SAMOA | \n",
" AMERICAN SAMOA | \n",
" 9 | \n",
" ASM | \n",
"
\n",
" \n",
" 208 | \n",
" 9610 | \n",
" NMARIANA | \n",
" NORTHERN MARIANA ISLANDS | \n",
" 9 | \n",
" MNP | \n",
"
\n",
" \n",
" 209 | \n",
" 9800 | \n",
" US O IS | \n",
" US MINOR OUTLYING ISLAND | \n",
" 9 | \n",
" None | \n",
"
\n",
" \n",
"
\n",
"
210 rows × 5 columns
\n",
"
"
],
"text/plain": [
" countryCode countryName countryDescription regionId \\\n",
"0 1 EUROPEAN EUROPEAN UNION - 27 1 \n",
"1 2 UNKNOWN UNKNOWN 99 \n",
"2 1010 GREENLD GREENLAND 11 \n",
"3 1220 CANADA CANADA 11 \n",
"4 1610 MIGUEL ST. PIERRE AND MIQUELON 11 \n",
".. ... ... ... ... \n",
"205 9350 GUAM GUAM 9 \n",
"206 9410 CAN EN I CANTON AND ENDERBURY ISLANDS 9 \n",
"207 9510 AM SAMOA AMERICAN SAMOA 9 \n",
"208 9610 NMARIANA NORTHERN MARIANA ISLANDS 9 \n",
"209 9800 US O IS US MINOR OUTLYING ISLAND 9 \n",
"\n",
" gencCode \n",
"0 None \n",
"1 AX1 \n",
"2 GRL \n",
"3 CAN \n",
"4 None \n",
".. ... \n",
"205 GUM \n",
"206 None \n",
"207 ASM \n",
"208 MNP \n",
"209 None \n",
"\n",
"[210 rows x 5 columns]"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_usda_data(country_url)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" commodityName | \n",
" unitId | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 101 | \n",
" Wheat - HRW | \n",
" 1 | \n",
"
\n",
" \n",
" 1 | \n",
" 102 | \n",
" Wheat - SRW | \n",
" 1 | \n",
"
\n",
" \n",
" 2 | \n",
" 103 | \n",
" Wheat - HRS | \n",
" 1 | \n",
"
\n",
" \n",
" 3 | \n",
" 104 | \n",
" Wheat - White | \n",
" 1 | \n",
"
\n",
" \n",
" 4 | \n",
" 105 | \n",
" Wheat - Durum | \n",
" 1 | \n",
"
\n",
" \n",
" 5 | \n",
" 106 | \n",
" Wheat - Mixed | \n",
" 1 | \n",
"
\n",
" \n",
" 6 | \n",
" 107 | \n",
" All Wheat | \n",
" 1 | \n",
"
\n",
" \n",
" 7 | \n",
" 201 | \n",
" Wheat Products | \n",
" 1 | \n",
"
\n",
" \n",
" 8 | \n",
" 301 | \n",
" Barley | \n",
" 1 | \n",
"
\n",
" \n",
" 9 | \n",
" 401 | \n",
" Corn | \n",
" 1 | \n",
"
\n",
" \n",
" 10 | \n",
" 501 | \n",
" Rye | \n",
" 1 | \n",
"
\n",
" \n",
" 11 | \n",
" 601 | \n",
" Oats | \n",
" 1 | \n",
"
\n",
" \n",
" 12 | \n",
" 701 | \n",
" Sorghum | \n",
" 1 | \n",
"
\n",
" \n",
" 13 | \n",
" 801 | \n",
" Soybeans | \n",
" 1 | \n",
"
\n",
" \n",
" 14 | \n",
" 901 | \n",
" Soybean cake & meal | \n",
" 1 | \n",
"
\n",
" \n",
" 15 | \n",
" 902 | \n",
" Soybean Oil | \n",
" 1 | \n",
"
\n",
" \n",
" 16 | \n",
" 1001 | \n",
" Flaxseed | \n",
" 1 | \n",
"
\n",
" \n",
" 17 | \n",
" 1101 | \n",
" Linseed Oil | \n",
" 1 | \n",
"
\n",
" \n",
" 18 | \n",
" 1110 | \n",
" Sunflowerseed Oil | \n",
" 1 | \n",
"
\n",
" \n",
" 19 | \n",
" 1201 | \n",
" Cottonseed | \n",
" 1 | \n",
"
\n",
" \n",
" 20 | \n",
" 1202 | \n",
" Cottonseed cake & meal | \n",
" 1 | \n",
"
\n",
" \n",
" 21 | \n",
" 1203 | \n",
" Cottonseed Oil | \n",
" 1 | \n",
"
\n",
" \n",
" 22 | \n",
" 1301 | \n",
" Cotton- Am Pima | \n",
" 2 | \n",
"
\n",
" \n",
" 23 | \n",
" 1401 | \n",
" Cotton- Upland 1 1/16\" & over | \n",
" 2 | \n",
"
\n",
" \n",
" 24 | \n",
" 1402 | \n",
" Cotton- Upland 1\"-1 1/16\" & over | \n",
" 2 | \n",
"
\n",
" \n",
" 25 | \n",
" 1403 | \n",
" Cotton- Upland under 1\" | \n",
" 2 | \n",
"
\n",
" \n",
" 26 | \n",
" 1404 | \n",
" All Upland Cotton | \n",
" 2 | \n",
"
\n",
" \n",
" 27 | \n",
" 1498 | \n",
" Rice - LG Rough | \n",
" 1 | \n",
"
\n",
" \n",
" 28 | \n",
" 1499 | \n",
" Rice- Med, Short,Other Rough | \n",
" 1 | \n",
"
\n",
" \n",
" 29 | \n",
" 1501 | \n",
" Rice- LG Brown | \n",
" 1 | \n",
"
\n",
" \n",
" 30 | \n",
" 1502 | \n",
" Rice- Med,Short, Other Brown | \n",
" 1 | \n",
"
\n",
" \n",
" 31 | \n",
" 1503 | \n",
" Rice - Long Grain, Milled | \n",
" 1 | \n",
"
\n",
" \n",
" 32 | \n",
" 1504 | \n",
" Rice- Med,Short,Other Milled | \n",
" 1 | \n",
"
\n",
" \n",
" 33 | \n",
" 1505 | \n",
" All Rice | \n",
" 1 | \n",
"
\n",
" \n",
" 34 | \n",
" 1601 | \n",
" Cattle Hides - Whole - Excluding Wet Blues | \n",
" 3 | \n",
"
\n",
" \n",
" 35 | \n",
" 1602 | \n",
" Calf Skins - Whole - Excluding Wet Blues | \n",
" 3 | \n",
"
\n",
" \n",
" 36 | \n",
" 1603 | \n",
" Kip Skins - Whole - Excluding Wet Blues | \n",
" 3 | \n",
"
\n",
" \n",
" 37 | \n",
" 1604 | \n",
" Cattle Hides-Cut into Croupons, etc-excl Wet B... | \n",
" 4 | \n",
"
\n",
" \n",
" 38 | \n",
" 1605 | \n",
" Cattle Hides and Skins-other-excluding Wet Blues | \n",
" 5 | \n",
"
\n",
" \n",
" 39 | \n",
" 1606 | \n",
" Cattle Wet Blues-Unsplit (Whole or Sided) | \n",
" 4 | \n",
"
\n",
" \n",
" 40 | \n",
" 1607 | \n",
" Cattle Wet Blues-Grain Splits (Whole or Sided) | \n",
" 4 | \n",
"
\n",
" \n",
" 41 | \n",
" 1608 | \n",
" Cattle Wet Blues-Splits-Excluding Grain Splits | \n",
" 5 | \n",
"
\n",
" \n",
" 42 | \n",
" 1701 | \n",
" Fresh, Chilled, or Frozen Muscle Cuts of Beef | \n",
" 1 | \n",
"
\n",
" \n",
" 43 | \n",
" 1702 | \n",
" Fresh, Chilled, or Frozen Muscle Cuts of Pork | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" commodityCode commodityName unitId\n",
"0 101 Wheat - HRW 1\n",
"1 102 Wheat - SRW 1\n",
"2 103 Wheat - HRS 1\n",
"3 104 Wheat - White 1\n",
"4 105 Wheat - Durum 1\n",
"5 106 Wheat - Mixed 1\n",
"6 107 All Wheat 1\n",
"7 201 Wheat Products 1\n",
"8 301 Barley 1\n",
"9 401 Corn 1\n",
"10 501 Rye 1\n",
"11 601 Oats 1\n",
"12 701 Sorghum 1\n",
"13 801 Soybeans 1\n",
"14 901 Soybean cake & meal 1\n",
"15 902 Soybean Oil 1\n",
"16 1001 Flaxseed 1\n",
"17 1101 Linseed Oil 1\n",
"18 1110 Sunflowerseed Oil 1\n",
"19 1201 Cottonseed 1\n",
"20 1202 Cottonseed cake & meal 1\n",
"21 1203 Cottonseed Oil 1\n",
"22 1301 Cotton- Am Pima 2\n",
"23 1401 Cotton- Upland 1 1/16\" & over 2\n",
"24 1402 Cotton- Upland 1\"-1 1/16\" & over 2\n",
"25 1403 Cotton- Upland under 1\" 2\n",
"26 1404 All Upland Cotton 2\n",
"27 1498 Rice - LG Rough 1\n",
"28 1499 Rice- Med, Short,Other Rough 1\n",
"29 1501 Rice- LG Brown 1\n",
"30 1502 Rice- Med,Short, Other Brown 1\n",
"31 1503 Rice - Long Grain, Milled 1\n",
"32 1504 Rice- Med,Short,Other Milled 1\n",
"33 1505 All Rice 1\n",
"34 1601 Cattle Hides - Whole - Excluding Wet Blues 3\n",
"35 1602 Calf Skins - Whole - Excluding Wet Blues 3\n",
"36 1603 Kip Skins - Whole - Excluding Wet Blues 3\n",
"37 1604 Cattle Hides-Cut into Croupons, etc-excl Wet B... 4\n",
"38 1605 Cattle Hides and Skins-other-excluding Wet Blues 5\n",
"39 1606 Cattle Wet Blues-Unsplit (Whole or Sided) 4\n",
"40 1607 Cattle Wet Blues-Grain Splits (Whole or Sided) 4\n",
"41 1608 Cattle Wet Blues-Splits-Excluding Grain Splits 5\n",
"42 1701 Fresh, Chilled, or Frozen Muscle Cuts of Beef 1\n",
"43 1702 Fresh, Chilled, or Frozen Muscle Cuts of Pork 1"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_usda_data(commodity_url)"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" marketYearStart | \n",
" marketYearEnd | \n",
" marketYear | \n",
" releaseTimeStamp | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 101 | \n",
" 2022-06-01T00:00:00 | \n",
" 2023-05-31T00:00:00 | \n",
" 2023 | \n",
" 2022-07-28T00:00:00 | \n",
"
\n",
" \n",
" 1 | \n",
" 102 | \n",
" 2022-06-01T00:00:00 | \n",
" 2023-05-31T00:00:00 | \n",
" 2023 | \n",
" 2022-07-28T00:00:00 | \n",
"
\n",
" \n",
" 2 | \n",
" 103 | \n",
" 2022-06-01T00:00:00 | \n",
" 2023-05-31T00:00:00 | \n",
" 2023 | \n",
" 2022-07-28T00:00:00 | \n",
"
\n",
" \n",
" 3 | \n",
" 104 | \n",
" 2022-06-01T00:00:00 | \n",
" 2023-05-31T00:00:00 | \n",
" 2023 | \n",
" 2022-07-28T00:00:00 | \n",
"
\n",
" \n",
" 4 | \n",
" 105 | \n",
" 2022-06-01T00:00:00 | \n",
" 2023-05-31T00:00:00 | \n",
" 2023 | \n",
" 2022-07-28T00:00:00 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 999 | \n",
" 1602 | \n",
" 1998-01-01T00:00:00 | \n",
" 1998-12-31T00:00:00 | \n",
" 1998 | \n",
" 1999-01-07T00:00:00 | \n",
"
\n",
" \n",
" 1000 | \n",
" 1603 | \n",
" 1998-01-01T00:00:00 | \n",
" 1998-12-31T00:00:00 | \n",
" 1998 | \n",
" 1999-01-07T00:00:00 | \n",
"
\n",
" \n",
" 1001 | \n",
" 1606 | \n",
" 1998-01-01T00:00:00 | \n",
" 1998-12-31T00:00:00 | \n",
" 1998 | \n",
" 1999-01-07T00:00:00 | \n",
"
\n",
" \n",
" 1002 | \n",
" 1607 | \n",
" 1998-01-01T00:00:00 | \n",
" 1998-12-31T00:00:00 | \n",
" 1998 | \n",
" 1999-01-07T00:00:00 | \n",
"
\n",
" \n",
" 1003 | \n",
" 1608 | \n",
" 1998-01-01T00:00:00 | \n",
" 1998-12-31T00:00:00 | \n",
" 1998 | \n",
" 1999-01-07T00:00:00 | \n",
"
\n",
" \n",
"
\n",
"
1004 rows × 5 columns
\n",
"
"
],
"text/plain": [
" commodityCode marketYearStart marketYearEnd marketYear \\\n",
"0 101 2022-06-01T00:00:00 2023-05-31T00:00:00 2023 \n",
"1 102 2022-06-01T00:00:00 2023-05-31T00:00:00 2023 \n",
"2 103 2022-06-01T00:00:00 2023-05-31T00:00:00 2023 \n",
"3 104 2022-06-01T00:00:00 2023-05-31T00:00:00 2023 \n",
"4 105 2022-06-01T00:00:00 2023-05-31T00:00:00 2023 \n",
"... ... ... ... ... \n",
"999 1602 1998-01-01T00:00:00 1998-12-31T00:00:00 1998 \n",
"1000 1603 1998-01-01T00:00:00 1998-12-31T00:00:00 1998 \n",
"1001 1606 1998-01-01T00:00:00 1998-12-31T00:00:00 1998 \n",
"1002 1607 1998-01-01T00:00:00 1998-12-31T00:00:00 1998 \n",
"1003 1608 1998-01-01T00:00:00 1998-12-31T00:00:00 1998 \n",
"\n",
" releaseTimeStamp \n",
"0 2022-07-28T00:00:00 \n",
"1 2022-07-28T00:00:00 \n",
"2 2022-07-28T00:00:00 \n",
"3 2022-07-28T00:00:00 \n",
"4 2022-07-28T00:00:00 \n",
"... ... \n",
"999 1999-01-07T00:00:00 \n",
"1000 1999-01-07T00:00:00 \n",
"1001 1999-01-07T00:00:00 \n",
"1002 1999-01-07T00:00:00 \n",
"1003 1999-01-07T00:00:00 \n",
"\n",
"[1004 rows x 5 columns]"
]
},
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_usda_data(data_release_url)"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" unitId | \n",
" unitNames | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" Metric Tons | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" Running Bales | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" Pieces | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
" NUMBER | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
" Pounds | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" unitId unitNames\n",
"0 1 Metric Tons\n",
"1 2 Running Bales\n",
"2 3 Pieces\n",
"3 4 NUMBER\n",
"4 5 Pounds"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Units of commodities referenced in chart above.\n",
"get_usda_data(units_url)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given Commodity Code (Ex: 107 for \"All Wheat\") and MarketYear (Ex: 2021) this API End point will return a list of US Export records of White Wheat to all applicable countries from USA for the given Market Year. See DataReleaseDates end point to get a list of all Commodities and the corresponding Market Year data."
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" countryCode | \n",
" weeklyExports | \n",
" accumulatedExports | \n",
" outstandingSales | \n",
" grossNewSales | \n",
" currentMYNetSales | \n",
" currentMYTotalCommitment | \n",
" nextMYOutstandingSales | \n",
" nextMYNetSales | \n",
" unitId | \n",
" weekEndingDate | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 107 | \n",
" 1220 | \n",
" 0 | \n",
" 0 | \n",
" 9266 | \n",
" 9266 | \n",
" 0 | \n",
" 9266 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 1 | \n",
" 107 | \n",
" 2010 | \n",
" 13506 | \n",
" 13506 | \n",
" 352846 | \n",
" 224335 | \n",
" 25376 | \n",
" 366352 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 2 | \n",
" 107 | \n",
" 2050 | \n",
" 0 | \n",
" 0 | \n",
" 95999 | \n",
" 95999 | \n",
" 95999 | \n",
" 95999 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 3 | \n",
" 107 | \n",
" 2080 | \n",
" 0 | \n",
" 0 | \n",
" 4000 | \n",
" 0 | \n",
" 0 | \n",
" 4000 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 4 | \n",
" 107 | \n",
" 2110 | \n",
" 0 | \n",
" 0 | \n",
" 10000 | \n",
" 0 | \n",
" 0 | \n",
" 10000 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" commodityCode countryCode weeklyExports accumulatedExports \\\n",
"0 107 1220 0 0 \n",
"1 107 2010 13506 13506 \n",
"2 107 2050 0 0 \n",
"3 107 2080 0 0 \n",
"4 107 2110 0 0 \n",
"\n",
" outstandingSales grossNewSales currentMYNetSales \\\n",
"0 9266 9266 0 \n",
"1 352846 224335 25376 \n",
"2 95999 95999 95999 \n",
"3 4000 0 0 \n",
"4 10000 0 0 \n",
"\n",
" currentMYTotalCommitment nextMYOutstandingSales nextMYNetSales unitId \\\n",
"0 9266 0 0 1 \n",
"1 366352 0 0 1 \n",
"2 95999 0 0 1 \n",
"3 4000 0 0 1 \n",
"4 10000 0 0 1 \n",
"\n",
" weekEndingDate \n",
"0 2020-06-04T00:00:00 \n",
"1 2020-06-04T00:00:00 \n",
"2 2020-06-04T00:00:00 \n",
"3 2020-06-04T00:00:00 \n",
"4 2020-06-04T00:00:00 "
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# return first 5 rows for \"All Wheat\" in 2021\n",
"wheat_url = \"https://apps.fas.usda.gov/OpenData/api/esr/exports/commodityCode/107/allCountries/marketYear/2021\"\n",
"get_usda_data(wheat_url).head(5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Given Commodity Code (Ex: 107 for \"All Wheat\"), Country Code (Ex:1220 for Canada) and MarketYear (Ex: 2021) this API End point will return a list of US Export records of White Wheat to Canada from USA for the give Market Year. Please see DataReleaseDates end point to get a list of all Commodities and the corresponding Market Year data."
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" countryCode | \n",
" weeklyExports | \n",
" accumulatedExports | \n",
" outstandingSales | \n",
" grossNewSales | \n",
" currentMYNetSales | \n",
" currentMYTotalCommitment | \n",
" nextMYOutstandingSales | \n",
" nextMYNetSales | \n",
" unitId | \n",
" weekEndingDate | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 107 | \n",
" 1220 | \n",
" 0 | \n",
" 0 | \n",
" 9266 | \n",
" 9266 | \n",
" 0 | \n",
" 9266 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 1 | \n",
" 107 | \n",
" 2010 | \n",
" 13506 | \n",
" 13506 | \n",
" 352846 | \n",
" 224335 | \n",
" 25376 | \n",
" 366352 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 2 | \n",
" 107 | \n",
" 2050 | \n",
" 0 | \n",
" 0 | \n",
" 95999 | \n",
" 95999 | \n",
" 95999 | \n",
" 95999 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 3 | \n",
" 107 | \n",
" 2080 | \n",
" 0 | \n",
" 0 | \n",
" 4000 | \n",
" 0 | \n",
" 0 | \n",
" 4000 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
" 4 | \n",
" 107 | \n",
" 2110 | \n",
" 0 | \n",
" 0 | \n",
" 10000 | \n",
" 0 | \n",
" 0 | \n",
" 10000 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 2020-06-04T00:00:00 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" commodityCode countryCode weeklyExports accumulatedExports \\\n",
"0 107 1220 0 0 \n",
"1 107 2010 13506 13506 \n",
"2 107 2050 0 0 \n",
"3 107 2080 0 0 \n",
"4 107 2110 0 0 \n",
"\n",
" outstandingSales grossNewSales currentMYNetSales \\\n",
"0 9266 9266 0 \n",
"1 352846 224335 25376 \n",
"2 95999 95999 95999 \n",
"3 4000 0 0 \n",
"4 10000 0 0 \n",
"\n",
" currentMYTotalCommitment nextMYOutstandingSales nextMYNetSales unitId \\\n",
"0 9266 0 0 1 \n",
"1 366352 0 0 1 \n",
"2 95999 0 0 1 \n",
"3 4000 0 0 1 \n",
"4 10000 0 0 1 \n",
"\n",
" weekEndingDate \n",
"0 2020-06-04T00:00:00 \n",
"1 2020-06-04T00:00:00 \n",
"2 2020-06-04T00:00:00 \n",
"3 2020-06-04T00:00:00 \n",
"4 2020-06-04T00:00:00 "
]
},
"execution_count": 73,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# return first 5 rows for \"All Wheat\" in 2021\n",
"canada_wheat_url = \"https://apps.fas.usda.gov/OpenData/api/esr/exports/commodityCode/107/countryCode/2021/marketYear/1220\"\n",
"get_usda_data(wheat_url).head(5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Production, Supply & Distribution (PSD) Data\n",
"PSD Online is the public repository for USDA’s Official Production, Supply and Distribution forecast data, reports and circulars for key agricultural commodities.\n",
"\n",
"FAS's PSD Online data are reviewed and updated monthly by an interagency committee chaired by USDA's World Agricultural Outlook Board (WAOB),and consisting of: the Foreign Agricultural Service (FAS), the Economic Research Service (ERS),the Farm Service Agency (FSA), and the Agricultural Marketing Service (AMS).\n",
"\n",
"The international portion of the data is updated with input from agricultural attachés stationed at U.S. embassies around the world, FAS commodity analysts, and country and commodity analysts with ERS. The U.S. domestic component is updated with input from analysts in FAS, ERS, the National Agricultural Statistical Service, and FSA.\n",
"\n",
"*Note, country and commodity codes are differen that ESR data*"
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {},
"outputs": [],
"source": [
"psd_com_attributes_url = \"https://apps.fas.usda.gov/OpenData/api/psd/commodityAttributes\"\n",
"psd_units_url = \"https://apps.fas.usda.gov/OpenData/api/psd/unitsOfMeasure\"\n",
"psd_com_url = \"https://apps.fas.usda.gov/OpenData/api/psd/commodities\"\n",
"psd_countries_url = \"https://apps.fas.usda.gov/OpenData/api/psd/countries\"\n",
"psd_regions_url = \"https://apps.fas.usda.gov/OpenData/api/psd/regions\"\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'psd_com_attributes_url' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/Users/cameronkruse/development/github/food-security/usda-data-exploration.ipynb Cell 17\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m get_usda_data(psd_com_attributes_url)\n",
"\u001b[0;31mNameError\u001b[0m: name 'psd_com_attributes_url' is not defined"
]
}
],
"source": [
"get_usda_data(psd_com_attributes_url)"
]
},
{
"cell_type": "code",
"execution_count": 102,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" unitId | \n",
" unitDescription | \n",
" \n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" (1000 BUSHES) | \n",
" \n",
" \n",
" 1 | \n",
" 2 | \n",
" (1000 60 KG BAGS) | \n",
" \n",
" \n",
" 2 | \n",
" 3 | \n",
" (1000 COLONIES) | \n",
" \n",
" \n",
" 3 | \n",
" 4 | \n",
" (1000 HA) | \n",
" \n",
" \n",
" 4 | \n",
" 5 | \n",
" (1000 HEAD) | \n",
" \n",
" \n",
" 5 | \n",
" 6 | \n",
" (1000 HL) | \n",
" \n",
" \n",
" 6 | \n",
" 7 | \n",
" (1000 MT CWE) | \n",
" \n",
" \n",
" 7 | \n",
" 8 | \n",
" (1000 MT) | \n",
" \n",
" \n",
" 8 | \n",
" 9 | \n",
" (1000 PCS) | \n",
" \n",
" \n",
" 9 | \n",
" 10 | \n",
" (1000 TREES) | \n",
" \n",
" \n",
" 10 | \n",
" 11 | \n",
" (Dec. Fraction) | \n",
" \n",
" \n",
" 11 | \n",
" 12 | \n",
" (HA) | \n",
" \n",
" \n",
" 12 | \n",
" 13 | \n",
" (HECTARES) | \n",
" \n",
" \n",
" 13 | \n",
" 14 | \n",
" (KG) | \n",
" \n",
" \n",
" 14 | \n",
" 15 | \n",
" (MIL HEAD) | \n",
" \n",
" \n",
" 15 | \n",
" 16 | \n",
" (MIL PCS) | \n",
" \n",
" \n",
" 16 | \n",
" 17 | \n",
" (MILLION TREES) | \n",
" \n",
" \n",
" 17 | \n",
" 18 | \n",
" (MT RAW EQ) | \n",
" \n",
" \n",
" 18 | \n",
" 19 | \n",
" (MT RAW EW) | \n",
" \n",
" \n",
" 19 | \n",
" 20 | \n",
" (MT RE) | \n",
" \n",
" \n",
" 20 | \n",
" 21 | \n",
" (MT) | \n",
" \n",
" \n",
" 21 | \n",
" 22 | \n",
" (MT, Net Weight) | \n",
" \n",
" \n",
" 22 | \n",
" 23 | \n",
" (PERCENT) | \n",
" \n",
" \n",
" 23 | \n",
" 24 | \n",
" (RATIO) | \n",
" \n",
" \n",
" 24 | \n",
" 25 | \n",
" (1000 CUBIC METERS) | \n",
" \n",
" \n",
" 25 | \n",
" 26 | \n",
" (MT/HA) | \n",
" \n",
" \n",
" 26 | \n",
" 27 | \n",
" 1000 480 lb. Bales | \n",
" \n",
" \n",
" 27 | \n",
" 28 | \n",
" (Bales/HA) | \n",
" \n",
" \n",
" 28 | \n",
" 29 | \n",
" (KG/HA) | \n",
" \n",
" \n",
" 29 | \n",
" 30 | \n",
" ACRES | \n",
" \n",
" \n",
" 30 | \n",
" 31 | \n",
" BUSHELS | \n",
" \n",
" \n",
" 31 | \n",
" 32 | \n",
" HUNDREDWEIGHT | \n",
" \n",
" \n",
" 32 | \n",
" 33 | \n",
" MILLING RATE | \n",
" \n",
" \n",
" 33 | \n",
" 34 | \n",
" BUSHELS/TON | \n",
" \n",
" \n",
" 34 | \n",
" 35 | \n",
" IMPORT MILLING RATE | \n",
" \n",
" \n",
" 35 | \n",
" 36 | \n",
" Bushels | \n",
" \n",
" \n",
" 36 | \n",
" 37 | \n",
" SHORT TONS | \n",
" \n",
" \n",
" 37 | \n",
" 38 | \n",
" MILLION LBS | \n",
" \n",
" \n",
" 38 | \n",
" 39 | \n",
" BILLION LBS | \n",
" \n",
" \n",
" 39 | \n",
" 40 | \n",
" (HEAD) | \n",
" \n",
" \n",
" 40 | \n",
" 41 | \n",
" (PEOPLE) | \n",
" \n",
" \n",
" \n",
" "
],
"text/plain": [
" unitId unitDescription\n",
"0 1 (1000 BUSHES) \n",
"1 2 (1000 60 KG BAGS) \n",
"2 3 (1000 COLONIES) \n",
"3 4 (1000 HA) \n",
"4 5 (1000 HEAD) \n",
"5 6 (1000 HL) \n",
"6 7 (1000 MT CWE) \n",
"7 8 (1000 MT) \n",
"8 9 (1000 PCS) \n",
"9 10 (1000 TREES) \n",
"10 11 (Dec. Fraction) \n",
"11 12 (HA) \n",
"12 13 (HECTARES) \n",
"13 14 (KG) \n",
"14 15 (MIL HEAD) \n",
"15 16 (MIL PCS) \n",
"16 17 (MILLION TREES) \n",
"17 18 (MT RAW EQ) \n",
"18 19 (MT RAW EW) \n",
"19 20 (MT RE) \n",
"20 21 (MT) \n",
"21 22 (MT, Net Weight) \n",
"22 23 (PERCENT) \n",
"23 24 (RATIO) \n",
"24 25 (1000 CUBIC METERS) \n",
"25 26 (MT/HA) \n",
"26 27 1000 480 lb. Bales \n",
"27 28 (Bales/HA) \n",
"28 29 (KG/HA) \n",
"29 30 ACRES \n",
"30 31 BUSHELS \n",
"31 32 HUNDREDWEIGHT \n",
"32 33 MILLING RATE \n",
"33 34 BUSHELS/TON \n",
"34 35 IMPORT MILLING RATE \n",
"35 36 Bushels \n",
"36 37 SHORT TONS \n",
"37 38 MILLION LBS \n",
"38 39 BILLION LBS \n",
"39 40 (HEAD) \n",
"40 41 (PEOPLE) "
]
},
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_usda_data(psd_units_url)"
]
},
{
"cell_type": "code",
"execution_count": 104,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" commodityName | \n",
" \n",
" \n",
" \n",
" \n",
" 0 | \n",
" 577400 | \n",
" Almonds, Shelled Basis | \n",
" \n",
" \n",
" 1 | \n",
" 11000 | \n",
" Animal Numbers, Cattle | \n",
" \n",
" \n",
" 2 | \n",
" 13000 | \n",
" Animal Numbers, Swine | \n",
" \n",
" \n",
" 3 | \n",
" 574000 | \n",
" Apples, Fresh | \n",
" \n",
" \n",
" 4 | \n",
" 430000 | \n",
" Barley | \n",
" \n",
" \n",
" 5 | \n",
" 579305 | \n",
" Cherries (Sweet&Sour), Fresh | \n",
" \n",
" \n",
" 6 | \n",
" 711100 | \n",
" Coffee, Green | \n",
" \n",
" \n",
" 7 | \n",
" 440000 | \n",
" Corn | \n",
" \n",
" \n",
" 8 | \n",
" 2631000 | \n",
" Cotton | \n",
" \n",
" \n",
" 9 | \n",
" 230000 | \n",
" Dairy, Butter | \n",
" \n",
" \n",
" 10 | \n",
" 240000 | \n",
" Dairy, Cheese | \n",
" \n",
" \n",
" 11 | \n",
" 224400 | \n",
" Dairy, Dry Whole Milk Powder | \n",
" \n",
" \n",
" 12 | \n",
" 223000 | \n",
" Dairy, Milk, Fluid | \n",
" \n",
" \n",
" 13 | \n",
" 224200 | \n",
" Dairy, Milk, Nonfat Dry | \n",
" \n",
" \n",
" 14 | \n",
" 572220 | \n",
" Grapefruit, Fresh | \n",
" \n",
" \n",
" 15 | \n",
" 575100 | \n",
" Grapes, Fresh Table | \n",
" \n",
" \n",
" 16 | \n",
" 572120 | \n",
" Lemons/Limes, Fresh | \n",
" \n",
" \n",
" 17 | \n",
" 813700 | \n",
" Meal, Copra | \n",
" \n",
" \n",
" 18 | \n",
" 813300 | \n",
" Meal, Cottonseed | \n",
" \n",
" \n",
" 19 | \n",
" 814200 | \n",
" Meal, Fish | \n",
" \n",
" \n",
" 20 | \n",
" 813800 | \n",
" Meal, Palm Kernel | \n",
" \n",
" \n",
" 21 | \n",
" 813200 | \n",
" Meal, Peanut | \n",
" \n",
" \n",
" 22 | \n",
" 813600 | \n",
" Meal, Rapeseed | \n",
" \n",
" \n",
" 23 | \n",
" 813100 | \n",
" Meal, Soybean | \n",
" \n",
" \n",
" 24 | \n",
" 813101 | \n",
" Meal, Soybean (Local) | \n",
" \n",
" \n",
" 25 | \n",
" 813500 | \n",
" Meal, Sunflowerseed | \n",
" \n",
" \n",
" 26 | \n",
" 111000 | \n",
" Meat, Beef and Veal | \n",
" \n",
" \n",
" 27 | \n",
" 115000 | \n",
" Meat, Chicken | \n",
" \n",
" \n",
" 28 | \n",
" 113000 | \n",
" Meat, Swine | \n",
" \n",
" \n",
" 29 | \n",
" 459100 | \n",
" Millet | \n",
" \n",
" \n",
" 30 | \n",
" 459900 | \n",
" Mixed Grain | \n",
" \n",
" \n",
" 31 | \n",
" 452000 | \n",
" Oats | \n",
" \n",
" \n",
" 32 | \n",
" 4242000 | \n",
" Oil, Coconut | \n",
" \n",
" \n",
" 33 | \n",
" 4233000 | \n",
" Oil, Cottonseed | \n",
" \n",
" \n",
" 34 | \n",
" 4235000 | \n",
" Oil, Olive | \n",
" \n",
" \n",
" 35 | \n",
" 4243000 | \n",
" Oil, Palm | \n",
" \n",
" \n",
" 36 | \n",
" 4244000 | \n",
" Oil, Palm Kernel | \n",
" \n",
" \n",
" 37 | \n",
" 4234000 | \n",
" Oil, Peanut | \n",
" \n",
" \n",
" 38 | \n",
" 4239100 | \n",
" Oil, Rapeseed | \n",
" \n",
" \n",
" 39 | \n",
" 4232000 | \n",
" Oil, Soybean | \n",
" \n",
" \n",
" 40 | \n",
" 4232001 | \n",
" Oil, Soybean (Local) | \n",
" \n",
" \n",
" 41 | \n",
" 4236000 | \n",
" Oil, Sunflowerseed | \n",
" \n",
" \n",
" 42 | \n",
" 2231000 | \n",
" Oilseed, Copra | \n",
" \n",
" \n",
" 43 | \n",
" 2223000 | \n",
" Oilseed, Cottonseed | \n",
" \n",
" \n",
" 44 | \n",
" 2232000 | \n",
" Oilseed, Palm Kernel | \n",
" \n",
" \n",
" 45 | \n",
" 2221000 | \n",
" Oilseed, Peanut | \n",
" \n",
" \n",
" 46 | \n",
" 2226000 | \n",
" Oilseed, Rapeseed | \n",
" \n",
" \n",
" 47 | \n",
" 2222000 | \n",
" Oilseed, Soybean | \n",
" \n",
" \n",
" 48 | \n",
" 2222001 | \n",
" Oilseed, Soybean (Local) | \n",
" \n",
" \n",
" 49 | \n",
" 2224000 | \n",
" Oilseed, Sunflowerseed | \n",
" \n",
" \n",
" 50 | \n",
" 585100 | \n",
" Orange Juice | \n",
" \n",
" \n",
" 51 | \n",
" 571120 | \n",
" Oranges, Fresh | \n",
" \n",
" \n",
" 52 | \n",
" 579309 | \n",
" Peaches & Nectarines, Fresh | \n",
" \n",
" \n",
" 53 | \n",
" 579220 | \n",
" Pears, Fresh | \n",
" \n",
" \n",
" 54 | \n",
" 577907 | \n",
" Pistachios, Inshell Basis | \n",
" \n",
" \n",
" 55 | \n",
" 114200 | \n",
" Poultry, Meat, Broiler | \n",
" \n",
" \n",
" 56 | \n",
" 575200 | \n",
" Raisins | \n",
" \n",
" \n",
" 57 | \n",
" 422110 | \n",
" Rice, Milled | \n",
" \n",
" \n",
" 58 | \n",
" 451000 | \n",
" Rye | \n",
" \n",
" \n",
" 59 | \n",
" 459200 | \n",
" Sorghum | \n",
" \n",
" \n",
" 60 | \n",
" 612000 | \n",
" Sugar, Centrifugal | \n",
" \n",
" \n",
" 61 | \n",
" 571220 | \n",
" Tangerines/Mandarins, Fresh | \n",
" \n",
" \n",
" 62 | \n",
" 577901 | \n",
" Walnuts, Inshell Basis | \n",
" \n",
" \n",
" 63 | \n",
" 410000 | \n",
" Wheat | \n",
" \n",
" \n",
" \n",
" "
],
"text/plain": [
" commodityCode commodityName\n",
"0 577400 Almonds, Shelled Basis\n",
"1 11000 Animal Numbers, Cattle\n",
"2 13000 Animal Numbers, Swine\n",
"3 574000 Apples, Fresh\n",
"4 430000 Barley\n",
"5 579305 Cherries (Sweet&Sour), Fresh\n",
"6 711100 Coffee, Green\n",
"7 440000 Corn\n",
"8 2631000 Cotton\n",
"9 230000 Dairy, Butter\n",
"10 240000 Dairy, Cheese\n",
"11 224400 Dairy, Dry Whole Milk Powder\n",
"12 223000 Dairy, Milk, Fluid\n",
"13 224200 Dairy, Milk, Nonfat Dry\n",
"14 572220 Grapefruit, Fresh\n",
"15 575100 Grapes, Fresh Table\n",
"16 572120 Lemons/Limes, Fresh\n",
"17 813700 Meal, Copra\n",
"18 813300 Meal, Cottonseed\n",
"19 814200 Meal, Fish\n",
"20 813800 Meal, Palm Kernel\n",
"21 813200 Meal, Peanut\n",
"22 813600 Meal, Rapeseed\n",
"23 813100 Meal, Soybean\n",
"24 813101 Meal, Soybean (Local)\n",
"25 813500 Meal, Sunflowerseed\n",
"26 111000 Meat, Beef and Veal\n",
"27 115000 Meat, Chicken\n",
"28 113000 Meat, Swine\n",
"29 459100 Millet\n",
"30 459900 Mixed Grain\n",
"31 452000 Oats\n",
"32 4242000 Oil, Coconut\n",
"33 4233000 Oil, Cottonseed\n",
"34 4235000 Oil, Olive\n",
"35 4243000 Oil, Palm\n",
"36 4244000 Oil, Palm Kernel\n",
"37 4234000 Oil, Peanut\n",
"38 4239100 Oil, Rapeseed\n",
"39 4232000 Oil, Soybean\n",
"40 4232001 Oil, Soybean (Local)\n",
"41 4236000 Oil, Sunflowerseed\n",
"42 2231000 Oilseed, Copra\n",
"43 2223000 Oilseed, Cottonseed\n",
"44 2232000 Oilseed, Palm Kernel\n",
"45 2221000 Oilseed, Peanut\n",
"46 2226000 Oilseed, Rapeseed\n",
"47 2222000 Oilseed, Soybean\n",
"48 2222001 Oilseed, Soybean (Local)\n",
"49 2224000 Oilseed, Sunflowerseed\n",
"50 585100 Orange Juice\n",
"51 571120 Oranges, Fresh\n",
"52 579309 Peaches & Nectarines, Fresh\n",
"53 579220 Pears, Fresh\n",
"54 577907 Pistachios, Inshell Basis\n",
"55 114200 Poultry, Meat, Broiler\n",
"56 575200 Raisins\n",
"57 422110 Rice, Milled\n",
"58 451000 Rye\n",
"59 459200 Sorghum\n",
"60 612000 Sugar, Centrifugal\n",
"61 571220 Tangerines/Mandarins, Fresh\n",
"62 577901 Walnuts, Inshell Basis\n",
"63 410000 Wheat"
]
},
"execution_count": 104,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_usda_data(psd_com_url)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"get_usda_data(psd_regions_url)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"get_usda_data(psd_countries_url)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Returns a set of records with Forecast number for a given Commodity Code (Ex, 0440000 for Corn) and a given Market Year (Ex, 2017) for all applicable countries. PSD Database has data for most commodities since year 1960. Please see Commodities end point to get a list of all PSD Commodities with corresponding Commodity Code."
]
},
{
"cell_type": "code",
"execution_count": 129,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" countryCode | \n",
" marketYear | \n",
" calendarYear | \n",
" month | \n",
" attributeId | \n",
" unitId | \n",
" value | \n",
" \n",
" \n",
" \n",
" \n",
" 0 | \n",
" 440000 | \n",
" AF | \n",
" 2021 | \n",
" 2022 | \n",
" 5 | \n",
" 4 | \n",
" 4 | \n",
" 130.0000 | \n",
" \n",
" \n",
" 1 | \n",
" 440000 | \n",
" AF | \n",
" 2021 | \n",
" 2022 | \n",
" 5 | \n",
" 20 | \n",
" 8 | \n",
" 0.0000 | \n",
" \n",
" \n",
" 2 | \n",
" 440000 | \n",
" AF | \n",
" 2021 | \n",
" 2022 | \n",
" 5 | \n",
" 28 | \n",
" 8 | \n",
" 220.0000 | \n",
" \n",
" \n",
" 3 | \n",
" 440000 | \n",
" AF | \n",
" 2021 | \n",
" 2022 | \n",
" 5 | \n",
" 57 | \n",
" 8 | \n",
" 5.0000 | \n",
" \n",
" \n",
" 4 | \n",
" 440000 | \n",
" AF | \n",
" 2021 | \n",
" 2022 | \n",
" 5 | \n",
" 81 | \n",
" 8 | \n",
" 5.0000 | \n",
" \n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" \n",
" \n",
" 1870 | \n",
" 440000 | \n",
" ZA | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 192 | \n",
" 8 | \n",
" 2100.0000 | \n",
" \n",
" \n",
" 1871 | \n",
" 440000 | \n",
" ZA | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 125 | \n",
" 8 | \n",
" 2800.0000 | \n",
" \n",
" \n",
" 1872 | \n",
" 440000 | \n",
" ZA | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 176 | \n",
" 8 | \n",
" 971.0000 | \n",
" \n",
" \n",
" 1873 | \n",
" 440000 | \n",
" ZA | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 178 | \n",
" 8 | \n",
" 4471.0000 | \n",
" \n",
" \n",
" 1874 | \n",
" 440000 | \n",
" ZA | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 184 | \n",
" 26 | \n",
" 2.5674 | \n",
" \n",
" \n",
" \n",
" 1875 rows × 8 columns \n",
" "
],
"text/plain": [
" commodityCode countryCode marketYear calendarYear month attributeId \\\n",
"0 440000 AF 2021 2022 5 4 \n",
"1 440000 AF 2021 2022 5 20 \n",
"2 440000 AF 2021 2022 5 28 \n",
"3 440000 AF 2021 2022 5 57 \n",
"4 440000 AF 2021 2022 5 81 \n",
"... ... ... ... ... ... ... \n",
"1870 440000 ZA 2021 2022 7 192 \n",
"1871 440000 ZA 2021 2022 7 125 \n",
"1872 440000 ZA 2021 2022 7 176 \n",
"1873 440000 ZA 2021 2022 7 178 \n",
"1874 440000 ZA 2021 2022 7 184 \n",
"\n",
" unitId value \n",
"0 4 130.0000 \n",
"1 8 0.0000 \n",
"2 8 220.0000 \n",
"3 8 5.0000 \n",
"4 8 5.0000 \n",
"... ... ... \n",
"1870 8 2100.0000 \n",
"1871 8 2800.0000 \n",
"1872 8 971.0000 \n",
"1873 8 4471.0000 \n",
"1874 26 2.5674 \n",
"\n",
"[1875 rows x 8 columns]"
]
},
"execution_count": 129,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"psd_comyear_url = \"https://apps.fas.usda.gov/OpenData/api/psd/commodity/{commodityCode}/country/all/year/{marketYear}\"\n",
"get_usda_data(psd_comyear_url.format(commodityCode = \"0440000\", marketYear = \"2021\"))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Returns a set of records with Forecast number for a given Commodity Code (Ex, 0440000 for Corn) and a given Market Year (Ex, 2017) for a given Country (Ex, BR for Brazil). PSD Database has data for most commodities since year 1960. Please see Commodities end point to get a list of all PSD Commodities with corresponding Commodity Code, and Countries end point for a list of all countries with corresponding Country Code"
]
},
{
"cell_type": "code",
"execution_count": 128,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" countryCode | \n",
" marketYear | \n",
" calendarYear | \n",
" month | \n",
" attributeId | \n",
" unitId | \n",
" value | \n",
" \n",
" \n",
" \n",
" \n",
" 0 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 4 | \n",
" 4 | \n",
" 21800.0000 | \n",
" \n",
" \n",
" 1 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 20 | \n",
" 8 | \n",
" 4153.0000 | \n",
" \n",
" \n",
" 2 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 28 | \n",
" 8 | \n",
" 116000.0000 | \n",
" \n",
" \n",
" 3 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 57 | \n",
" 8 | \n",
" 2000.0000 | \n",
" \n",
" \n",
" 4 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 81 | \n",
" 8 | \n",
" 2500.0000 | \n",
" \n",
" \n",
" 5 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 84 | \n",
" 8 | \n",
" 0.0000 | \n",
" \n",
" \n",
" 6 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 86 | \n",
" 8 | \n",
" 122153.0000 | \n",
" \n",
" \n",
" 7 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 88 | \n",
" 8 | \n",
" 44500.0000 | \n",
" \n",
" \n",
" 8 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 113 | \n",
" 8 | \n",
" 34000.0000 | \n",
" \n",
" \n",
" 9 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 130 | \n",
" 8 | \n",
" 62000.0000 | \n",
" \n",
" \n",
" 10 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 192 | \n",
" 8 | \n",
" 11000.0000 | \n",
" \n",
" \n",
" 11 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 125 | \n",
" 8 | \n",
" 73000.0000 | \n",
" \n",
" \n",
" 12 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 176 | \n",
" 8 | \n",
" 4653.0000 | \n",
" \n",
" \n",
" 13 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 178 | \n",
" 8 | \n",
" 122153.0000 | \n",
" \n",
" \n",
" 14 | \n",
" 440000 | \n",
" BR | \n",
" 2021 | \n",
" 2022 | \n",
" 6 | \n",
" 184 | \n",
" 26 | \n",
" 5.3211 | \n",
" \n",
" \n",
" \n",
" "
],
"text/plain": [
" commodityCode countryCode marketYear calendarYear month attributeId \\\n",
"0 440000 BR 2021 2022 6 4 \n",
"1 440000 BR 2021 2022 6 20 \n",
"2 440000 BR 2021 2022 6 28 \n",
"3 440000 BR 2021 2022 6 57 \n",
"4 440000 BR 2021 2022 6 81 \n",
"5 440000 BR 2021 2022 6 84 \n",
"6 440000 BR 2021 2022 6 86 \n",
"7 440000 BR 2021 2022 6 88 \n",
"8 440000 BR 2021 2022 6 113 \n",
"9 440000 BR 2021 2022 6 130 \n",
"10 440000 BR 2021 2022 6 192 \n",
"11 440000 BR 2021 2022 6 125 \n",
"12 440000 BR 2021 2022 6 176 \n",
"13 440000 BR 2021 2022 6 178 \n",
"14 440000 BR 2021 2022 6 184 \n",
"\n",
" unitId value \n",
"0 4 21800.0000 \n",
"1 8 4153.0000 \n",
"2 8 116000.0000 \n",
"3 8 2000.0000 \n",
"4 8 2500.0000 \n",
"5 8 0.0000 \n",
"6 8 122153.0000 \n",
"7 8 44500.0000 \n",
"8 8 34000.0000 \n",
"9 8 62000.0000 \n",
"10 8 11000.0000 \n",
"11 8 73000.0000 \n",
"12 8 4653.0000 \n",
"13 8 122153.0000 \n",
"14 26 5.3211 "
]
},
"execution_count": 128,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"psd_comcountryyear_url = \"https://apps.fas.usda.gov/OpenData/api/psd/commodity/{commodityCode}/country/{countryCode}/year/{marketYear}\"\n",
"get_usda_data(psd_comcountryyear_url.format(commodityCode = \"0440000\", countryCode = \"BR\", marketYear = \"2021\"))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Returns a set of records with Forecast number for a given Commodity Code (Ex, 0440000 for Corn) and a given Market Year (Ex, 2017) for the world.Data from all applicable countries are aggregated together for reporting it at the World Level. PSD Database has data for most commodities since year 1960. Please see Commodities end point to get a list of all PSD Commodities with corresponding Commodity Code."
]
},
{
"cell_type": "code",
"execution_count": 127,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" commodityCode | \n",
" countryCode | \n",
" marketYear | \n",
" calendarYear | \n",
" month | \n",
" attributeId | \n",
" unitId | \n",
" value | \n",
" \n",
" \n",
" \n",
" \n",
" 0 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 4 | \n",
" 4 | \n",
" 2.067390e+05 | \n",
" \n",
" \n",
" 1 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 20 | \n",
" 8 | \n",
" 2.932910e+05 | \n",
" \n",
" \n",
" 2 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 28 | \n",
" 8 | \n",
" 1.217866e+06 | \n",
" \n",
" \n",
" 3 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 57 | \n",
" 8 | \n",
" 1.791450e+05 | \n",
" \n",
" \n",
" 4 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 81 | \n",
" 8 | \n",
" 1.813980e+05 | \n",
" \n",
" \n",
" 5 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 84 | \n",
" 8 | \n",
" 0.000000e+00 | \n",
" \n",
" \n",
" 6 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 86 | \n",
" 8 | \n",
" 1.690302e+06 | \n",
" \n",
" \n",
" 7 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 88 | \n",
" 8 | \n",
" 1.992330e+05 | \n",
" \n",
" \n",
" 8 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 113 | \n",
" 8 | \n",
" 1.899280e+05 | \n",
" \n",
" \n",
" 9 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 130 | \n",
" 8 | \n",
" 7.462700e+05 | \n",
" \n",
" \n",
" 10 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 192 | \n",
" 8 | \n",
" 4.325210e+05 | \n",
" \n",
" \n",
" 11 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 125 | \n",
" 8 | \n",
" 1.178791e+06 | \n",
" \n",
" \n",
" 12 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 176 | \n",
" 8 | \n",
" 3.122780e+05 | \n",
" \n",
" \n",
" 13 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 178 | \n",
" 8 | \n",
" 1.690302e+06 | \n",
" \n",
" \n",
" 14 | \n",
" 440000 | \n",
" 0 | \n",
" 2021 | \n",
" 2022 | \n",
" 7 | \n",
" 184 | \n",
" 26 | \n",
" 5.890800e+00 | \n",
" \n",
" \n",
" \n",
" "
],
"text/plain": [
" commodityCode countryCode marketYear calendarYear month attributeId \\\n",
"0 440000 0 2021 2022 7 4 \n",
"1 440000 0 2021 2022 7 20 \n",
"2 440000 0 2021 2022 7 28 \n",
"3 440000 0 2021 2022 7 57 \n",
"4 440000 0 2021 2022 7 81 \n",
"5 440000 0 2021 2022 7 84 \n",
"6 440000 0 2021 2022 7 86 \n",
"7 440000 0 2021 2022 7 88 \n",
"8 440000 0 2021 2022 7 113 \n",
"9 440000 0 2021 2022 7 130 \n",
"10 440000 0 2021 2022 7 192 \n",
"11 440000 0 2021 2022 7 125 \n",
"12 440000 0 2021 2022 7 176 \n",
"13 440000 0 2021 2022 7 178 \n",
"14 440000 0 2021 2022 7 184 \n",
"\n",
" unitId value \n",
"0 4 2.067390e+05 \n",
"1 8 2.932910e+05 \n",
"2 8 1.217866e+06 \n",
"3 8 1.791450e+05 \n",
"4 8 1.813980e+05 \n",
"5 8 0.000000e+00 \n",
"6 8 1.690302e+06 \n",
"7 8 1.992330e+05 \n",
"8 8 1.899280e+05 \n",
"9 8 7.462700e+05 \n",
"10 8 4.325210e+05 \n",
"11 8 1.178791e+06 \n",
"12 8 3.122780e+05 \n",
"13 8 1.690302e+06 \n",
"14 26 5.890800e+00 "
]
},
"execution_count": 127,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"psd_comworldyear_url = \"https://apps.fas.usda.gov/OpenData/api/psd/commodity/{commodityCode}/world/year/{marketYear}\"\n",
"get_usda_data(psd_comworldyear_url.format(commodityCode = \"0440000\", marketYear = \"2021\"))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" \n",
" | \n",
" Production Quantity | \n",
" Domestic Consumption | \n",
" USDA Stocks to Use Ratio | \n",
" Gro Implied Stocks to Use Ratio | \n",
" \n",
" \n",
" \n",
" \n",
" 2013/14 | \n",
" 265 | \n",
" 2825 | \n",
" 17.391304 | \n",
" NaN | \n",
" \n",
" \n",
" 2014/15 | \n",
" 473 | \n",
" 3125 | \n",
" 15.104000 | \n",
" NaN | \n",
" \n",
" \n",
" 2015/16 | \n",
" 779 | \n",
" 2950 | \n",
" 10.949153 | \n",
" NaN | \n",
" \n",
" \n",
" 2016/17 | \n",
" 516 | \n",
" 3000 | \n",
" 9.900000 | \n",
" NaN | \n",
" \n",
" \n",
" 2017/18 | \n",
" 463 | \n",
" 3050 | \n",
" 9.508197 | \n",
" NaN | \n",
" \n",
" \n",
" 2018/19 | \n",
" 702 | \n",
" 3000 | \n",
" 7.120076 | \n",
" NaN | \n",
" \n",
" \n",
" 2019/20 | \n",
" 726 | \n",
" 3100 | \n",
" 16.903226 | \n",
" NaN | \n",
" \n",
" \n",
" 2020/21 | \n",
" 751 | \n",
" 2900 | \n",
" 14.939759 | \n",
" NaN | \n",
" \n",
" \n",
" 2021/22 | \n",
" 600 | \n",
" 2850 | \n",
" 10.508475 | \n",
" NaN | \n",
" \n",
" \n",
" 2022/23 | \n",
" 700 | \n",
" 2600 | \n",
" 10.518234 | \n",
" 11.529111 | \n",
" \n",
" \n",
" \n",
" "
],
"text/plain": [
" Production Quantity Domestic Consumption USDA Stocks to Use Ratio \\\n",
"2013/14 265 2825 17.391304 \n",
"2014/15 473 3125 15.104000 \n",
"2015/16 779 2950 10.949153 \n",
"2016/17 516 3000 9.900000 \n",
"2017/18 463 3050 9.508197 \n",
"2018/19 702 3000 7.120076 \n",
"2019/20 726 3100 16.903226 \n",
"2020/21 751 2900 14.939759 \n",
"2021/22 600 2850 10.508475 \n",
"2022/23 700 2600 10.518234 \n",
"\n",
" Gro Implied Stocks to Use Ratio \n",
"2013/14 NaN \n",
"2014/15 NaN \n",
"2015/16 NaN \n",
"2016/17 NaN \n",
"2017/18 NaN \n",
"2018/19 NaN \n",
"2019/20 NaN \n",
"2020/21 NaN \n",
"2021/22 NaN \n",
"2022/23 11.529111 "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gro_url = \"https://community.gro-intelligence.com/food-security-tracker-africa/data/Sudan_Wheat_supply_demand.json\"\n",
"get_usda_data(gro_url)\n",
"# See chart of data on website here: https://community.gro-intelligence.com/food-security-tracker-africa/details?country=Sudan&crop=Wheat"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"https://community.gro-intelligence.com/food-security-tracker-africa/details?country=Sudan&crop=Wheat\n",
"\n",
"/Users/cameronkruse/Desktop/Screen Shot 2022-07-31 at 6.57.33 PM.png\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 ('food-security')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "80d14d1fb741077bd42a5b4187c7db14fd15f042564cfa5e7db6942dfa41f05d"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|