import intake
import hvplot.pandas
import hvplot.xarray
import cook_inlet_catalogs as cic
import holoviews as hv

Drifters (EcoFOCI)ΒΆ

EcoFOCI Project.

As described on the main project website for EcoFOCI:

We study the ecosystems of the North Pacific Ocean, Bering Sea and U.S. Arctic to improve understanding of ecosystem dynamics and we apply that understanding to the management of living marine resources. EcoFOCI scientists integrate field, laboratory and modeling studies to determine how varying biological and physical factors influence large marine ecosystems within Alaskan waters.

EcoFOCI is a joint research program between the Alaska Fisheries Science Center (NOAA/ NMFS/ AFSC) and the Pacific Marine Environmental Laboratory (NOAA/ OAR/ PMEL).

Drifter data are being pulled from this webpage: https://www.ecofoci.noaa.gov/drifters/efoci_drifterData.shtml which also has a plot available for each drifter dataset.

Several years of EcoFOCI drifter data are also available in a private Research Workspace project: https://researchworkspace.com/project/41531085/files.

cat = intake.open_catalog(cic.utils.cat_path("drifters_ecofoci"))

Plot all datasets in catalogΒΆ

dd, ddlabels = cic.utils.combine_datasets_for_map(cat)
dd.hvplot(**cat.metadata["map"]) * ddlabels.hvplot(**cat.metadata["maplabels"])

List available datasets in the catalogΒΆ

dataset_ids = list(cat)
dataset_ids
['050795_y2011_withT',
 '050796_y2010_withTandIce',
 '050797_y2010_withTandIce',
 '050798_y2011_withT',
 '050799_y2011_withT',
 '051972_y2011_withT',
 '051973_y2010_withTandIce',
 '051974_y2011_withT',
 '051975_y2010_withTandIce',
 '051976_y2010_withTandIce',
 '098684_y2010_withTandIce',
 '098685_y2010_withTandIce',
 '098686_y2010_withTandIce',
 '098687_y2010_withTandIce',
 '098688_y2010_withTandIce',
 '098689_y2010_withTandIce',
 '098690_y2010_withTandIce',
 '098691_y2010_withTandIce',
 '098692_y2010_withTandIce',
 '098693_y2010_withTandIce',
 '106694_y2011_withTandIce',
 '106695_y2011_withT',
 '106696_y2012_withTandIce',
 '106697_y2012_withTandIce',
 '106698_y2011_withTandIce',
 '106699_y2011_withTandIce',
 '111968_y2012_withTandIce',
 '111969_y2013_withT',
 '111970_y2013_withT',
 '111971_y2013_withT',
 '111973_y2013_withT',
 '111974_y2013_withT',
 '111976_y2013_withT',
 '113633_y2012_withT',
 '113634_y2012_withT',
 '113635_y2012_withTandIce',
 '113636_y2012_withTandIce',
 '113637_y2012_withTandIce',
 '113638_y2012_withTandIce',
 '113639_y2012_withTandIce',
 '113640_y2012_withTandIce',
 '113641_y2012_withTandIce',
 '113642_y2012_withTandIce',
 '119593_y2012_withTandIce',
 '119594_y2012_withTandIce',
 '119595_y2012_withTandIce',
 '119596_y2012_withTandIce',
 '119597_y2012_withTandIce',
 '119598_y2012_withTandIce',
 '119599_y2012_withTandIce',
 '119600_y2012_withTandIce',
 '122532_y2013_withT',
 '122533_y2013_withT',
 '122534_y2013_withTandIce',
 '122535_y2013_withTandIce',
 '122536_y2013_withTandIce',
 '122537_y2013_withTandIce',
 '122538_y2013_withTandIce',
 '122539_y2013_withTandIce',
 '122540_y2013_withTandIce',
 '122541_y2013_withTandIce',
 '122542_y2013_withT',
 '122543_y2013',
 '122843_y2013_withTandIce',
 '122844_y2013_withTandIce',
 '122845_y2013_withT',
 '122846_y2013_withTandIce',
 '122847_y2013_withTandIce',
 '128951_y2013_withTandIce',
 '128952_y2013_withT',
 '128954_y2013_withTandIce',
 '128955_y2013_withTandIce',
 '13126_y2001',
 '13127_y2001',
 '13128_y2001',
 '13129_y2001',
 '13130_y2001',
 '13131_y2001',
 '13132_y2001',
 '13134_y2001',
 '13135_y2001',
 '13136_y2001',
 '13137_y2001',
 '13138_y2001',
 '13139_y2001',
 '13140_y2001',
 '13141_y2001',
 '13142_y2001',
 '13143_y2001',
 '13144_y2001',
 '13145_y2001',
 '13146_y2001',
 '13147_y2001',
 '13148_y2001',
 '13151_y2001',
 '13152_y2001',
 '13153_y2001',
 '13154_y2001',
 '13155_y2001',
 '13156_y2001',
 '13157_y2001',
 '13158_y2001',
 '13159_y2001',
 '13161_y2001',
 '13162_y2001',
 '13163_y2001',
 '13164_y2001',
 '13169_y2001',
 '13170_y2001',
 '136859_y2015_withTandIce',
 '136860_y2015_withTandIce',
 '136861_y2015_withTandIce',
 '136862_y2015_withTandIce',
 '136863_y2015_withTandIce',
 '136864_y2015_withTandIce',
 '136865_y2015_withTandIce',
 '136866_y2015_withTandIce',
 '136867_y2015_withTandIce',
 '136868_y2015_withTandIce',
 '136869_y2015_withTandIce',
 '136870_y2015_withTandIce',
 '136871_y2014_withTandIce',
 '136873_y2014_withT',
 '136874_y2014_withT',
 '148277_y2015_withTandIce',
 '148278_y2015_withT',
 '148279_y2015_withT',
 '15789_y1999',
 '15790_y1999',
 '15791_y1999',
 '15792_y1999',
 '19457_y2000',
 '19458_y2000',
 '19624_y2000',
 '19625_y2000',
 '19975_y2000',
 '19976_y2000',
 '19980_y2000',
 '19981_y2000',
 '20100_y2000',
 '20101_y2000',
 '20381_y1999',
 '20394_y1999',
 '20395_y1999',
 '20397_y1999',
 '20449_y1999',
 '20454_y1999',
 '20456_y1999',
 '20932_y1999',
 '20932_y2000',
 '21057_y2000',
 '21059_y2000',
 '21956_y2001',
 '21957_y2001',
 '21966_y2001',
 '22025_y2001',
 '22089_y2001',
 '22195_y2000',
 '22196_y2000',
 '22197_y2000',
 '22244_y2001',
 '22343_y2001',
 '22354_y2002',
 '22366_y2001',
 '22383_y2001',
 '22394_y2001',
 '22469_y2001',
 '22578_y2001',
 '22579_y2001',
 '22580_y2001',
 '22666_y2001',
 '22778_y2002',
 '23787_y2002',
 '23827_y2001',
 '23828_y2001',
 '23929_y2001',
 '24036_y2001',
 '24053_y2001',
 '24210_y2001',
 '24213_y2001',
 '29057_y2000',
 '29347_y2001',
 '29348_y2001',
 '29349_y2001',
 '34239_y2002',
 '34240_y2002',
 '34241_y2002',
 '34242_y2002',
 '34243_y2002',
 '34244_y2002',
 '34245_y2002',
 '34246_y2002',
 '34247_y2002',
 '34248_y2002',
 '34249_y2002',
 '34250_y2002',
 '34251_y2002',
 '34287_y2002',
 '34288_y2002',
 '34291_y2002',
 '34292_y2002',
 '34293_y2002',
 '36246_y2002',
 '36247_y2002',
 '36248_y2002',
 '36249_y2002',
 '36250_y2002',
 '36251_y2002',
 '36252_y2002',
 '36253_y2002',
 '36254_y2003',
 '36255_y2002',
 '36256_y2002',
 '36257_y2002',
 '36258_y2002',
 '36259_y2002',
 '36260_y2002',
 '36261_y2002',
 '36262_y2002',
 '36263_y2002',
 '36264_y2002',
 '36265_y2002',
 '36267_y2002',
 '36268_y2002',
 '36269_y2002',
 '36270_y2002',
 '37474_y2002',
 '37475_y2002',
 '37476_y2002',
 '37477_y2002',
 '37478_y2003',
 '37479_y2002',
 '37480_y2002',
 '37483_y2002',
 '37484_y2003',
 '37485_y2003',
 '37486_y2003',
 '37487_y2003',
 '37488_y2003',
 '37489_y2003',
 '37490_y2003',
 '37491_y2003',
 '37492_y2003',
 '37493_y2003',
 '37494_y2003',
 '37495_y2003',
 '37496_y2003',
 '37497_y2003',
 '37498_y2003',
 '37499_y2003',
 '37500_y2003',
 '37501_y2003',
 '37502_y2002',
 '37504_y2003',
 '37505_y2003',
 '37506_y2003',
 '37507_y2003',
 '37508_y2003',
 '37509_y2003',
 '37510_y2003',
 '37511_y2003',
 '37512_y2003',
 '37513_y2003',
 '37514_y2003',
 '37515_y2002',
 '37516_y2003',
 '37517_y2002',
 '37518_y2002',
 '37519_y2002',
 '37520_y2003',
 '37521_y2002',
 '37522_y2002',
 '37523_y2002',
 '43698_y2004',
 '43700_y2004',
 '43701_y2004',
 '43702_y2004',
 '43703_y2004',
 '43704_y2004',
 '43705_y2004',
 '43706_y2004',
 '43707_y2004',
 '43709_y2004',
 '43710_y2004',
 '43711_y2004',
 '43712_y2004',
 '43713_y2004',
 '43714_y2004',
 '43715_y2004',
 '43716_y2004',
 '43717_y2004',
 '43718_y2004',
 '43719_y2004',
 '43720_y2004',
 '43721_y2004',
 '43722_y2004',
 '43723_y2004',
 '43725_y2004',
 '43726_y2004',
 '43727_y2004',
 '43728_y2004',
 '43729_y2004',
 '43730_y2004',
 '43731_y2004',
 '43732_y2004',
 '43733_y2004',
 '43734_y2004',
 '43735_y2004',
 '43737_y2004',
 '43738_y2004',
 '43820_y2003',
 '43821_y2003',
 '53287_y2004',
 '53288_y2004',
 '53289_y2004',
 '53290_y2005',
 '53291_y2004',
 '53292_y2004',
 '53293_y2004',
 '53294_y2005',
 '53295_y2005',
 '53296_y2005',
 '53297_y2006',
 '53298_y2005',
 '53299_y2005',
 '53300_y2005',
 '53301_y2007',
 '53302_y2005',
 '53303_y2005',
 '53304_y2005',
 '53306_y2005',
 '53307_y2006',
 '53308_y2005',
 '53309_y2005',
 '53310_y2005',
 '53311_y2005',
 '53312_y2005',
 '53313_y2006',
 '53314_y2006',
 '53315_y2005',
 '53316_y2005',
 '53317_y2005',
 '53318_y2005',
 '53319_y2005',
 '53320_y2005',
 '53321_y2005',
 '57863_y2006',
 '57864_y2009',
 '57865_y2008',
 '57866_y2006',
 '57867_y2006',
 '57868_y2006',
 '57869_y2006',
 '57870_y2005',
 '57871_y2007',
 '57872_y2005',
 '57873_y2006',
 '57874_y2005',
 '57875_y2006',
 '57876_y2005',
 '57877_y2007',
 '57878_y2005',
 '57879_y2005',
 '57880_y2005',
 '57881_y2005',
 '57882_y2008',
 '57883_y2006',
 '57884_y2008',
 '57885_y2005',
 '57886_y2008',
 '57887_y2005',
 '57888_y2006',
 '57889_y2005',
 '72426_y2009',
 '72427_y2009',
 '72428_y2010',
 '72430_y2007',
 '72431_y2008',
 '72432_y2007',
 '72433_y2007',
 '72434_y2007',
 '72435_y2007',
 '80086_y2008',
 '80087_y2008',
 '80088_y2008',
 '80089_y2008',
 '80090_y2008',
 '80091_y2009',
 '80093_y2009',
 '80094_y2009',
 '80095_y2009',
 '91991_y2009',
 '91992_y2010']

