Skip to content

Commit addf48f

Browse files
committed
use detailed input data for rehab times/centres
TODO: apply them to the popups in rehab map depending on selected base layer
1 parent c635950 commit addf48f

File tree

4 files changed

+894
-432
lines changed

4 files changed

+894
-432
lines changed

3_load_data.R

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,53 @@
1-
df_locations <- read.csv("input/QLD_locations_with_RSQ_times_20220407.csv") %>%
1+
df_locations <- read.csv("input/QLD_locations_with_RSQ_times_20220411.csv") %>%
22
mutate(
33
popup=paste0(
44
"<b>Location: </b>", location, "<br>",
55
"<b>Acute care destination: </b>", acute_care_centre, "<br>",
66
"<b>Time to acute care (minutes): </b>", acute_time, "<br>",
7-
"<b>Rehab care destination: </b>", rehab_centre, "<br>",
8-
"<b>Time to rehab care (minutes): </b>", rehab_time, "<br>"
7+
"<b>Initial rehab care destination: </b>", gold_rehab_centre, "<br>",
8+
"<b>Step-down rehab care destination: </b>", silver_rehab_centre, "<br>",
9+
"<b>Average time to rehab care (minutes): </b>", round(rehab_time), "<br>"
910
),
1011
popup_rehab=paste0(
1112
"<b>Location: </b>", location, "<br>",
12-
"<b>Silver rehab care destination: </b>", rehab_centre, "<br>",
13-
"<b>Time to silver rehab care (minutes): </b>", rehab_time, "<br>"
13+
"<b>Initial rehab care destination: </b>", gold_rehab_centre, "<br>",
14+
"<b>Step-down rehab care destination: </b>", silver_rehab_centre, "<br>",
15+
"<b>Average time to rehab care (minutes): </b>", round(rehab_time), "<br>"
1416
)
1517
)
1618

1719

20+
df_rehab_map_locations <- read.csv("input/all_rehab_time.csv") %>%
21+
mutate(across(ends_with("time"), round)) %>%
22+
mutate(
23+
popup_none=paste0(
24+
"<b>Location: </b>", town_name, "<br>",
25+
"<b>Initial rehab care destination: </b>", gold_rehab_centre, "<br>",
26+
"<b>Step-down rehab care destination: </b>", silver_rehab_centre, "<br>",
27+
"<b>Average time to rehab care (minutes): </b>", round((silver_time + gold_time)/2), "<br>"
28+
),
29+
popup_silver=paste0(
30+
"<b>Location: </b>", town_name, "<br>",
31+
"<b>Silver rehab care destination: </b>", silver_rehab_centre, "<br>",
32+
"<b>Time to silver rehab care (minutes): </b>", silver_time, "<br>"
33+
),
34+
popup_gold=paste0(
35+
"<b>Location: </b>", town_name, "<br>",
36+
"<b>Gold rehab care destination: </b>", gold_rehab_centre, "<br>",
37+
"<b>Time to gold rehab care (minutes): </b>", gold_time, "<br>"
38+
),
39+
popup_future_gold=paste0(
40+
"<b>Location: </b>", town_name, "<br>",
41+
"<b>Future gold rehab care destination: </b>", future_gold_rehab_centre, "<br>",
42+
"<b>Time to future gold rehab care (minutes): </b>", future_gold_time, "<br>"
43+
),
44+
popup_platinum=paste0(
45+
"<b>Location: </b>", town_name, "<br>",
46+
"<b>Platinum rehab care destination: </b>", platinum_rehab_centre, "<br>",
47+
"<b>Time to platinum rehab care (minutes): </b>", platinum_time, "<br>"
48+
)
49+
)
50+
1851
df_centres <- read.csv("input/centres.csv")
1952
names(df_centres) <- c("centre_name", "address", "x", "y")
2053
df_centres <- df_centres %>%

0 commit comments

Comments
 (0)