MarcSkovMadsen
commited on
Commit
•
48253d2
1
Parent(s):
8c38616
Upload 5 files
Browse files- index.html +0 -0
- index.js +5 -4
- index.py +5 -4
index.html
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
index.js
CHANGED
@@ -483,7 +483,7 @@ def get_flow_map(nodes, edges, region_admin_bounds, region_code, comm_purpose):
|
|
483 |
@pn.cache
|
484 |
def get_edges_df():
|
485 |
return pd.read_json(
|
486 |
-
"https://
|
487 |
orient="split",
|
488 |
dtype=EDGES_DTYPES,
|
489 |
)
|
@@ -493,7 +493,7 @@ edges_df = get_edges_df()
|
|
493 |
@pn.cache
|
494 |
def get_nodes_df():
|
495 |
return pd.read_json(
|
496 |
-
"https://
|
497 |
orient="split",
|
498 |
dtype=NODES_DTYPES,
|
499 |
)
|
@@ -501,9 +501,10 @@ def get_nodes_df():
|
|
501 |
nodes_df = get_nodes_df()
|
502 |
|
503 |
# Load the italian regions as a Dataframe
|
|
|
504 |
def get_region_admin_bounds_df():
|
505 |
return pd.read_json(
|
506 |
-
"https://
|
507 |
orient="split",
|
508 |
dtype=ITA_REGIONS_DTYPES,
|
509 |
)
|
@@ -580,7 +581,7 @@ layout = pn.Row(
|
|
580 |
|
581 |
pn.template.FastListTemplate(
|
582 |
site="",
|
583 |
-
logo="https://
|
584 |
title=DASH_TITLE,
|
585 |
theme="default",
|
586 |
theme_toggle=False,
|
|
|
483 |
@pn.cache
|
484 |
def get_edges_df():
|
485 |
return pd.read_json(
|
486 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/edges.json",
|
487 |
orient="split",
|
488 |
dtype=EDGES_DTYPES,
|
489 |
)
|
|
|
493 |
@pn.cache
|
494 |
def get_nodes_df():
|
495 |
return pd.read_json(
|
496 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/nodes.json",
|
497 |
orient="split",
|
498 |
dtype=NODES_DTYPES,
|
499 |
)
|
|
|
501 |
nodes_df = get_nodes_df()
|
502 |
|
503 |
# Load the italian regions as a Dataframe
|
504 |
+
@pn.cache
|
505 |
def get_region_admin_bounds_df():
|
506 |
return pd.read_json(
|
507 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/italian_regions.json",
|
508 |
orient="split",
|
509 |
dtype=ITA_REGIONS_DTYPES,
|
510 |
)
|
|
|
581 |
|
582 |
pn.template.FastListTemplate(
|
583 |
site="",
|
584 |
+
logo="https://cdn.awesome-panel.org/resources/commuting_flows_italy/home_work.svg",
|
585 |
title=DASH_TITLE,
|
586 |
theme="default",
|
587 |
theme_toggle=False,
|
index.py
CHANGED
@@ -434,7 +434,7 @@ def get_flow_map(nodes, edges, region_admin_bounds, region_code, comm_purpose):
|
|
434 |
@pn.cache
|
435 |
def get_edges_df():
|
436 |
return pd.read_json(
|
437 |
-
"https://
|
438 |
orient="split",
|
439 |
dtype=EDGES_DTYPES,
|
440 |
)
|
@@ -444,7 +444,7 @@ edges_df = get_edges_df()
|
|
444 |
@pn.cache
|
445 |
def get_nodes_df():
|
446 |
return pd.read_json(
|
447 |
-
"https://
|
448 |
orient="split",
|
449 |
dtype=NODES_DTYPES,
|
450 |
)
|
@@ -452,9 +452,10 @@ def get_nodes_df():
|
|
452 |
nodes_df = get_nodes_df()
|
453 |
|
454 |
# Load the italian regions as a Dataframe
|
|
|
455 |
def get_region_admin_bounds_df():
|
456 |
return pd.read_json(
|
457 |
-
"https://
|
458 |
orient="split",
|
459 |
dtype=ITA_REGIONS_DTYPES,
|
460 |
)
|
@@ -531,7 +532,7 @@ layout = pn.Row(
|
|
531 |
|
532 |
pn.template.FastListTemplate(
|
533 |
site="",
|
534 |
-
logo="https://
|
535 |
title=DASH_TITLE,
|
536 |
theme="default",
|
537 |
theme_toggle=False,
|
|
|
434 |
@pn.cache
|
435 |
def get_edges_df():
|
436 |
return pd.read_json(
|
437 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/edges.json",
|
438 |
orient="split",
|
439 |
dtype=EDGES_DTYPES,
|
440 |
)
|
|
|
444 |
@pn.cache
|
445 |
def get_nodes_df():
|
446 |
return pd.read_json(
|
447 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/nodes.json",
|
448 |
orient="split",
|
449 |
dtype=NODES_DTYPES,
|
450 |
)
|
|
|
452 |
nodes_df = get_nodes_df()
|
453 |
|
454 |
# Load the italian regions as a Dataframe
|
455 |
+
@pn.cache
|
456 |
def get_region_admin_bounds_df():
|
457 |
return pd.read_json(
|
458 |
+
"https://cdn.awesome-panel.org/resources/commuting_flows_italy/italian_regions.json",
|
459 |
orient="split",
|
460 |
dtype=ITA_REGIONS_DTYPES,
|
461 |
)
|
|
|
532 |
|
533 |
pn.template.FastListTemplate(
|
534 |
site="",
|
535 |
+
logo="https://cdn.awesome-panel.org/resources/commuting_flows_italy/home_work.svg",
|
536 |
title=DASH_TITLE,
|
537 |
theme="default",
|
538 |
theme_toggle=False,
|