-
Notifications
You must be signed in to change notification settings - Fork 3
Core Data Structures
Wiki ▸ GdacClient Class ▸ Core Data Structures
This page presents a detailed explanation and discussion of the core pandas DataFrames stored and used internally by the GdacClient Class to create calendars and plot track maps.
The data structures are transformed through indexing and the DataFrame.groupby() method, followed by one or more operators and, finally, unstacking the resulting data frame to create the calendars.
DataFrame containing a column for each fetched deployment and indexed by date (YYYY-mm-dd). A cell either contains a NaN or a 1, indicating that the deployment was not active or active, respectively, on that date.
| index | bios_jack-20200605T1613 | cp_339-20200613T2009 | usf-gansett-20200519T1200 |
|---|---|---|---|
| 2019-07-18 | NaN | NaN | NaN |
| 2019-07-19 | NaN | NaN | NaN |
| 2019-07-20 | NaN | NaN | NaN |
| 2019-07-21 | NaN | NaN | NaN |
| 2019-07-22 | NaN | NaN | NaN |
| ... | ... | ... | |
| 2020-07-06 | NaN | 1.0 | NaN |
| 2020-07-07 | NaN | 1.0 | NaN |
| 2020-07-08 | NaN | 1.0 | NaN |
| 2020-07-09 | NaN | 1.0 | NaN |
| 2020-07-10 | NaN | 1.0 | NaN |
DataFrame containing a column for each fetched deployment and indexed by date (YYYY-mm-dd). Each cell contains either NaN or the total number of profiles on the date.
| index | bios_jack-20200605T1613 | cp_339-20200613T2009 | usf-gansett-20200519T1200 |
|---|---|---|---|
| 2019-07-18 | NaN | NaN | NaN |
| 2019-07-19 | NaN | NaN | NaN |
| 2019-07-20 | NaN | NaN | NaN |
| 2019-07-21 | NaN | NaN | NaN |
| 2019-07-22 | NaN | NaN | NaN |
| ... | ... | ... | |
| 2020-07-06 | NaN | 162.0 | NaN |
| 2020-07-07 | NaN | 102.0 | NaN |
| 2020-07-08 | NaN | 70.0 | NaN |
| 2020-07-09 | NaN | 69.0 | NaN |
| 2020-07-10 | NaN | 31.0 | NaN |
DataFrame containing the date, dataset_id, average latitude and longitude position of all profiles on the date specified in the date column. This data structure is used to plot simplified tracks of each dataset.
| date | dataset_id | latitude | longitude | |
|---|---|---|---|---|
| 0 | 2020-06-05 | bios_jack-20200605T1613 | 32.188725 | -64.495050 |
| 1 | 2020-06-06 | bios_jack-20200605T1613 | 32.202387 | -64.503405 |
| 2 | 2020-06-07 | bios_jack-20200605T1613 | 32.170816 | -64.456610 |
| 3 | 2020-06-08 | bios_jack-20200605T1613 | 32.197425 | -64.435050 |
| 4 | 2020-06-09 | bios_jack-20200605T1613 | 32.139901 | -64.447504 |
| .. | ... | ... | ... | ... |
| 721 | 2020-06-13 | usf-gansett-20200519T1200 | 27.485903 | -83.761870 |
| 722 | 2020-06-14 | usf-gansett-20200519T1200 | 27.455055 | -83.828940 |
| 723 | 2020-06-15 | usf-gansett-20200519T1200 | 27.442476 | -83.876225 |
| 724 | 2020-06-16 | usf-gansett-20200519T1200 | 27.421999 | -83.822705 |
| 725 | 2020-06-17 | usf-gansett-20200519T1200 | 27.457046 | -83.777324 |
The primary data structure returned by a number of GdacClient properties and methods is single or multi-indexed DataFrame containing the number of deployments, glider days or profiles in a given year, month and day.
| day | 1 | 2 | 3 | 4 | ... | 28 | 29 | 30 | 31 |
|---|---|---|---|---|---|---|---|---|---|
| year month | ... | ||||||||
| 2019 7 | NaN | NaN | NaN | NaN | ... | 4.0 | 5.0 | 5.0 | 4.0 |
| 8 | 5.0 | 5.0 | 4.0 | 3.0 | ... | 3.0 | 2.0 | 6.0 | 3.0 |
| 9 | 3.0 | 2.0 | 7.0 | 3.0 | ... | 2.0 | 3.0 | 3.0 | NaN |
| 10 | 7.0 | 11.0 | 3.0 | 3.0 | ... | 10.0 | 11.0 | 11.0 | 11.0 |
| 11 | 11.0 | 9.0 | 11.0 | 10.0 | ... | 6.0 | 5.0 | 5.0 | NaN |
| 12 | 5.0 | 5.0 | 5.0 | 5.0 | ... | 5.0 | 6.0 | 5.0 | 6.0 |
| 2020 1 | 6.0 | 6.0 | 5.0 | 5.0 | ... | 6.0 | 4.0 | 6.0 | 6.0 |
| 2 | 7.0 | 6.0 | 6.0 | 4.0 | ... | 12.0 | 10.0 | NaN | NaN |
| 3 | 22.0 | 17.0 | 9.0 | 8.0 | ... | 7.0 | 9.0 | 8.0 | 11.0 |
| 4 | 17.0 | 24.0 | 22.0 | 21.0 | ... | 6.0 | 6.0 | 6.0 | NaN |
| 5 | 6.0 | 6.0 | 6.0 | 7.0 | ... | 201.0 | 187.0 | 170.0 | 152.0 |
| 6 | 151.0 | 168.0 | 181.0 | 197.0 | ... | 326.0 | 350.0 | 337.0 | NaN |
| 7 | 322.0 | 237.0 | 139.0 | 186.0 | ... | NaN | NaN | NaN | NaN |
The following properties and methods return calendar DataFrames which are the input for plot_calendar: