From 31b4293f2e0ef53e9ebc38f3a2d54131fc064078 Mon Sep 17 00:00:00 2001 From: "Bernat, Anastasia" Date: Sat, 11 Jan 2025 16:19:46 -0800 Subject: [PATCH] Deployment test 11. --- dash_app/definitions.py | 8 ++++---- dash_app/src/deckgl.py | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dash_app/definitions.py b/dash_app/definitions.py index 1d5f4f6..afa700b 100644 --- a/dash_app/definitions.py +++ b/dash_app/definitions.py @@ -14,7 +14,7 @@ if CONNECT_TO_LAMBDA: - print("DEPLOYMENT 10") + print("DEPLOYMENT 11") # https://gridcerf.dev.msdlive.org/ @@ -30,9 +30,9 @@ METADATA_DIR = os.path.join(LAMBDA_TASK_ROOT, "dash_app", "metadata") else: - DATA_DIR = "../../data/msdlive-gridcerf" - METADATA_DIR = "./metadata" - LAMBDA_TASK_ROOT = None + DATA_DIR = "../../data/msdlive-gridcerf" + METADATA_DIR = "./metadata" + LAMBDA_TASK_ROOT = None COMPILED_DIR = os.path.join(DATA_DIR, "gridcerf/compiled/compiled_technology_layers") diff --git a/dash_app/src/deckgl.py b/dash_app/src/deckgl.py index c9fcec0..d505eb4 100644 --- a/dash_app/src/deckgl.py +++ b/dash_app/src/deckgl.py @@ -37,7 +37,10 @@ from layout import cache, list_of_dicts from definitions import OUTDIR, DATA_DIR #, MAPBOX_TOKEN +# DATA PATHS STATES = "https://raw.githubusercontent.com/PublicaMundi/MappingAPI/refs/heads/master/data/geojson/us-states.json" +OCEAN_PATH = os.path.join(LAMBDA_TASK_ROOT, "data/ne_50m_ocean.geojson") +LAND = "https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_scale_rank.geojson" def read_layer(is_compiled, COMPILED_DIR, fpaths): @@ -111,7 +114,7 @@ def load_large_data(layer_name, COMPILED_DIR, fpaths, adjust_mode, is_compiled, if layer_name == "base-map-ocean": - OCEANS = json.load(open('data/ne_50m_ocean.geojson', 'r', encoding='utf-8')) + OCEANS = json.load(open(OCEAN_PATH, 'r', encoding='utf-8')) # #D4DADC and RBG is 212, 218, 220 @@ -137,8 +140,6 @@ def load_large_data(layer_name, COMPILED_DIR, fpaths, adjust_mode, is_compiled, if layer_name == "base-map": - LAND = "https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_scale_rank.geojson" - if adjust_mode: # When the switch is "True" # fill_color = [250, 250, 248] # near white return pydeck.Layer(