2023-01-12 16:13:39 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 1,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "41405f3d",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"from matplotlib import pyplot as plt\n",
|
|
|
|
"import numpy as np"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "dfc88764",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## General conversions \n",
|
|
|
|
"\n",
|
|
|
|
"Conversions\n",
|
|
|
|
"\n",
|
|
|
|
"Sunflower Seeds, sunflower seed kernels, dried\n",
|
|
|
|
"584kcal/100g\n",
|
|
|
|
"https://fdc.nal.usda.gov/fdc-app.html#/food-details/170562/nutrients\n",
|
|
|
|
"FDC ID: 170562\n",
|
|
|
|
"USDA Unit LB/acre\n",
|
|
|
|
" \n",
|
|
|
|
"Potatoes, flesh and skin, raw\n",
|
|
|
|
"https://fdc.nal.usda.gov/fdc-app.html#/food-details/170026/nutrients\n",
|
|
|
|
"77kcal/100g\n",
|
|
|
|
"FDC ID: 170026 \n",
|
|
|
|
"USDA Unit CWT/acre\n",
|
|
|
|
"1 CWT = 100lbs\n",
|
|
|
|
" \n",
|
|
|
|
"Wheat, hard red winter\n",
|
|
|
|
"FDC ID: 168890\n",
|
|
|
|
"327kcal/100g\n",
|
|
|
|
"https://fdc.nal.usda.gov/fdc-app.html#/food-details/168890/nutrients\n",
|
|
|
|
"USDA Unit BU/acre\n",
|
|
|
|
"60lb / BU https://www.plainsgrains.org/wp-content/uploads/2018/10/2017-HRWW-Report__HiRes-FINAL.pdf\n",
|
|
|
|
"\n",
|
|
|
|
"Corn grain, yellow\n",
|
|
|
|
"365kcal/100g\n",
|
|
|
|
"https://fdc.nal.usda.gov/fdc-app.html#/food-details/170288/nutrients\n",
|
|
|
|
"FDC ID: 170288 \n",
|
|
|
|
"USDA Unit BU/acre\n",
|
|
|
|
"Shelled, 56lbs/BU\n",
|
|
|
|
"\n",
|
|
|
|
"Soybeans, mature seeds, raw\n",
|
|
|
|
"446kcal/100g\n",
|
|
|
|
"https://fdc.nal.usda.gov/fdc-app.html#/food-details/174270/nutrients\n",
|
|
|
|
"FDC ID: 174270 \n",
|
|
|
|
"USDA Unit BU/acre\n",
|
|
|
|
"60LB/BU https://soybeanresearchinfo.com/research-highlight/exploring-the-impact-of-genetics-on-soybean-test-weight\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "72029669",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Corn"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 2,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "116f0267",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"array([[ nan, 2022. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 172.3, nan],\n",
|
|
|
|
" [ nan, 2021. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 176.7, nan],\n",
|
|
|
|
" [ nan, 2020. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 171.4, nan]])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 2,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 16:13:39 +02:00
|
|
|
"source": [
|
|
|
|
"csv=np.genfromtxt ('./data/corn.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 3,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "0db69a97",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"corn_year=csv[:,1]\n",
|
2023-01-12 20:25:12 +02:00
|
|
|
"corn_bu_per_acre=csv[:,-2]\n",
|
|
|
|
"\n",
|
|
|
|
"grams_per_lbs=453.592\n",
|
|
|
|
"corn_lbs_per_bu=(56.0/1.0)\n",
|
|
|
|
"corn_kcal_per_gram=(365/100)\n",
|
|
|
|
"corn_kcal_per_acre = corn_bu_per_acre*corn_lbs_per_bu*grams_per_lbs*corn_kcal_per_gram"
|
2023-01-12 16:13:39 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 4,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "eb375958",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"<matplotlib.legend.Legend at 0x1cfcd9fdc70>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 4,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_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/5xMJhPDhw/XeY3PPvtMABAXLlww+DMg28WRHXIoMpkM69evx7Vr17B27Vq8+uqrKCwsxMqVK9GkSROt1Se6qKaKRo8erb7mqFGjcOPGDY3RAdW1Bg0apPH8IUOG6L32iy++aPT1Dxw4gOLiYrz55ptGz7UFpfu0f/9+FBUVYcSIESgqKlJ/eXh4oHPnzurpMn26dOmC5s2b49NPP1UfW79+PWQyGV5//XW9zzt58iTu37+PkSNHaryuUqlEZGQkzpw5g5ycHJ3PjYuLQ15eHoYNG6ZxvEOHDggODtY49vTTT+PXX3/F+PHjyzV6qEv37t0RHh6ODz74ANnZ2XrPk/oeVZ3z119/Ydu2bZg0aRJq166NrVu3onPnzhrTO+7u7oiOjkZSUhJWrlyJl19+GXfv3sXChQvRuHFjrRGu0u7cuQOZTIbq1auXtftqzz//PG7evIno6GhMnz4dTZo0we7du9G3b19MmDDBpGuJUqMxQgj11FXPnj0BPJ7O7dKlC7799ludv0/VtLiuJGayDwx2yKa5uLgAgNaUhkpRURFcXV21jgcHB2PcuHHYuHEjLl++jK+//hp5eXnqXBV9srOzsWvXLjz99NOoUaMGHjx4gAcPHuCFF16ATCbTyJlJT0+Hi4sL/Pz8NK4REBCg9/pSVg7dvXsXAFCrVi2j59qC0n36+++/AQBt27aFq6urxtfXX3+tt4xASZMmTcKhQ4dw8eJFFBYW4rPPPsPAgQOhUCj0Pkf1ugMHDtR63SVLlkAIoXdFkSpPRNf1Sx+bNWsWPv74Y5w6dQrPPfcc/P390b17d5w9e9Zov6RYsmQJ7t2
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 20:25:12 +02:00
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"corn\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Corn, bu/acre\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
2023-01-12 16:13:39 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 5,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "9c6ffb7f",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"<matplotlib.legend.Legend at 0x1cfce31ca00>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 5,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHFCAYAAAAOmtghAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABwb0lEQVR4nO3deVxU1fsH8M+wbzIKiAMuYJom4m6ZW+5bapmZpuZeuZv6a7PFpSxSy6zMpXL5lrkXiuWXUnFJxV1Kw3LDUBwiQQFR1jm/P2jmyzDbnWGGWfi8Xy965Z1775yDOPfhnOc8RyaEECAiIiJyEW72bgARERGRNTG4ISIiIpfC4IaIiIhcCoMbIiIicikMboiIiMilMLghIiIil8LghoiIiFwKgxsiIiJyKQxuiIiIyKUwuCGHMX/+fMhkMty6dUvv69HR0ejatavWsevXr2PKlClo1KgRfH19ERQUhGbNmuGFF17A9evXJb93XFwcZDIZg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rX375ZSiVSq2vqKgoPPPMM1ZuadXg4eEBADpTFGrFxcXw9PTUOR4REYHJkydjzZo1uHTpErZs2YL8/HxNrokhubm52LZtGx555BHUrFkTd+7cwZ07d/DUU09BJpNp5bxkZmbCw8MDQUFBWveoVauWwftLWdnzzz//AADq1Klj8lxHUL5Pf//9NwDg4Ycfhqenp9bXli1bDC7rL2vGjBnYt28f/vzzTxQVFeHLL7/EkCFDoFAoDF6jft8
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 16:13:39 +02:00
|
|
|
"source": [
|
2023-01-12 20:25:12 +02:00
|
|
|
"plt.plot(corn_year,corn_kcal_per_acre,\"o\",label=\"corn\")\n",
|
2023-01-12 16:13:39 +02:00
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
2023-01-12 20:25:12 +02:00
|
|
|
"plt.ylabel(\"kcal/acre\")\n",
|
2023-01-12 16:13:39 +02:00
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "fa891f0e",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Wheat"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 6,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "263ea341",
|
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"array([[ nan, 2022. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 46.5, nan],\n",
|
|
|
|
" [ nan, 2021. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 44.3, nan],\n",
|
|
|
|
" [ nan, 2020. , nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, nan, 0. , nan, nan,\n",
|
|
|
|
" nan, nan, 49.7, nan]])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 6,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 20:25:12 +02:00
|
|
|
"source": [
|
|
|
|
"csv=np.genfromtxt ('./data/wheat.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 7,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "5aa38243",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"wheat_year=csv[:,1]\n",
|
|
|
|
"wheat_bu_per_acre=csv[:,-2]\n",
|
|
|
|
"\n",
|
|
|
|
"wheat_lbs_per_bu=60\n",
|
|
|
|
"#grams_per_lbs\n",
|
|
|
|
"wheat_kcal_per_gram=327.0/100.0\n",
|
|
|
|
"\n",
|
|
|
|
"wheat_kcal_per_acre=wheat_bu_per_acre*wheat_lbs_per_bu*grams_per_lbs*wheat_kcal_per_gram"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 9,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "5dd77124",
|
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjoAAAHFCAYAAAD7ZFORAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAACcxklEQVR4nO3deVwU9f8H8Ndyg1wCIuABeIuoeOUtah54X5l5a2Z9zSO10kzNo8wjS82rNI9S86o0LH+Y9wmKBx5hHohiCh6goCiH7Pz+oFlmd2d2Z3ZnT97Px4NHMjsz+5ll23nv5/P+vD8KhmEYEEIIIYTYIQdLN4AQQgghxFQo0CGEEEKI3aJAhxBCCCF2iwIdQgghhNgtCnQIIYQQYrco0CGEEEKI3aJAhxBCCCF2iwIdQgghhNgtCnQIIYQQYrco0CFWafbs2VAoFHj8+DHv45GRkWjbtq3atrt37+L9999HjRo14O7uDj8/P9StWxejR4/G3bt3RT93bGwsFAoF/P39kZ+fb8xl6MReo6ncvn0bCoUCGzduVG07deoUZs+ejadPn5rseU1t48aNUCgUuH37tkmPbdu2rdZ7TE5t27aFQqFATEyM1mPs327x4sW8x4p5j+bm5mLhwoWoX78+vL294eXlhapVq+LNN9/E0aNH1fa9evUqhg4diipVqsDNzQ0BAQFo2LAhxo0bh5ycHFHXM3fuXERERECpVIq6hsWLF2v9LQoLC/H999+jSZMm8PPzg4eHB0JDQ9GrVy/s2rVL6/Vhf5ydneHv748mTZpg0qRJ+Pvvv3W2dfLkyVAoFOjevTvv49evX4eLiwvOnz8v6tqJdaNAh9iFf//9Fw0bNsT+/fsxefJk7N27F+vXr8fAgQORmJiIW7duiT7XunXrAABZWVnYvXu3iVoMvPPOO4iP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kwHAAGCCg4OZYcOGMceOHVPbLy8vj+ndu7dqP0dHR6ZBgwbM9OnTmYcPH+q9joULFzIAmIyMDLXtUoeuGKb4/62AgABVW/z9/Zn+/fszsbGxks7NMAwzYMAABgDz4MED1ba5c+cyAJi4uDiGYYr/n1MoFMzQoUN5z7F27VoGAHP16lWdrwGxbtSjQ+yCQqHAd999h1u3bmHVqlUYOXIkCgsLsWTJEtSpU0drlgkfdnjo7bffVp1zxIgRuHPnjlqvAHuuN998U+34gQMHCp67X79+ep9///79KCoqwtixY/Xuaw00r2nfvn149eoVhg0bhlevXql+3NzcEB0drRoiE9K2bVvUr18fK1euVG377rvvoFAo8O677woed+rUKWRlZWH48OFqz6tUKhETE4PExETk5ubyHhsfH4+8vDwMHjxYbXuLFi0QGhqqtu21117DxYsX8f777xvVa8jn9ddfR6dOnTB37lw8e/ZMcD+x71F2n3///Rc///wzJkyYgEqVKmHz5s2Ijo5WG9JxdXXFrl27kJycjCVLluCtt97Co0ePMG/ePNSuXVurZ0vT/fv3oVAoEBAQYOjlq3Tt2hVpaWnYtWsXPvroI9SpUwe7d+9Gz549MW7cOEnnYjR6YRiGUQ1XdezYEUDxEG7btm3x66+/8v492aFwvoRlYjso0CFWycnJCQC0hjFYr169grOzs9b20NBQjBkzBuvWrcONGzewfft25OXlqXJThDx79gw7d+7Ea6+9hnLlyuHp06d4+vQp+vTpA4VCoZYjk5mZCScnJ/j5+amdo3z58oLnFzND6NGjRwCAihUr6t3XGmhe04MHDwAATZo0gbOzs9rP9u3bBUsFcE2YMAEHDx7EtWvXUFhYiLVr1+KNN95AUFCQ4DHs877xxhtaz7tw4UIwDCM4c4jNC+E7v+a2adOmYfHixUhISECXLl3g7++P119/HWfPntV
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 20:25:12 +02:00
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"Corn (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_bu_per_acre,\"x\",label=\"Wheat (BU/ACRE)\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.yscale(\"log\")\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "89c8f489",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Potatoes"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 12,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "c31828d0",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"array([[ nan, 2022., nan, nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, 0., nan, nan, nan, nan,\n",
|
|
|
|
" 438., nan],\n",
|
|
|
|
" [ nan, 2021., nan, nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, 0., nan, nan, nan, nan,\n",
|
|
|
|
" 444., nan],\n",
|
|
|
|
" [ nan, 2020., nan, nan, nan, nan, nan, nan, nan,\n",
|
|
|
|
" nan, nan, nan, nan, 0., nan, nan, nan, nan,\n",
|
|
|
|
" 461., nan]])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"execution_count": 12,
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 16:13:39 +02:00
|
|
|
"source": [
|
|
|
|
"csv=np.genfromtxt ('./data/potatoes.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 13,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "86091fed",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"potatoes_year=csv[:,1]\n",
|
2023-01-12 20:25:12 +02:00
|
|
|
"potatoes_cwt_per_acre=csv[:,-2]\n",
|
|
|
|
"\n",
|
|
|
|
"lbs_per_cwt=100\n",
|
|
|
|
"#grams_per_lbs\n",
|
|
|
|
"potatoes_kcal_per_gram=77.0/100.0\n",
|
|
|
|
"potatoes_kcal_per_acre=potatoes_cwt_per_acre*lbs_per_cwt*grams_per_lbs*potatoes_kcal_per_gram"
|
2023-01-12 16:13:39 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 21:45:54 +02:00
|
|
|
"execution_count": 14,
|
2023-01-12 20:25:12 +02:00
|
|
|
"id": "5ea8b2ac",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 21:45:54 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjoAAAHFCAYAAAD7ZFORAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9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ytQ/Tk5OiIiIUIfIhOjVqxdat26NNWvWqJd98803UCgUmD59uuB+J06cQG5uLqZMmaJxXqVSiUGDBuH06dMoKiri3TcxMRElJSWYOHGixvKuXbsiODhYY1nHjh1x4cIFvPbaa5XyGvLRt29fDBgwAB9//DEePnwouJ3Yzyi7zd27d7Ft2za8+eabCAoKwpYtWxAREaER0nF0dMSuXbuQkpKCVatW4fnnn0dWVhYWL16M5s2b63i2tLl//z4UCgV8fX2NvXw1gwcPxu3bt7Fr1y68++67aNGiBX777TcMHz4cr7/+uqRjMVpeGIZh1OGq/v37A1CFcHv16oVffvmF9/1kQ+F8CctE1YGEDmGV2NnZAYBOGIOlrKwM9vb2OsuDg4MxY8YMxMTE4Nq1a4iNjUVJSYk6N0WIhw8fYseOHejYsSP8/PyQn5+P/Px8jBo1CgqFQiNHJicnB3Z2dvD29tY4xjPPPCN4fDEVQllZWQCAunXrGtzWGtC+pn///RcA0KFDB9jb22v8xMbGCrYK4PLmm2/i4MGDuHLlCp4+fYoNGzZgzJgxCAgIENyHPe+YMWN0zrts2TIwDCNYOcTmhfAdX3tZVFQUPvvsM5w8eRLPPvssfHx80LdvX5w5c8bgdYlh2bJ
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 640x480 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2023-01-12 20:25:12 +02:00
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"Corn (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_bu_per_acre,\"x\",label=\"Wheat (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(potatoes_year,potatoes_cwt_per_acre,\"+\",label=\"Potatoes (CWT / ACRE)\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.yscale(\"log\")\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "0201b588",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Soybeans"
|
|
|
|
]
|
2023-01-12 16:13:39 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-01-12 20:25:12 +02:00
|
|
|
"execution_count": null,
|
|
|
|
"id": "ce223c5b",
|
2023-01-12 16:13:39 +02:00
|
|
|
"metadata": {},
|
2023-01-12 20:25:12 +02:00
|
|
|
"outputs": [],
|
2023-01-12 16:13:39 +02:00
|
|
|
"source": [
|
2023-01-12 20:25:12 +02:00
|
|
|
"csv=np.genfromtxt ('./data/soybeans.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "12fe395c",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"soybeans_year=csv[:,1]\n",
|
|
|
|
"soybeans_bu_per_acre=csv[:,-2]"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "ae3f6ad4",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"Corn (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_bu_per_acre,\"x\",label=\"Wheat (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(potatoes_year,potatoes_cwt_per_acre,\"+\",label=\"Potatoes (CWT / ACRE)\")\n",
|
|
|
|
"plt.plot(soybeans_year,soybeans_bu_per_acre,\"*\",label=\"Soybeans (BU/ACRE)\")\n",
|
2023-01-12 16:13:39 +02:00
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
2023-01-12 20:25:12 +02:00
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
2023-01-12 16:13:39 +02:00
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
2023-01-12 20:25:12 +02:00
|
|
|
"plt.yscale(\"log\")\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "c68984fa",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Sugarbeets"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "6e74b0b8",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"csv=np.genfromtxt ('./data/sugarbeets.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "ab73b355",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"sugarbeets_year=csv[:,1]\n",
|
|
|
|
"sugarbeets_tons_per_acre=csv[:,-2]"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "cbaa454a",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"Corn (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_bu_per_acre,\"x\",label=\"Wheat (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(potatoes_year,potatoes_cwt_per_acre,\"+\",label=\"Potatoes (CWT / ACRE)\")\n",
|
|
|
|
"plt.plot(soybeans_year,soybeans_bu_per_acre,\"*\",label=\"Soybeans (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(sugarbeets_year,sugarbeets_tons_per_acre,\".\",label=\"Sugarbeets (TONS/ACRE)\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.yscale(\"log\")\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "884a7b05",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Sunflowers"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "846722a4",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"csv=np.genfromtxt ('./data/sunflowers.csv',\n",
|
|
|
|
" skip_header=1,\n",
|
|
|
|
" delimiter=\",\")\n",
|
|
|
|
"csv[0:3]\n",
|
|
|
|
"#csv[0:3].astype(float)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "c79d0d11",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"sunflowers_year=csv[:,1]\n",
|
|
|
|
"sunflowers_lbs_per_acre=csv[:,-2]"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"id": "569111b9",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_bu_per_acre,\"o\",label=\"Corn (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_bu_per_acre,\"x\",label=\"Wheat (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(potatoes_year,potatoes_cwt_per_acre,\"+\",label=\"Potatoes (CWT / ACRE)\")\n",
|
|
|
|
"plt.plot(soybeans_year,soybeans_bu_per_acre,\"*\",label=\"Soybeans (BU/ACRE)\")\n",
|
|
|
|
"plt.plot(sugarbeets_year,sugarbeets_tons_per_acre,\".\",label=\"Sugarbeets (TONS/ACRE)\")\n",
|
|
|
|
"plt.plot(sunflowers_year,sunflowers_lbs_per_acre,\"d\",label=\"Sunflowers (LB/ACRE)\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.yscale(\"log\")\n",
|
2023-01-12 16:13:39 +02:00
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
2023-01-12 20:25:12 +02:00
|
|
|
},
|
2023-01-12 21:45:54 +02:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "e2b51946",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### All together, kcal/acre"
|
|
|
|
]
|
|
|
|
},
|
2023-01-12 20:25:12 +02:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
2023-01-12 21:45:54 +02:00
|
|
|
"id": "f04309c4",
|
2023-01-12 20:25:12 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2023-01-12 21:45:54 +02:00
|
|
|
"source": [
|
|
|
|
"plt.plot(corn_year,corn_kcal_per_acre,\"o\",label=\"Corn\")\n",
|
|
|
|
"plt.plot(wheat_year,wheat_kcal_per_acre,\"x\",label=\"Wheat\")\n",
|
|
|
|
"plt.plot(potatoes_year,potatoes_kcal_per_acre,\"+\",label=\"Potatoes\")\n",
|
|
|
|
"plt.plot(soybeans_year,soybeans_kcal_per_acre,\"*\",label=\"Soybeans\")\n",
|
|
|
|
"#plt.plot(sugarbeets_year,sugarbeets_kcal_per_acre,\".\",label=\"Sugarbeets\")\n",
|
|
|
|
"plt.plot(sunflowers_year,sunflowers_kcal_per_acre,\"d\",label=\"Sunflowers\")\n",
|
|
|
|
"plt.xlabel(\"time (calendar year)\")\n",
|
|
|
|
"plt.ylabel(\"Average per acre production\")\n",
|
|
|
|
"plt.title(\"US Agriculture yields, NASS (USDA)\")\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.yscale(\"log\")\n",
|
|
|
|
"#plt.show()\n",
|
|
|
|
"#plt.savefig(\"bear-quadratic.pdf\")"
|
|
|
|
]
|
2023-01-12 16:13:39 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "Python 3 (ipykernel)",
|
|
|
|
"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.9.13"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 5
|
|
|
|
}
|