|
63 | 63 | {
|
64 | 64 | "data": {
|
65 | 65 | "text/html": [
|
66 |
| - "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">DatabaseTable: ibis_read_csv_7c4pueeglfflvievrwtdlx7wcu\n", |
| 66 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">DatabaseTable: ibis_read_csv_hq3yjgckubazzecvlvn55m5asm\n", |
67 | 67 | " assessid string\n",
|
68 | 68 | " assessorid string\n",
|
69 | 69 | " stockid string\n",
|
|
85 | 85 | "</pre>\n"
|
86 | 86 | ],
|
87 | 87 | "text/plain": [
|
88 |
| - "DatabaseTable: ibis_read_csv_7c4pueeglfflvievrwtdlx7wcu\n", |
| 88 | + "DatabaseTable: ibis_read_csv_hq3yjgckubazzecvlvn55m5asm\n", |
89 | 89 | " assessid string\n",
|
90 | 90 | " assessorid string\n",
|
91 | 91 | " stockid string\n",
|
|
153 | 153 | " <th>assessid</th>\n",
|
154 | 154 | " <th>assessorid</th>\n",
|
155 | 155 | " <th>stockid</th>\n",
|
156 |
| - " <th>stocklong</th>\n", |
157 |
| - " <th>recorder</th>\n", |
158 | 156 | " <th>daterecorded</th>\n",
|
159 |
| - " <th>dateloaded</th>\n", |
160 | 157 | " <th>assessyear</th>\n",
|
161 |
| - " <th>assesssource</th>\n", |
162 |
| - " <th>contacts</th>\n", |
163 |
| - " <th>notes</th>\n", |
164 |
| - " <th>pdffile</th>\n", |
165 |
| - " <th>assess</th>\n", |
166 |
| - " <th>refpoints</th>\n", |
167 |
| - " <th>assessmethod</th>\n", |
168 |
| - " <th>assesscomments</th>\n", |
169 |
| - " <th>xlsfilename</th>\n", |
170 |
| - " <th>mostrecent</th>\n", |
171 | 158 | " </tr>\n",
|
172 | 159 | " </thead>\n",
|
173 | 160 | " <tbody>\n",
|
|
176 | 163 | " <td>DFO-COD2J3KL-1959-2014-WATSON</td>\n",
|
177 | 164 | " <td>DFO</td>\n",
|
178 | 165 | " <td>COD2J3KL</td>\n",
|
179 |
| - " <td>Atlantic cod Southern Labrador-Eastern Newfoun...</td>\n", |
180 |
| - " <td>WATSON</td>\n", |
181 | 166 | " <td>2016-02-25</td>\n",
|
182 |
| - " <td>2016-02-18</td>\n", |
183 | 167 | " <td>1959-2014</td>\n",
|
184 |
| - " <td>http://www.dfo-mpo.gc.ca/csas-sccs/publication...</td>\n", |
185 |
| - " <td>NULL</td>\n", |
186 |
| - " <td>NULL</td>\n", |
187 |
| - " <td>NULL</td>\n", |
188 |
| - " <td>1</td>\n", |
189 |
| - " <td>1</td>\n", |
190 |
| - " <td>SURBA</td>\n", |
191 |
| - " <td>NULL</td>\n", |
192 |
| - " <td>WATSON_COD2J3KL_2014-DH-edited.xlsx</td>\n", |
193 |
| - " <td>0</td>\n", |
194 | 168 | " </tr>\n",
|
195 | 169 | " <tr>\n",
|
196 | 170 | " <th>1</th>\n",
|
197 | 171 | " <td>DFO-NFLD-COD2J3KL-1850-2011-CHING</td>\n",
|
198 | 172 | " <td>DFO-NFLD</td>\n",
|
199 | 173 | " <td>COD2J3KL</td>\n",
|
200 |
| - " <td>Atlantic cod Southern Labrador-Eastern Newfoun...</td>\n", |
201 |
| - " <td>CHING</td>\n", |
202 | 174 | " <td>2013-10-22</td>\n",
|
203 |
| - " <td>2001-12-31</td>\n", |
204 | 175 | " <td>1850-2011</td>\n",
|
205 |
| - " <td>NULL</td>\n", |
206 |
| - " <td>NULL</td>\n", |
207 |
| - " <td>NULL</td>\n", |
208 |
| - " <td>Stock Assesment of Northern (2J3KL) Cod in 2013</td>\n", |
209 |
| - " <td>1</td>\n", |
210 |
| - " <td>1</td>\n", |
211 |
| - " <td>SURBA</td>\n", |
212 |
| - " <td>NULL</td>\n", |
213 |
| - " <td>/home/srdbadmin/srdb/spreadsheets/CHING-COD2J3...</td>\n", |
214 |
| - " <td>0</td>\n", |
215 | 176 | " </tr>\n",
|
216 | 177 | " <tr>\n",
|
217 | 178 | " <th>2</th>\n",
|
218 | 179 | " <td>DFO-NFLD-COD2J3KL-1959-2018-ASHBROOK</td>\n",
|
219 | 180 | " <td>DFO-NFLD</td>\n",
|
220 | 181 | " <td>COD2J3KL</td>\n",
|
221 |
| - " <td>Atlantic cod Southern Labrador-Eastern Newfoun...</td>\n", |
222 |
| - " <td>ASHBROOK</td>\n", |
223 | 182 | " <td>2019-06-20</td>\n",
|
224 |
| - " <td>2019-08-22</td>\n", |
225 | 183 | " <td>1959-2018</td>\n",
|
226 |
| - " <td>http://www.dfo-mpo.gc.ca/csas-sccs/Publication...</td>\n", |
227 |
| - " <td>NULL</td>\n", |
228 |
| - " <td>NULL</td>\n", |
229 |
| - " <td>AtlanticCod.2J3KL.pdf</td>\n", |
230 |
| - " <td>1</td>\n", |
231 |
| - " <td>1</td>\n", |
232 |
| - " <td>ICA</td>\n", |
233 |
| - " <td>NULL</td>\n", |
234 |
| - " <td>ASHBROOK-COD2J3KL-2018-DH-edited.xlsx</td>\n", |
235 |
| - " <td>0</td>\n", |
236 | 184 | " </tr>\n",
|
237 | 185 | " <tr>\n",
|
238 | 186 | " <th>3</th>\n",
|
239 | 187 | " <td>DFO-NFLD-COD2J3KL-1959-2021-HIVELY</td>\n",
|
240 | 188 | " <td>DFO-NFLD</td>\n",
|
241 | 189 | " <td>COD2J3KL</td>\n",
|
242 |
| - " <td>Atlantic cod Southern Labrador-Eastern Newfoun...</td>\n", |
243 |
| - " <td>HIVELY</td>\n", |
244 | 190 | " <td>2023-11-08</td>\n",
|
245 |
| - " <td>2023-11-10</td>\n", |
246 | 191 | " <td>1959-2021</td>\n",
|
247 |
| - " <td>NULL</td>\n", |
248 |
| - " <td>NULL</td>\n", |
249 |
| - " <td>Science Advisory Report 2022/041</td>\n", |
250 |
| - " <td>NULL</td>\n", |
251 |
| - " <td>1</td>\n", |
252 |
| - " <td>1</td>\n", |
253 |
| - " <td>ICA</td>\n", |
254 |
| - " <td>NULL</td>\n", |
255 |
| - " <td>CND_vers4.62_updates.xlsx</td>\n", |
256 |
| - " <td>999</td>\n", |
257 | 192 | " </tr>\n",
|
258 | 193 | " </tbody>\n",
|
259 | 194 | "</table>\n",
|
260 | 195 | "</div>"
|
261 | 196 | ],
|
262 | 197 | "text/plain": [
|
263 |
| - " assessid assessorid stockid \\\n", |
264 |
| - "0 DFO-COD2J3KL-1959-2014-WATSON DFO COD2J3KL \n", |
265 |
| - "1 DFO-NFLD-COD2J3KL-1850-2011-CHING DFO-NFLD COD2J3KL \n", |
266 |
| - "2 DFO-NFLD-COD2J3KL-1959-2018-ASHBROOK DFO-NFLD COD2J3KL \n", |
267 |
| - "3 DFO-NFLD-COD2J3KL-1959-2021-HIVELY DFO-NFLD COD2J3KL \n", |
268 |
| - "\n", |
269 |
| - " stocklong recorder daterecorded \\\n", |
270 |
| - "0 Atlantic cod Southern Labrador-Eastern Newfoun... WATSON 2016-02-25 \n", |
271 |
| - "1 Atlantic cod Southern Labrador-Eastern Newfoun... CHING 2013-10-22 \n", |
272 |
| - "2 Atlantic cod Southern Labrador-Eastern Newfoun... ASHBROOK 2019-06-20 \n", |
273 |
| - "3 Atlantic cod Southern Labrador-Eastern Newfoun... HIVELY 2023-11-08 \n", |
274 |
| - "\n", |
275 |
| - " dateloaded assessyear assesssource \\\n", |
276 |
| - "0 2016-02-18 1959-2014 http://www.dfo-mpo.gc.ca/csas-sccs/publication... \n", |
277 |
| - "1 2001-12-31 1850-2011 NULL \n", |
278 |
| - "2 2019-08-22 1959-2018 http://www.dfo-mpo.gc.ca/csas-sccs/Publication... \n", |
279 |
| - "3 2023-11-10 1959-2021 NULL \n", |
280 |
| - "\n", |
281 |
| - " contacts notes \\\n", |
282 |
| - "0 NULL NULL \n", |
283 |
| - "1 NULL NULL \n", |
284 |
| - "2 NULL NULL \n", |
285 |
| - "3 NULL Science Advisory Report 2022/041 \n", |
286 |
| - "\n", |
287 |
| - " pdffile assess refpoints \\\n", |
288 |
| - "0 NULL 1 1 \n", |
289 |
| - "1 Stock Assesment of Northern (2J3KL) Cod in 2013 1 1 \n", |
290 |
| - "2 AtlanticCod.2J3KL.pdf 1 1 \n", |
291 |
| - "3 NULL 1 1 \n", |
292 |
| - "\n", |
293 |
| - " assessmethod assesscomments \\\n", |
294 |
| - "0 SURBA NULL \n", |
295 |
| - "1 SURBA NULL \n", |
296 |
| - "2 ICA NULL \n", |
297 |
| - "3 ICA NULL \n", |
| 198 | + " assessid assessorid stockid daterecorded \\\n", |
| 199 | + "0 DFO-COD2J3KL-1959-2014-WATSON DFO COD2J3KL 2016-02-25 \n", |
| 200 | + "1 DFO-NFLD-COD2J3KL-1850-2011-CHING DFO-NFLD COD2J3KL 2013-10-22 \n", |
| 201 | + "2 DFO-NFLD-COD2J3KL-1959-2018-ASHBROOK DFO-NFLD COD2J3KL 2019-06-20 \n", |
| 202 | + "3 DFO-NFLD-COD2J3KL-1959-2021-HIVELY DFO-NFLD COD2J3KL 2023-11-08 \n", |
298 | 203 | "\n",
|
299 |
| - " xlsfilename mostrecent \n", |
300 |
| - "0 WATSON_COD2J3KL_2014-DH-edited.xlsx 0 \n", |
301 |
| - "1 /home/srdbadmin/srdb/spreadsheets/CHING-COD2J3... 0 \n", |
302 |
| - "2 ASHBROOK-COD2J3KL-2018-DH-edited.xlsx 0 \n", |
303 |
| - "3 CND_vers4.62_updates.xlsx 999 " |
| 204 | + " assessyear \n", |
| 205 | + "0 1959-2014 \n", |
| 206 | + "1 1850-2011 \n", |
| 207 | + "2 1959-2018 \n", |
| 208 | + "3 1959-2021 " |
304 | 209 | ]
|
305 | 210 | },
|
306 | 211 | "execution_count": 4,
|
|
311 | 216 | "source": [
|
312 | 217 | "(assessment\n",
|
313 | 218 | " .filter(_.stockid == \"COD2J3KL\")\n",
|
| 219 | + " .select(_.assessid, _.assessorid, _.stockid,\n", |
| 220 | + " _.daterecorded, _.assessyear) # pick a subset of columns to focus on\n", |
314 | 221 | " .execute()\n",
|
315 | 222 | ")"
|
316 | 223 | ]
|
|
457 | 364 | },
|
458 | 365 | {
|
459 | 366 | "cell_type": "code",
|
460 |
| - "execution_count": null, |
| 367 | + "execution_count": 6, |
461 | 368 | "id": "04dae269-5c92-4b10-affb-ce640dd9a585",
|
462 | 369 | "metadata": {},
|
463 |
| - "outputs": [], |
| 370 | + "outputs": [ |
| 371 | + { |
| 372 | + "data": { |
| 373 | + "text/html": [ |
| 374 | + "<div>\n", |
| 375 | + "<style scoped>\n", |
| 376 | + " .dataframe tbody tr th:only-of-type {\n", |
| 377 | + " vertical-align: middle;\n", |
| 378 | + " }\n", |
| 379 | + "\n", |
| 380 | + " .dataframe tbody tr th {\n", |
| 381 | + " vertical-align: top;\n", |
| 382 | + " }\n", |
| 383 | + "\n", |
| 384 | + " .dataframe thead th {\n", |
| 385 | + " text-align: right;\n", |
| 386 | + " }\n", |
| 387 | + "</style>\n", |
| 388 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 389 | + " <thead>\n", |
| 390 | + " <tr style=\"text-align: right;\">\n", |
| 391 | + " <th></th>\n", |
| 392 | + " <th>stockid</th>\n", |
| 393 | + " <th>n</th>\n", |
| 394 | + " </tr>\n", |
| 395 | + " </thead>\n", |
| 396 | + " <tbody>\n", |
| 397 | + " <tr>\n", |
| 398 | + " <th>0</th>\n", |
| 399 | + " <td>CODIIIaW-IV-VIId</td>\n", |
| 400 | + " <td>12</td>\n", |
| 401 | + " </tr>\n", |
| 402 | + " <tr>\n", |
| 403 | + " <th>1</th>\n", |
| 404 | + " <td>HADICE</td>\n", |
| 405 | + " <td>11</td>\n", |
| 406 | + " </tr>\n", |
| 407 | + " <tr>\n", |
| 408 | + " <th>2</th>\n", |
| 409 | + " <td>CODFAPL</td>\n", |
| 410 | + " <td>11</td>\n", |
| 411 | + " </tr>\n", |
| 412 | + " <tr>\n", |
| 413 | + " <th>3</th>\n", |
| 414 | + " <td>CODBA2224</td>\n", |
| 415 | + " <td>11</td>\n", |
| 416 | + " </tr>\n", |
| 417 | + " <tr>\n", |
| 418 | + " <th>4</th>\n", |
| 419 | + " <td>HERRRIGA</td>\n", |
| 420 | + " <td>11</td>\n", |
| 421 | + " </tr>\n", |
| 422 | + " <tr>\n", |
| 423 | + " <th>...</th>\n", |
| 424 | + " <td>...</td>\n", |
| 425 | + " <td>...</td>\n", |
| 426 | + " </tr>\n", |
| 427 | + " <tr>\n", |
| 428 | + " <th>1507</th>\n", |
| 429 | + " <td>SSALMLWASH</td>\n", |
| 430 | + " <td>1</td>\n", |
| 431 | + " </tr>\n", |
| 432 | + " <tr>\n", |
| 433 | + " <th>1508</th>\n", |
| 434 | + " <td>STROUT22-32</td>\n", |
| 435 | + " <td>1</td>\n", |
| 436 | + " </tr>\n", |
| 437 | + " <tr>\n", |
| 438 | + " <th>1509</th>\n", |
| 439 | + " <td>BLRAYVIIe</td>\n", |
| 440 | + " <td>1</td>\n", |
| 441 | + " </tr>\n", |
| 442 | + " <tr>\n", |
| 443 | + " <th>1510</th>\n", |
| 444 | + " <td>SGRAYVI-VII</td>\n", |
| 445 | + " <td>1</td>\n", |
| 446 | + " </tr>\n", |
| 447 | + " <tr>\n", |
| 448 | + " <th>1511</th>\n", |
| 449 | + " <td>PLAICIIIa</td>\n", |
| 450 | + " <td>1</td>\n", |
| 451 | + " </tr>\n", |
| 452 | + " </tbody>\n", |
| 453 | + "</table>\n", |
| 454 | + "<p>1512 rows × 2 columns</p>\n", |
| 455 | + "</div>" |
| 456 | + ], |
| 457 | + "text/plain": [ |
| 458 | + " stockid n\n", |
| 459 | + "0 CODIIIaW-IV-VIId 12\n", |
| 460 | + "1 HADICE 11\n", |
| 461 | + "2 CODFAPL 11\n", |
| 462 | + "3 CODBA2224 11\n", |
| 463 | + "4 HERRRIGA 11\n", |
| 464 | + "... ... ..\n", |
| 465 | + "1507 SSALMLWASH 1\n", |
| 466 | + "1508 STROUT22-32 1\n", |
| 467 | + "1509 BLRAYVIIe 1\n", |
| 468 | + "1510 SGRAYVI-VII 1\n", |
| 469 | + "1511 PLAICIIIa 1\n", |
| 470 | + "\n", |
| 471 | + "[1512 rows x 2 columns]" |
| 472 | + ] |
| 473 | + }, |
| 474 | + "execution_count": 6, |
| 475 | + "metadata": {}, |
| 476 | + "output_type": "execute_result" |
| 477 | + } |
| 478 | + ], |
464 | 479 | "source": [
|
465 | 480 | "(assessment\n",
|
466 | 481 | " .group_by(_.stockid)\n",
|
|
0 commit comments