Skip to content

Commit

Permalink
multi-roi notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Gedeon Muhawenayo authored and Gedeon Muhawenayo committed Sep 22, 2024
1 parent 2ab483f commit 93d86f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions notebooks/multi_roi_area_astimate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"metadata": {},
"outputs": [],
"source": [
"anual_estimates = run_area_estimates_config(config, show_output_charts=True)"
"annual_estimates = run_area_estimates_config(config, show_output_charts=True)"
]
},
{
Expand All @@ -133,7 +133,7 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"def plot_crop_area_with_confidence(anual_estimates):\n",
"def plot_crop_area_with_confidence(annual_estimates):\n",
" \"\"\"\n",
" This function takes in a dictionary with crop area data and plots a bar chart \n",
" with 95% confidence intervals for each region and year.\n",
Expand All @@ -142,11 +142,11 @@
" data (dict): A dictionary where keys are region names and values contain \n",
" crop area data, confidence intervals, and years.\n",
" \"\"\"\n",
" regions = list(anual_estimates.keys())\n",
" regions = list(annual_estimates.keys())\n",
" years = [2022, 2023]\n",
"\n",
" crop_areas = np.array([anual_estimates[region]['crop area'] for region in regions])\n",
" crop_ci = np.array([anual_estimates[region]['95%CI crop'] for region in regions])\n",
" crop_areas = np.array([annual_estimates[region]['crop area'] for region in regions])\n",
" crop_ci = np.array([annual_estimates[region]['95%CI crop'] for region in regions])\n",
"\n",
" fig, ax = plt.subplots(figsize=(10, 6))\n",
"\n",
Expand Down Expand Up @@ -177,7 +177,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_crop_area_with_confidence(anual_estimates)"
"plot_crop_area_with_confidence(annual_estimates)"
]
}
],
Expand Down

0 comments on commit 93d86f6

Please sign in to comment.