Select one dataset to investigateΒΆ

try:
    dataset_id = dataset_ids[2]
except:
    dataset_id = dataset_ids[0]
print(dataset_id)

dd = cat[dataset_id].read()
dd
050797_y2010_withTandIce
latitude_N longitude_E depth_m datetime
0 55.733 -164.730 40 2010-05-18 05:14:00
1 55.744 -164.712 40 2010-05-18 05:46:00
2 55.745 -164.664 40 2010-05-18 08:36:00
3 55.750 -164.664 40 2010-05-18 09:06:00
4 55.740 -164.627 40 2010-05-18 11:26:00
... ... ... ... ...
8155 57.058 -159.933 40 2011-03-18 03:26:00
8156 57.049 -159.888 40 2011-03-18 04:11:00
8157 57.051 -159.892 40 2011-03-18 05:03:00
8158 57.056 -159.896 40 2011-03-18 05:55:00
8159 57.061 -159.898 40 2011-03-18 06:47:00

8160 rows Γ— 4 columns

Plot one datasetΒΆ

keys = list(cat[dataset_id].metadata["plots"].keys())
print(keys)

plots = []
for key in keys:
    plot_kwargs = cat[dataset_id].metadata["plots"][key]
    if "clim" in plot_kwargs and isinstance(plot_kwargs["clim"], list):
        plot_kwargs["clim"] = tuple(plot_kwargs["clim"])
    if "dynamic" in plot_kwargs:
        plot_kwargs["dynamic"] = False
    plots.append(cat[dataset_id].ToHvPlot(**plot_kwargs).read())
hv.Layout(plots).cols(1)
['data']