Skip to content

Commit

Permalink
Deployment test 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiabernat committed Jan 12, 2025
1 parent 0a73f6c commit 31b4293
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dash_app/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

if CONNECT_TO_LAMBDA:

print("DEPLOYMENT 10")
print("DEPLOYMENT 11")

# https://gridcerf.dev.msdlive.org/

Expand All @@ -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")
Expand Down
7 changes: 4 additions & 3 deletions dash_app/src/deckgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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

Expand All @@ -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(
Expand Down

0 comments on commit 31b4293

Please sign in to comment.