Skip to content

Commit 228a086

Browse files
committed
add functions from mapswipe-processing #247
1 parent d3beb0a commit 228a086

File tree

5 files changed

+509
-3
lines changed

5 files changed

+509
-3
lines changed

mapswipe_workers/mapswipe_workers/generate_stats/generate_stats.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ def generate_stats(project_id_list: list):
6262
projects_info_dynamic_filename, index_label="idx"
6363
)
6464

65-
# TODO: for build area projects generate tasking manager geometries
66-
6765
if len(project_id_list) > 0:
6866
# merge static info and dynamic info and save
6967
projects_filename = f"{DATA_PATH}/api-data/projects/projects.csv"

mapswipe_workers/mapswipe_workers/generate_stats/project_stats.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
from mapswipe_workers import auth
77
from mapswipe_workers.definitions import logger, DATA_PATH
88
from mapswipe_workers.utils import geojson_functions
9-
from mapswipe_workers.generate_stats import project_stats_by_date
9+
from mapswipe_workers.generate_stats import (
10+
project_stats_by_date,
11+
tasking_manager_geometries,
12+
)
1013

1114

1215
def add_metadata_to_csv(filename: str):
@@ -353,6 +356,10 @@ def get_per_project_statistics(project_id: str, project_info: pd.Series) -> dict
353356
f"saved project stats by date for {project_id}: {project_stats_by_date_filename}"
354357
)
355358

359+
# generate geometries for HOT Tasking Manager
360+
tasking_manager_geometries.generate_tasking_manager_geometries(project_id)
361+
362+
# prepare output of function
356363
project_stats_dict = {
357364
"project_id": project_id,
358365
"progress": project_stats_by_date_df["cum_progress"].iloc[-1],

0 commit comments

Comments
 (0)