Skip to content

Commit

Permalink
Cleanup notebook and example data
Browse files Browse the repository at this point in the history
  • Loading branch information
sdunesme committed May 6, 2024
1 parent c7209b1 commit a5174c4
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 124 deletions.
43 changes: 0 additions & 43 deletions example_data/Yamuna_segm_2km_UTF8.qmd

This file was deleted.

3 changes: 0 additions & 3 deletions example_data/jrc_indicators.csv

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions example_data/metrics.csv

This file was deleted.

52 changes: 0 additions & 52 deletions example_data/properties.csv

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions glourbee/assets_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pandas as pd
import geopandas as gpd

from typing import Union
from urllib.request import urlretrieve
from time import sleep
from datetime import datetime
Expand Down Expand Up @@ -261,16 +262,15 @@ class MetricsDataset(GlourbEEDataset):
def __init__(self,
ee_project_name: str = 'ee-glourb',
asset_uuid: str = None,
parent_zones = None):

assert isinstance(parent_zones, (ExtractionZones, str)), 'Parent zones should be provided as glourbee ExtractionZones or uuid.'
parent_zones: Union[str, ExtractionZones] = None):

if isinstance(parent_zones, str):
self.gee_dir = f'projects/{ee_project_name}/assets/extraction_zones/{parent_zones}/{asset_uuid}'
self.parent_zones = ExtractionZones(asset_uuid=parent_zones)
super().__init__(ee_project_name, asset_uuid)
else:
self.gee_dir = f'projects/{self.ee_project_name}/assets/extraction_zones/{parent_zones.asset_uuid}/{asset_uuid}'
self.parent_zones = parent_zones
self.gee_dir = f'projects/{ee_project_name}/assets/extraction_zones/{parent_zones.asset_uuid}/{asset_uuid}'
super().__init__(ee_project_name, asset_uuid)

self.len = self.parent_zones.len
Expand Down Expand Up @@ -399,4 +399,4 @@ def uploadDGOs(dgo_shapefile_path, simplify_tolerance=15, ee_project_name='ee-gl
raise DeprecationWarning('This function is deprecated. Use ExtractionZones.upload_to_gee() method instead.')

def downloadMetrics(metrics, output_file, ee_project_name='ee-glourb'):
raise DeprecationWarning('This function is deprecated. Use MetricsDataset.download() method instead.')
raise DeprecationWarning('This function is deprecated. Use MetricsDataset.download() method instead.')
Loading

0 comments on commit a5174c4

Please sign in to comment.