Skip to content

Commit

Permalink
fix-comparison-for-west
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzvonkov committed Feb 15, 2024
1 parent 01dbd9a commit b87ce11
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions maps/Sudan/Darfur_2022_2023_label_distribution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"\n",
"Author: Ivan Zvonkov\n",
"\n",
"Last modified: Feb 14, 2024\n",
"Last modified: Feb 15, 2024\n",
"\n",
"Description: Takes processed csv files from data/datasets and converts to simple csv to be uploaded as a GEE table asset.\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 1,
"id": "1b75e837",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -46,19 +46,19 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "ce46dc6f",
"metadata": {},
"outputs": [],
"source": [
"# Load reference samples\n",
"df_2022 = pd.read_csv(\"SudanGedarefDarfurAlJazirah2022_gee.csv\")\n",
"df_2023 = pd.read_csv(\"SudanGedarefDarfurAlJazirah2023_gee.csv\")"
"df_2022 = pd.read_csv(\"GedarefDarfurAlJazirah2022_gee.csv\")\n",
"df_2023 = pd.read_csv(\"GedarefDarfurAlJazirah2023_gee.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 5,
"id": "6245cd3d",
"metadata": {},
"outputs": [],
Expand All @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 6,
"id": "d956b49c",
"metadata": {},
"outputs": [],
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 7,
"id": "9365660c",
"metadata": {},
"outputs": [],
Expand All @@ -106,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 8,
"id": "e9a41d0f",
"metadata": {},
"outputs": [],
Expand All @@ -119,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 71,
"execution_count": 9,
"id": "afdf437a",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -214,7 +214,7 @@
"5 South 2023 7.844596 337 20 0.059347"
]
},
"execution_count": 71,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -250,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": 66,
"execution_count": 10,
"id": "a544bd3f",
"metadata": {},
"outputs": [
Expand All @@ -267,19 +267,19 @@
"Name: geometry, dtype: object"
]
},
"execution_count": 66,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Verify West Darfur points are not identical \n",
"df_2023_West_Darfur[df_2022_West_Darfur[\"label\"] == 1][\"geometry\"].apply(str).sort_values()"
"df_2022_West_Darfur[df_2022_West_Darfur[\"label\"] == 1][\"geometry\"].apply(str).sort_values()"
]
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": 11,
"id": "54021bf1",
"metadata": {},
"outputs": [
Expand All @@ -296,7 +296,7 @@
"Name: geometry, dtype: object"
]
},
"execution_count": 65,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -307,7 +307,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": 12,
"id": "0ced06f5",
"metadata": {},
"outputs": [],
Expand All @@ -327,7 +327,7 @@
},
{
"cell_type": "code",
"execution_count": 73,
"execution_count": 13,
"id": "af443c59",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -444,7 +444,7 @@
"5 0.059347 0.465555 4.655547e+06 "
]
},
"execution_count": 73,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -454,6 +454,14 @@
"results[\"Crop Area Estimate (ha)\"] = results[\"Area (Mha)\"] * results[\"Crop Proportion\"] * 10e6\n",
"results"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2818f9b0",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit b87ce11

Please sign in to comment.