-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdeployment.Rmd
221 lines (187 loc) · 6.64 KB
/
deployment.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
---
title: "Deployment Planning"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(reticulate)
library(leaflet)
library(emoji)
# use_condaenv("py39")
```
This page is used for Canadian Argo groups to coordinate deployment planning, in addition to [OceanOps](https://www.ocean-ops.org/board?t=argo). To submit plans to the website, see instructions on the [github page](https://github.com/ArgoCanada/blog/tree/master/deployment).
The map below shows completed and planned deployments for 2025, coloured by institution. Dots with a buoy symbol are locations of completed deployments (deployment location, not most recent profile location), while dots with the loading symbol are planned deployments.
```{python data}
import pandas as pd
df = pd.read_csv('deployment/canada_deployments.csv')
df['DEPLOYMENT DATE'] = df['DEPLOYMENT DATE'].apply(pd.Timestamp)
df = df.loc[df['DEPLOYMENT DATE'] > pd.Timestamp('01-01-2025')]
df = df.sort_values('DEPLOYMENT DATE')
df['DEPLOYMENT DATE'] = [d.strftime('%d %b, %Y') for d in df['DEPLOYMENT DATE']]
df['REF'] = [str(int(w)) if pd.notna(w) else '' for w in df.REF]
df['IMEI'] = [str(int(i)) if pd.notna(i) else '' for i in df.IMEI]
df['SERIAL NUMBER'] = [s if pd.notna(s) else '' for s in df['SERIAL NUMBER']]
df['DEPLOYMENT SHIP'] = [s if pd.notna(s) else '' for s in df['DEPLOYMENT SHIP']]
mapper = {
'PROGRAM':'Program',
'INSTITUTE':'Institute',
'STATUS':'Status',
'MODEL':'Model',
'MODEL_DETAIL':'Detail',
'DEPLOYMENT DATE':'Date',
'DEPLOYMENT LAT':'Latitude',
'DEPLOYMENT LON':'Longitude',
'DEPLOYMENT SHIP':'Ship',
'IMEI':'IMEI',
'REF':'WMO',
'SERIAL NUMBER':'Serial No.',
}
df = df.rename(columns=mapper)
df = df[mapper.values()]
df = df.reset_index().drop('index', axis=1)
mdf = pd.read_csv("deployment/ship_info.csv")
recent = df.loc[df.Status == 'OPERATIONAL'].drop('Status', axis=1).reset_index().drop('index', axis=1)
recent_table = recent.drop(['IMEI', 'Model'], axis=1)
plan = df.loc[df.Status == 'CONFIRMED'].drop('Status', axis=1).reset_index().drop('index', axis=1)
plan_table = plan.drop(['IMEI', 'Model'], axis=1)
n_floats = recent.shape[0]
model_mapper = {
'ARVOR_SBE':'ARVOR-SBE',
'ARVOR+DO':'ARVOR-SBE with Oxygen',
'ARVOR_RBR':'ARVOR-RBR',
'ARVOR_D':'Deep ARVOR with Oxygen',
'PROVOR_CTS4':'PROVOR CTS4',
'PROVOR_CTS4+pH':'PROVOR CTS4 with pH',
'PROVOR_CTS5':'PROVOR CTS5',
'PROVOR_CTS5+pH':'PROVOR CTS5 with pH',
'PROVOR_CTS4+SUNA':'PROVOR CTS4 with Nitrate',
'PROVOR_CTS5+SUNA':'PROVOR CTS5 with Nitrate',
'APEX_SBE':'APEX-SBE',
'APEX_RBR':'APEX-RBR',
}
if n_floats == 0:
summary_string = 'So far in 2025 we have not deployed any floats.'
else:
summary_string = f'To date we have deployed {n_floats} floats in 2025: '
for flt in recent.Detail.unique():
n = recent.loc[recent.Detail == flt].shape[0]
if n > 0:
summary_string += f'{n} {model_mapper[flt]}, '
summary_string = summary_string[:-2]
summary_string += '.'
```
```{r map, layout="l-page-outset"}
pal <- colorFactor(
c("green", "purple", "blue", "yellow", "green"),
levels = c("BIO", "IOS", "ONC", "Dal", "SAEON")
)
icons <- iconList(
OPERATIONAL = makeIcon("images/buoy.png", "images/buoy.png", 16, 16),
CONFIRMED = makeIcon("images/loading.png", "images/loading.png", 16, 16),
FAILED = makeIcon("images/x.png", "images/x.png", 16, 16)
)
leaflet() %>%
addTiles() %>%
setView(lng = -60, lat = 45, zoom = 2) %>%
addCircleMarkers(
data = py$df,
lat = py$df$Latitude,
lng = py$df$Longitude,
radius = 12,
stroke = FALSE,
fillColor = ~pal(py$df$Institute),
fillOpacity = 0.7,
popup = paste0(
"WMO: ", py$df$WMO,
"<br/>",
"Model: ", py$df$Detail,
"<br/>",
"Program: ", py$df$Program, ", ", py$df$Institute,
"<br/>",
"Deployment Date: ", py$df$Date,
"<br/>",
"Ship: ", py$df$Ship
)
) %>%
addMarkers(
data = py$df,
lat = py$df$Latitude,
lng = py$df$Longitude,
icon = ~icons[py$df$Status],
popup = paste0(
"WMO: ", py$df$WMO,
"<br/>",
"Model: ", py$df$Detail,
"<br/>",
"Program: ", py$df$Program, ", ", py$df$Institute,
"<br/>",
"Deployment Date: ", py$df$Date,
"<br/>",
"Ship: ", py$df$Ship
)
)
```
## Deployments since Jan 1, 2025
`r py$summary_string`
```{r table_1, layout="l-page-outset shaded"}
assign_country <- function(name) {
cty <- py$mdf$Country[py$mdf$Ship == name]
paste(emoji::emoji_name[paste0("flag_", cty)], name)
}
link_efm <- function(wmo) {
paste0("[",wmo,"](https://fleetmonitoring.euro-argo.eu/float/",wmo,")")
}
py$recent_table$Ship <- lapply(py$recent_table$Ship, assign_country)
py$recent_table$WMO <- lapply(py$recent_table$WMO, link_efm)
knitr::kable(py$recent_table)
```
## Planned Deployments
```{r table_2, layout="l-page-outset shaded"}
py$plan_table$Ship <- lapply(py$plan_table$Ship, assign_country)
knitr::kable(py$plan_table)
```
_Note_: The two PROVOR floats planned for deplpyment on line P from the Tully are awaiting replacement radiometry sensors as they were originally shipped with incorrect wavelength configurations, so those deployments should be regarded as tentative.
## Planning & Inventory
```{python inventory}
stock = pd.read_csv('deployment/inventory.csv')
remain = pd.DataFrame({
'Program':stock.Program,
'Institute':stock.Institute,
'ARVOR-SBE':stock['ARVOR-SBE'],
'ARVOR+DO':stock['ARVOR+DO'],
'ARVOR-RBR':stock['ARVOR-RBR'],
'Deep ARVOR':stock['Deep ARVOR'],
'PROVOR':stock['PROVOR'],
'APEX-SBE':stock['APEX-SBE'],
'APEX-RBR':stock['APEX-RBR']
})
remain = remain.set_index(['Program', 'Institute'], drop=False)
model_mapper = {
'ARVOR_SBE':'ARVOR-SBE',
'ARVOR+DO':'ARVOR+DO',
'ARVOR_RBR':'ARVOR-RBR',
'ARVOR_D':'Deep ARVOR',
'PROVOR_CTS4':'PROVOR',
'PROVOR_CTS4+pH':'PROVOR',
'PROVOR_CTS5':'PROVOR',
'PROVOR_CTS5+pH':'PROVOR',
'PROVOR_CTS4+SUNA':'PROVOR',
'PROVOR_CTS5+SUNA':'PROVOR',
'APEX_SBE':'APEX-SBE',
'APEX_RBR':'APEX-RBR',
}
for i in plan.index:
ix = (plan.loc[i].Program, plan.loc[i].Institute)
f = plan.loc[i].Detail
remain.loc[ix, model_mapper[f]] -= 1
```
The table below shows floats "in stock" at various institutions.
```{r table_3, layout="l-body-outset shaded"}
knitr::kable(py$stock)
```
### Planned Missions
The following are planned missions that floats could be deployed on.
<!-- This table shows what the standing stock of floats will be for each program/institution will be following the completion of the deployments listed in the "Planned Deployments" section.
```{r table_4, layout="l-body-outset shaded"}
knitr::kable(py$remain)
```
-->