diff --git a/src/compare_covermaps.py b/src/compare_covermaps.py index 4747b057..83c8d8d6 100644 --- a/src/compare_covermaps.py +++ b/src/compare_covermaps.py @@ -42,7 +42,7 @@ "BureJimma2019": "ETH", "BureJimma2020": "ETH", "Tigray2021": "ETH", - "Tigray2020": "ETH" + "Tigray2020": "ETH", } DATASET_PATH = Path(DATA_PATH).glob("*") NE_GDF = gpd.read_file( @@ -67,7 +67,7 @@ "BureJimma2019": DATA_PATH + "Ethiopia_Bure_Jimma_2019.csv", "BureJimma2020": DATA_PATH + "Ethiopia_Bure_Jimma_2020.csv", "Tigray2021": DATA_PATH + "Ethiopia_Tigray_2021.csv", - "Tigray2020": DATA_PATH + "Ethiopia_Tigray_2020.csv" + "Tigray2020": DATA_PATH + "Ethiopia_Tigray_2020.csv", } REDUCER = ee.Reducer.mode() @@ -453,13 +453,13 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame "worldcover-v100", ee.ImageCollection("ESA/WorldCover/v100"), resolution=10, - crop_labels=[40] + crop_labels=[40], ), "worldcover-v200": Covermap( "worldcover-v200", ee.ImageCollection("ESA/WorldCover/v200"), resolution=10, - crop_labels=[40] + crop_labels=[40], ), "glad": Covermap( "glad", @@ -478,7 +478,7 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ee.ImageCollection(ee.Image("users/sbaber/asap_mask_crop_v03")), resolution=1000, crop_labels=list(range(10, 190)), - countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"] + countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"], ), "dynamicworld": Covermap( "dynamicworld", @@ -508,7 +508,7 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ee.ImageCollection("projects/sat-io/open-datasets/DEAF/CROPLAND-EXTENT/filtered"), resolution=10, crop_labels=[1], - countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"] + countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"], ), "esa-cci-africa": Covermap( "esa-cci-africa", @@ -517,7 +517,7 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ), resolution=20, crop_labels=[4], - countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"] + countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"], ), "globcover-v23": Covermap( "globcover-v23", @@ -550,7 +550,7 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ), resolution=30, crop_labels=[2], - countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"] + countries=[country for country in TEST_COUNTRIES.keys() if country != "Hawaii"], ), "harvest-crop-maps": Covermap( "harvest-crop-maps", @@ -566,7 +566,9 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ee.Image("users/abaansah/Namibia_North_2020_V3"), ee.Image("users/adadebay/Zambia_cropland_2019"), ee.Image("users/izvonkov/Hawaii_skip_era5_v4"), - ee.Image("users/adadebay/Uganda_2019_skip_ERA5_min_lat--1-63_min_lon-29-3_max_lat-4-3_max_lon-35-17_dates-2019-02-01_2020-02-"), + ee.Image( + "users/adadebay/Uganda_2019_skip_ERA5_min_lat--1-63_min_lon-29-3_max_lat-4-3_max_lon-35-17_dates-2019-02-01_2020-02-" + ), ee.Image("users/abaansah/Sudan_Al_Gadaref_2020_Feb"), ee.Image("users/abaansah/Sudan_Al_Gadaref_2019_Feb"), ee.Image("users/izvonkov/Sudan_Blue_Nile_2020"), @@ -575,13 +577,24 @@ def generate_report(dataset_name: str, country: str, true, pred) -> pd.DataFrame ee.Image("users/byeh1/ethiopia_tigray_2021_v1"), ee.Image("users/adadebay/Tanzania_cropland_2019"), ee.Image("users/eutzschn/Ethiopia_Bure_Jimma_2020_v1"), - ee.Image("users/izvonkov/Ethiopia_Bure_Jimma_2019_v1") + ee.Image("users/izvonkov/Ethiopia_Bure_Jimma_2019_v1"), ] ), resolution=10, probability=0.5, - countries=['Tanzania', 'Namibia', 'Uganda', 'Zambia', 'Hawaii', - 'BlueNile2020', 'BlueNile2019', 'AlGadaref2019', 'BureJimma2019', - 'BureJimma2020', 'Tigray2021', 'Tigray2020'] - ) + countries=[ + "Tanzania", + "Namibia", + "Uganda", + "Zambia", + "Hawaii", + "BlueNile2020", + "BlueNile2019", + "AlGadaref2019", + "BureJimma2019", + "BureJimma2020", + "Tigray2021", + "Tigray2020", + ], + ), }