diff --git a/examples/notebooks/oop_demo.ipynb b/examples/notebooks/oop_demo.ipynb index 6dd39ec..40d2c8c 100644 --- a/examples/notebooks/oop_demo.ipynb +++ b/examples/notebooks/oop_demo.ipynb @@ -44,7 +44,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -58,7 +58,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 16/16 [00:00<00:00, 67.10it/s]\n" + "100%|██████████| 16/16 [00:00<00:00, 58.37it/s]\n" ] }, { @@ -70,9 +70,9 @@ "\n", "Ocn-RedSea.Felis.2000\n", "=========================\n", - "Publication: A coral oxygen isotope record from the northern Red Sea documenting NAO, ENSO, and North Pacific teleconnections on Middle East climate variability since the year 1750 by ['Ahmed H. Nawar', 'Maoz Fine', 'Yossi Loya', 'Jürgen Pätzold', 'Thomas Felis', 'Gerold Wefer']\n", - "Publication: Tropical sea surface temperatures for the past four centuries reconstructed from coral archives by ['Jens Zinke', 'Kevin J. Anchukaitis', 'Nerilie J. Abram', 'Casey P. Saenger', 'Henry C. Wu', 'Jessica E. Tierney', 'Cyril Giry', 'K. Halimeda Kilbourne', 'Michael N. Evans']\n", - "Publication: World Data Center for Paleoclimatology by ['T. Felis']\n", + "Publication: A coral oxygen isotope record from the northern Red Sea documenting NAO, ENSO, and North Pacific teleconnections on Middle East climate variability since the year 1750 by ['Jürgen Pätzold', 'Maoz Fine', 'Yossi Loya', 'Thomas Felis', 'Gerold Wefer', 'Ahmed H. Nawar'] at Paleoceanography\n", + "Publication: Tropical sea surface temperatures for the past four centuries reconstructed from coral archives by ['Jessica E. Tierney', 'K. Halimeda Kilbourne', 'Jens Zinke', 'Kevin J. Anchukaitis', 'Nerilie J. Abram', 'Casey P. Saenger', 'Cyril Giry', 'Michael N. Evans', 'Henry C. Wu'] at Paleoceanography\n", + "Publication: World Data Center for Paleoclimatology by ['T. Felis'] at None\n", "- Paleo Table: Ocn-RedSea.Felis.2000.paleo1measurement1.csv\n" ] }, @@ -154,8 +154,8 @@ "\n", "Ant-WAIS-Divide.Severinghaus.2012\n", "=========================\n", - "Publication: This study by ['Severinghaus J.']\n", - "Publication: Little Ice Age cold interval in West Antarctica: Evidence from borehole temperature at the West Antarctic Ice Sheet (WAIS) Divide by ['Bruce D. Cornuelle', 'Anais J. Orsi', 'Jeffrey P. Severinghaus']\n", + "Publication: Little Ice Age cold interval in West Antarctica: Evidence from borehole temperature at the West Antarctic Ice Sheet (WAIS) Divide by ['Bruce D. Cornuelle', 'Anais J. Orsi', 'Jeffrey P. Severinghaus'] at Geophysical Research Letters\n", + "Publication: This study by ['Severinghaus J.'] at None\n", "- Paleo Table: Ant-WAIS-Divide.Severinghaus.2012.paleo1measurement1.csv\n" ] }, @@ -244,8 +244,8 @@ "\n", "Asi-SourthAndMiddleUrals.Demezhko.2007\n", "=========================\n", - "Publication: Climatic changes in the Urals over the past millennium; an analysis of geothermal and meteorological data by ['D. Yu. Demezhko', 'I. V. Golovanova']\n", - "Publication: This study by ['D Demezhko']\n", + "Publication: This study by ['D Demezhko'] at None\n", + "Publication: Climatic changes in the Urals over the past millennium; an analysis of geothermal and meteorological data by ['I. V. Golovanova', 'D. Yu. Demezhko'] at Climate of the Past\n", "- Paleo Table: Asi-SourthAndMiddleUrals.Demezhko.2007.paleo1measurement1.csv\n" ] }, @@ -328,14 +328,14 @@ "Ocn-AlboranSea436B.Nieto-Moreno.2013\n", "=========================\n", "Funding: ['Research Group 0179']\n", - "Funding: ['CTM2009-7715']\n", + "Funding: ['200800050084447 (MARM)']\n", "Funding: ['FP7/2007-2013)/ERC Grant Agreement #226600']\n", + "Funding: ['CTM2009-7715']\n", "Funding: ['CGL2009-07603']\n", - "Funding: ['200800050084447 (MARM)']\n", "Funding: ['Project RNM 05212']\n", - "Publication: PANGAEA by ['V. Nieto-Moreno']\n", - "Publication: Climate conditions in the westernmost Mediterranean over the last two millennia: An integrated biomarker approach by ['P. Masqué', 'J. García-Orellana', 'V. Willmott', 'V. Nieto-Moreno', 'J.S. Sinninghe Damsté', 'F. Martínez-Ruiz']\n", - "Publication: Robust global ocean cooling trend for the pre-industrial Common Era by ['Helen V. McGregor', 'Helena L. Filipsson', 'Steven J. Phipps', 'Marit-Solveig Seidenkrantz', 'Jason A. Addison', 'Hugues Goosse', 'Vasile Ersek', 'Marie-Alexandrine Sicre', 'Belen Martrat', 'Kandasamy Selvaraj', 'P. Graham Mortyn', 'Guillaume Leduc', 'Delia W. Oppo', 'Michael N. Evans', 'Kaustubh Thirumalai']\n", + "Publication: PANGAEA by ['V. Nieto-Moreno'] at None\n", + "Publication: Robust global ocean cooling trend for the pre-industrial Common Era by ['Helen V. McGregor', 'Steven J. Phipps', 'Jason A. Addison', 'Belen Martrat', 'Hugues Goosse', 'Vasile Ersek', 'P. Graham Mortyn', 'Delia W. Oppo', 'Marie-Alexandrine Sicre', 'Michael N. Evans', 'Kaustubh Thirumalai', 'Kandasamy Selvaraj', 'Guillaume Leduc', 'Helena L. Filipsson', 'Marit-Solveig Seidenkrantz'] at Nature Geoscience\n", + "Publication: Climate conditions in the westernmost Mediterranean over the last two millennia: An integrated biomarker approach by ['J. García-Orellana', 'V. Willmott', 'V. Nieto-Moreno', 'F. Martínez-Ruiz', 'P. Masqué', 'J.S. Sinninghe Damsté'] at Organic Geochemistry\n", "- Paleo Table: Ocn-AlboranSea436B.Nieto-Moreno.2013.paleo1measurement1.csv\n" ] }, @@ -417,8 +417,8 @@ "\n", "Eur-SpannagelCave.Mangini.2005\n", "=========================\n", - "Publication: Reconstruction of temperature in the Central Alps during the past 2000 yr from a δ18O stalagmite record by ['P. Verdes', 'A. Mangini', 'C. Spötl']\n", - "Publication: World Data Center for Paleoclimatology by ['A. Mangini']\n", + "Publication: Reconstruction of temperature in the Central Alps during the past 2000 yr from a δ18O stalagmite record by ['A. Mangini', 'P. Verdes', 'C. Spötl'] at Earth and Planetary Science Letters\n", + "Publication: World Data Center for Paleoclimatology by ['A. Mangini'] at None\n", "- Paleo Table: Eur-SpannagelCave.Mangini.2005.paleo1measurement1.csv\n" ] }, @@ -500,9 +500,9 @@ "\n", "Ocn-FeniDrift.Richter.2009\n", "=========================\n", - "Publication: Late Holocene (0–2.4kaBP) surface water temperature and salinity variability, Feni Drift, NE Atlantic Ocean by ['T.C.E. van Weering', 'F.J.C. Peeters', 'T.O. Richter']\n", - "Publication: Robust global ocean cooling trend for the pre-industrial Common Era by ['Hugues Goosse', 'P. Graham Mortyn', 'Marie-Alexandrine Sicre', 'Guillaume Leduc', 'Marit-Solveig Seidenkrantz', 'Jason A. Addison', 'Belen Martrat', 'Vasile Ersek', 'Delia W. Oppo', 'Michael N. Evans', 'Kaustubh Thirumalai', 'Kandasamy Selvaraj', 'Helena L. Filipsson', 'Helen V. McGregor', 'Steven J. Phipps']\n", - "Publication: World Data Center for Paleoclimatology by ['T.O. Richter']\n", + "Publication: Late Holocene (0–2.4kaBP) surface water temperature and salinity variability, Feni Drift, NE Atlantic Ocean by ['F.J.C. Peeters', 'T.O. Richter', 'T.C.E. van Weering'] at Quaternary Science Reviews\n", + "Publication: Robust global ocean cooling trend for the pre-industrial Common Era by ['Helen V. McGregor', 'Guillaume Leduc', 'Steven J. Phipps', 'Marit-Solveig Seidenkrantz', 'Marie-Alexandrine Sicre', 'Jason A. Addison', 'Belen Martrat', 'Delia W. Oppo', 'Michael N. Evans', 'Kaustubh Thirumalai', 'Helena L. Filipsson', 'Vasile Ersek', 'Hugues Goosse', 'Kandasamy Selvaraj', 'P. Graham Mortyn'] at Nature Geoscience\n", + "Publication: World Data Center for Paleoclimatology by ['T.O. Richter'] at None\n", "- Paleo Table: Ocn-FeniDrift.Richter.2009.paleo2measurement1.csv\n" ] }, @@ -696,8 +696,8 @@ "\n", "Eur-LakeSilvaplana.Trachsel.2010\n", "=========================\n", - "Publication: Scanning reflectance spectroscopy (380–730 nm): a novel method for quantitative high-resolution climate reconstructions from minerogenic lake sediments by ['M. Grosjean', 'M. Trachsel', 'C. Kamenik', 'D. Schnyder', 'B. Rein']\n", - "Publication: World Data Center for Paleoclimatology by ['M. Trachsel']\n", + "Publication: Scanning reflectance spectroscopy (380–730 nm): a novel method for quantitative high-resolution climate reconstructions from minerogenic lake sediments by ['M. Grosjean', 'M. Trachsel', 'D. Schnyder', 'C. Kamenik', 'B. Rein'] at Journal of Paleolimnology\n", + "Publication: World Data Center for Paleoclimatology by ['M. Trachsel'] at None\n", "- Paleo Table: Eur-LakeSilvaplana.Trachsel.2010.paleo1measurement1.csv\n" ] }, @@ -779,8 +779,8 @@ "\n", "Ocn-PedradeLume-CapeVerdeIslands.Moses.2006\n", "=========================\n", - "Publication: Evidence of multidecadal salinity variability in the eastern tropical North Atlantic by ['Brad E. Rosenheim', 'Christopher S. Moses', 'Peter K. Swart']\n", - "Publication: World Data Center for Paleoclimatology by ['C.S. Moses']\n", + "Publication: World Data Center for Paleoclimatology by ['C.S. Moses'] at None\n", + "Publication: Evidence of multidecadal salinity variability in the eastern tropical North Atlantic by ['Peter K. Swart', 'Brad E. Rosenheim', 'Christopher S. Moses'] at Paleoceanography\n", "- Paleo Table: Ocn-PedradeLume-CapeVerdeIslands.Moses.2006.paleo1measurement1.csv\n" ] }, @@ -862,9 +862,9 @@ "\n", "Ocn-SinaiPeninsula,RedSea.Moustafa.2000\n", "=========================\n", - "Publication: Mid-Holocene stable isotope record of corals from the northern Red Sea by ['Jürgen Pätzold', 'Yossi Loya', 'Gerold Wefer', 'Yaser Ahmed Moustafa']\n", - "Publication: Tropical sea surface temperatures for the past four centuries reconstructed from coral archives by ['Jens Zinke', 'Henry C. Wu', 'Kevin J. Anchukaitis', 'Nerilie J. Abram', 'Casey P. Saenger', 'Cyril Giry', 'Michael N. Evans', 'Jessica E. Tierney', 'K. Halimeda Kilbourne']\n", - "Publication: PANGAEA by ['Y.A. Moustafa']\n", + "Publication: Tropical sea surface temperatures for the past four centuries reconstructed from coral archives by ['Jens Zinke', 'Kevin J. Anchukaitis', 'Nerilie J. Abram', 'Casey P. Saenger', 'Cyril Giry', 'Michael N. Evans', 'Henry C. Wu', 'Jessica E. Tierney', 'K. Halimeda Kilbourne'] at Paleoceanography\n", + "Publication: PANGAEA by ['Y.A. Moustafa'] at None\n", + "Publication: Mid-Holocene stable isotope record of corals from the northern Red Sea by ['Gerold Wefer', 'Yaser Ahmed Moustafa', 'Jürgen Pätzold', 'Yossi Loya'] at Berichte, Fachbereich Geowissenschaften, Universität Bremen\n", "- Paleo Table: Ocn-SinaiPeninsula,RedSea.Moustafa.2000.paleo1measurement1.csv\n" ] }, @@ -946,8 +946,8 @@ "\n", "Eur-NorthernSpain.Martin-Chivelet.2011\n", "=========================\n", - "Publication: World Data Center for Paleoclimatology by ['J. Martín-Chivelet']\n", - "Publication: Land surface temperature changes in northern Iberia since 4000 yr BP, based on δ13C of speleothems by ['Javier Martín-Chivelet', 'M. Belén Muñoz-García', 'Ana I. Ortega', 'R. Lawrence Edwards', 'María J. Turrero']\n", + "Publication: Land surface temperature changes in northern Iberia since 4000 yr BP, based on δ13C of speleothems by ['Javier Martín-Chivelet', 'M. Belén Muñoz-García', 'Ana I. Ortega', 'R. Lawrence Edwards', 'María J. Turrero'] at Global and Planetary Change\n", + "Publication: World Data Center for Paleoclimatology by ['J. Martín-Chivelet'] at None\n", "- Paleo Table: Eur-NorthernSpain.Martin-Chivelet.2011.paleo1measurement1.csv\n" ] }, @@ -1029,8 +1029,8 @@ "\n", "Arc-Kongressvatnet.D'Andrea.2012\n", "=========================\n", - "Publication: World Data Center for Paleoclimatology by [\"W.J. D'Andrea\"]\n", - "Publication: Mild Little Ice Age and unprecedented recent warmth in an 1800 year lake sediment record from Svalbard by ['S. R. Roof', 'N. L. Balascio', \"W. J. D'Andrea\", 'A. Werner', 'M. Retelle', 'R. S. Bradley', 'D. A. Vaillencourt']\n", + "Publication: World Data Center for Paleoclimatology by [\"W.J. D'Andrea\"] at None\n", + "Publication: Mild Little Ice Age and unprecedented recent warmth in an 1800 year lake sediment record from Svalbard by ['S. R. Roof', \"W. J. D'Andrea\", 'A. Werner', 'M. Retelle', 'N. L. Balascio', 'R. S. Bradley', 'D. A. Vaillencourt'] at Geology\n", "- Paleo Table: Arc-Kongressvatnet.D'Andrea.2012.paleo1measurement1.csv\n" ] }, @@ -1119,8 +1119,8 @@ "\n", "Eur-CoastofPortugal.Abrantes.2011\n", "=========================\n", - "Publication: Climate of the last millennium at the southern pole of the North Atlantic Oscillation: an inner-shelf sediment record of flooding and upwelling by ['L Witt', 'F Abrantes', 'AHL Voelker', 'C Lopes', 'B Montanari', 'C Santos', 'T Rodrigues']\n", - "Publication: PANGAEA by ['F. Abrantes']\n", + "Publication: PANGAEA by ['F. Abrantes'] at None\n", + "Publication: Climate of the last millennium at the southern pole of the North Atlantic Oscillation: an inner-shelf sediment record of flooding and upwelling by ['F Abrantes', 'L Witt', 'AHL Voelker', 'C Lopes', 'C Santos', 'T Rodrigues', 'B Montanari'] at Climate Research\n", "- Paleo Table: Eur-CoastofPortugal.Abrantes.2011.paleo1measurement1.csv\n" ] }, @@ -1202,8 +1202,8 @@ "\n", "Eur-SpanishPyrenees.Dorado-Linan.2012\n", "=========================\n", - "Publication: Estimating 750 years of temperature variations and uncertainties in the Pyrenees by tree-ring reconstructions and climate simulations by ['I. Dorado Liñán', 'E. Gutiérrez', 'J. P. Montávez', 'M. Brunet', 'G. Helle', 'U. Büntgen', 'I. Heinrich', 'E. Zorita', 'J. J. Gómez-Navarro', 'F. González-Rouco']\n", - "Publication: World Data Center for Paleoclimatology by ['I. Dorado-Linan']\n", + "Publication: World Data Center for Paleoclimatology by ['I. Dorado-Linan'] at None\n", + "Publication: Estimating 750 years of temperature variations and uncertainties in the Pyrenees by tree-ring reconstructions and climate simulations by ['M. Brunet', 'G. Helle', 'J. J. Gómez-Navarro', 'U. Büntgen', 'I. Heinrich', 'F. González-Rouco', 'E. Zorita', 'I. Dorado Liñán', 'E. Gutiérrez', 'J. P. Montávez'] at Climate of the Past\n", "- Paleo Table: Eur-SpanishPyrenees.Dorado-Linan.2012.paleo1measurement1.csv\n" ] }, @@ -1285,8 +1285,8 @@ "\n", "Eur-FinnishLakelands.Helama.2014\n", "=========================\n", - "Publication: World Data Center for Paleoclimatology by ['S. Helama']\n", - "Publication: A palaeotemperature record for the Finnish Lakeland based on microdensitometric variations in tree rings by ['Taneli Kolström', 'Samuli Helama', 'Jari Holopainen', 'Matti Vartiainen', 'Hanna Mäkelä', 'Jouko Meriläinen']\n", + "Publication: A palaeotemperature record for the Finnish Lakeland based on microdensitometric variations in tree rings by ['Taneli Kolström', 'Samuli Helama', 'Jari Holopainen', 'Matti Vartiainen', 'Hanna Mäkelä', 'Jouko Meriläinen'] at Geochronometria\n", + "Publication: World Data Center for Paleoclimatology by ['S. Helama'] at None\n", "- Paleo Table: Eur-FinnishLakelands.Helama.2014.paleo1measurement1.csv\n" ] }, @@ -1368,8 +1368,8 @@ "\n", "Eur-NorthernScandinavia.Esper.2012\n", "=========================\n", - "Publication: Orbital forcing of tree-ring data by ['Jürg Luterbacher', 'Jan Esper', 'Eduardo Zorita', 'Daniel Nievergelt', 'Nils Fischer', 'Steffen Holzkämper', 'Mauri Timonen', 'David C. Frank', 'Ulf Büntgen', 'Rob J. S. Wilson', 'Anne Verstege', 'Sebastian Wagner']\n", - "Publication: World Data Center for Paleoclimatology by ['J. Esper']\n", + "Publication: Orbital forcing of tree-ring data by ['Mauri Timonen', 'Steffen Holzkämper', 'David C. Frank', 'Jürg Luterbacher', 'Ulf Büntgen', 'Rob J. S. Wilson', 'Jan Esper', 'Anne Verstege', 'Sebastian Wagner', 'Eduardo Zorita', 'Nils Fischer', 'Daniel Nievergelt'] at Nature Climate Change\n", + "Publication: World Data Center for Paleoclimatology by ['J. Esper'] at None\n", "- Paleo Table: Eur-NorthernScandinavia.Esper.2012.paleo1measurement1.csv\n" ] }, @@ -1451,8 +1451,8 @@ "\n", "Eur-Stockholm.Leijonhufvud.2009\n", "=========================\n", - "Publication: Five centuries of Stockholm winter/spring temperatures reconstructed from documentary evidence and instrumental observations by ['Rob Wilson', 'Anders Moberg', 'Lotta Leijonhufvud', 'Dag Retsö', 'Johan Söderberg', 'Ulrica Söderlind']\n", - "Publication: World Data Center for Paleoclimatology by ['L. Leijonhufvud']\n", + "Publication: Five centuries of Stockholm winter/spring temperatures reconstructed from documentary evidence and instrumental observations by ['Ulrica Söderlind', 'Rob Wilson', 'Lotta Leijonhufvud', 'Anders Moberg', 'Dag Retsö', 'Johan Söderberg'] at Climatic Change\n", + "Publication: World Data Center for Paleoclimatology by ['L. Leijonhufvud'] at None\n", "- Paleo Table: Eur-Stockholm.Leijonhufvud.2009.paleo1measurement1.csv\n" ] }, @@ -1546,7 +1546,9 @@ "D = LiPD()\n", "D.load_from_dir(path)\n", "\n", - "# Convert the LiPD datasets to the PyLiPD OOP \"Dataset\" class. \n", + "# ************************************************************\n", + "# Convert the LiPD datasets to the PyLiPD OOP \"Dataset\" class.\n", + "# ************************************************************\n", "datasets = D.get_datasets()\n", "\n", "for ds in datasets:\n", @@ -1559,7 +1561,7 @@ " print(f\"Funding: {funding.getGrants()}\")\n", " \n", " for pub in ds.getPublications():\n", - " print(f\"Publication: {pub.getTitle()} by {list(map(lambda x: x.getName(), pub.getAuthors()))}\")\n", + " print(f\"Publication: {pub.getTitle()} by {list(map(lambda x: x.getName(), pub.getAuthors()))} at {pub.getJournal()}\")\n", "\n", " for pd in ds.getPaleoData():\n", " for table in pd.getMeasurementTables():\n", @@ -1592,7 +1594,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -1606,7 +1608,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 1/1 [00:00<00:00, 1.75it/s]" + "100%|██████████| 1/1 [00:00<00:00, 1.63it/s]\n" ] }, { @@ -1615,14 +1617,34 @@ "text": [ "Loaded..\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n" - ] - }, + } + ], + "source": [ + "# Dataset is the Main OOP Class\n", + "from pylipd.classes.dataset import Dataset\n", + "\n", + "# LiPD is the LiPD parser/writer\n", + "from pylipd.classes.datatable import DataTable\n", + "from pylipd.lipd import LiPD\n", + "\n", + "# Load LiPD files as usual.\n", + "# - This loads the LiPD data into the internal RDF graph\n", + "path = '../data/ODP846.Lawrence.2006.lpd'\n", + "D = LiPD()\n", + "D.load(path)\n", + "\n", + "# ***********************************************************\n", + "# Convert the LiPD datasets to the PyLiPD OOP \"Dataset\" class\n", + "# ***********************************************************\n", + "datasets = D.get_datasets()\n", + "ds = datasets[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ { "data": { "text/html": [ @@ -1653,38 +1675,38 @@ "
\n", "2183 rows × 9 columns
\n", "" ], "text/plain": [ - " event depth cr depth c. wuellerstorfi d13c u. peregrina d18o \\\n", - "0 138-846B 0.12 0.12 3.38 0.14 \n", - "1 138-846B 0.23 0.23 3.46 0.01 \n", - "2 138-846B 0.33 0.33 3.65 -0.10 \n", - "3 138-846B 0.33 0.33 3.88 -0.06 \n", - "4 138-846B 0.43 0.43 4.14 -0.17 \n", + " event depth cr depth c. wuellerstorfi d13c u. peregrina d18o \\\n", + "0 138-846B 0.12 0.12 3.38 0.14 \n", + "1 138-846B 0.23 0.23 3.46 0.01 \n", + "2 138-846B 0.33 0.33 3.65 -0.10 \n", + "3 138-846B 0.33 0.33 3.88 -0.06 \n", + "4 138-846B 0.43 0.43 4.14 -0.17 \n", + "... ... ... ... ... ... \n", + "2178 NaN NaN NaN NaN NaN \n", + "2179 NaN NaN NaN NaN NaN \n", + "2180 NaN NaN NaN NaN NaN \n", + "2181 NaN NaN NaN NaN NaN \n", + "2182 NaN NaN NaN NaN NaN \n", + "\n", + " depth comp sampleID u. peregrina d13c c. wuellerstorfi d18o \n", + "0 12.0 138-846B-1H-1 NaN 0.12 \n", + "1 23.0 138-846B-1H-1 NaN 0.23 \n", + "2 33.0 138-846B-1H-1 NaN 0.33 \n", + "3 33.0 138-846B-1H-1 NaN 0.33 \n", + "4 43.0 138-846B-1H-1 NaN 0.43 \n", + "... ... ... ... ... \n", + "2178 NaN NaN NaN NaN \n", + "2179 NaN NaN NaN NaN \n", + "2180 NaN NaN NaN NaN \n", + "2181 NaN NaN NaN NaN \n", + "2182 NaN NaN NaN NaN \n", "\n", - " depth comp sampleID u. peregrina d13c c. wuellerstorfi d18o \n", - "0 12.0 138-846B-1H-1 NaN 0.12 \n", - "1 23.0 138-846B-1H-1 NaN 0.23 \n", - "2 33.0 138-846B-1H-1 NaN 0.33 \n", - "3 33.0 138-846B-1H-1 NaN 0.33 \n", - "4 43.0 138-846B-1H-1 NaN 0.43 " + "[2183 rows x 9 columns]" ] }, "metadata": {}, @@ -2051,57 +2102,108 @@ "100 rows × 4 columns
\n", "" ], "text/plain": [ - " age ukprime37 site depth\n", - "0 -0.758921 0.972003 -0.303637 -1.924070\n", - "1 1.342539 -0.431769 -0.798301 -0.234970\n", - "2 0.170522 -2.168300 -0.342608 0.884602\n", - "3 -0.067036 -0.709825 -0.127563 0.747706\n", - "4 -0.047366 -1.312118 -1.551063 -0.169749" + " age ukprime37 depth site\n", + "0 -1.174194 -1.621179 -1.500278 0.657777\n", + "1 1.616764 -2.597210 1.207618 -0.600126\n", + "2 1.142314 0.967484 0.162099 0.405003\n", + "3 -0.078857 0.788937 0.539651 0.222689\n", + "4 0.209523 -0.316014 0.446639 -1.742610\n", + ".. ... ... ... ...\n", + "95 1.975101 0.120740 -1.195272 0.912115\n", + "96 0.294207 0.054346 -1.671253 0.686821\n", + "97 -1.219347 0.182344 0.602834 1.015739\n", + "98 0.544827 -1.782732 -0.805124 -0.070031\n", + "99 2.556159 -0.280002 0.357622 0.177833\n", + "\n", + "[100 rows x 4 columns]" ] }, "metadata": {}, @@ -2114,8 +2216,8 @@ "Missing Value: NaN\n", "- age\n", "- ukprime37 [unitless]\n", - "- site [unitless]\n", "- depth [m]\n", + "- site/hole [unitless]\n", "- Paleo Table: paleo0measurement0.csv\n" ] }, @@ -2212,24 +2314,111 @@ "2183 rows × 9 columns
\n", "" ], "text/plain": [ - " c37 total temp muller deleteMe site section temp prahl ukprime37 \\\n", - "0 2.37 23.545 15-16 846B 1H-1 23.0 0.821 \n", - "1 2.10 23.648 25-26 846B 1H-1 23.1 0.824 \n", - "2 1.87 23.752 35-36 846B 1H-1 23.2 0.828 \n", - "3 2.74 22.515 45-46 846B 1H-1 22.0 0.787 \n", - "4 3.75 22.206 55-56 846B 1H-1 21.7 0.777 \n", + " c37 total temp muller deleteMe site section temp prahl ukprime37 \\\n", + "0 2.37 23.545 15-16 846B 1H-1 23.0 0.821 \n", + "1 2.10 23.648 25-26 846B 1H-1 23.1 0.824 \n", + "2 1.87 23.752 35-36 846B 1H-1 23.2 0.828 \n", + "3 2.74 22.515 45-46 846B 1H-1 22.0 0.787 \n", + "4 3.75 22.206 55-56 846B 1H-1 21.7 0.777 \n", + "... ... ... ... ... ... ... ... \n", + "2178 NaN NaN NaN NaN NaN NaN NaN \n", + "2179 NaN NaN NaN NaN NaN NaN NaN \n", + "2180 NaN NaN NaN NaN NaN NaN NaN \n", + "2181 NaN NaN NaN NaN NaN NaN NaN \n", + "2182 NaN NaN NaN NaN NaN NaN NaN \n", + "\n", + " age depth \n", + "0 5.228 0.16 \n", + "1 8.947 0.26 \n", + "2 11.966 0.36 \n", + "3 14.427 0.46 \n", + "4 16.502 0.56 \n", + "... ... ... \n", + "2178 NaN NaN \n", + "2179 NaN NaN \n", + "2180 NaN NaN \n", + "2181 NaN NaN \n", + "2182 NaN NaN \n", "\n", - " age depth \n", - "0 5.228 0.16 \n", - "1 8.947 0.26 \n", - "2 11.966 0.36 \n", - "3 14.427 0.46 \n", - "4 16.502 0.56 " + "[2183 rows x 9 columns]" ] }, "metadata": {}, @@ -2269,7 +2458,7 @@ " \n", " # Can get the dataframe for the whole table\n", " df = table.getDataFrame(use_standard_names=True)\n", - " display(df.head())\n", + " display(df)\n", "\n", " # The returned dataframe also contains the attributes for the variables\n", " for varname in df.attrs:\n", @@ -2294,7 +2483,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -2319,13 +2508,13 @@ "\n", "# Set the name of the dataset\n", "dataset1.setName(\"TestDataset.2024\")\n", - "dataset1.id = dataset1.ns + \"/\" + dataset1.getName()\n", + "dataset1.id = dataset1.ns + \"/\" + dataset1.getName() # ** IMPORTANT **\n", "\n", "# Set collection name\n", "dataset1.setCollectionName(\"TestCollection\")\n", "\n", "# Set the Archive Type (from a list of constants)\n", - "dataset1.setArchiveType(ArchiveTypeConstants.Coral)\n", + "dataset1.setArchiveType(ArchiveTypeConstants.MarineSediment)\n", "\n", "# Add a publication\n", "pub1 = Publication()\n", @@ -2456,7 +2645,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -2496,28 +2685,28 @@ " \n", "