DOI: 10.5061/dryad.qnk98sfsh
title: Data and scripts from: Shark fossil localities, in diving deeper: Leveraging the chondrichthyan fossil record to investigate environmental, ecological, and biological change

description: The extensive chondrichthyan fossil record spans 400+ million years and
 has a global distribution. Paleontological studies provide a foundation of
 description and taxonomy to support deeper forays into ecology and
 evolution considering geographic, morphologic, and functional changes
 through time with non-analogue species and climate states. Although
 chondrichthyan teeth are most studied, analyses of dermal denticle metrics
 and soft tissue imprints are increasing. Recent methodological advances in
 morphology and geochemistry are elucidating fine-scale details, whereas
 large datasets and ecological modeling are broadening taxonomic, temporal,
 and geographic perspective. The combination of ecological metrics and
 modeling with environmental reconstruction and climate simulations are
 opening new horizons to explore form and function, demographic dynamics,
 and food web structure in ancient marine ecosystems. Ultimately, the
 traits and taxa that endured or perished during the many catastrophic
 upheaval events in Earth’s history contribute to conservation
 paleobiology, which is a much-needed perspective for extant
 chondrichthyans. 
description: The Paleobiology Database download was performed on February 3,
 2024 using the following query: http://paleobiodb.org/data1.2/occs/list.csv?datainfo&rowcount&base_name=Chondrichthyes&pgm=gplates,scotese,seton&show=full,classext,genus,subgenus,acconly,ident,img,etbasis,strat,lith,env,timebins,timecompare,resgroup,ref,ent,entname,crmod.  We refined data to match the cleaning protocols designed by E. Sibert for Whitenack, Lisa B., Sora L. Kim, and Elizabeth C. Sibert. "Bridging the gap between chondrichthyan paleobiology and biology." In <em>Biology of Sharks and Their Relatives</em>, pp. 1-29. CRC Press, 2022 and is in “chond.occurrences.csv”. We use the following broad taxonomic groupings: Stem Chondrichthyan, Stem Holocephali, Holocephali, Hybodonta, Selachii, and Batomorphii. Groups for each order are found in the file “groups_order.csv”. We use the following time periods: Paleozoic, Mesozoic, and Cenozoic. We cleaned up the intervals and assign time periods found in the file “time.csv”. We ignore occurrences for which we cannot assign a group. We also ignore occurrences without obvious site-level metadata. We additionally remove obvious taxonomic and site errors. Localities can be in multiple time periods if their earliest interval to latest interval spans two time periods. For example, the Takatika Grit Formation in New Zealand spans the Campanian (83.6 Mya, Mesozoic) to the Middle Paleocene (58.7 Mya, Cenozoic). The script to clean the data and tally localities based on taxonomic group and time period is “shark_localities_AREPS.R”.
description: # Data and scripts from: Shark fossil localities, in diving deeper:
 leveraging the chondrichthyan fossil record to investigate environmental,
 ecological, and biological change
 [https://doi.org/10.5061/dryad.qnk98sfsh](https://doi.org/10.5061/dryad.qnk98sfsh) ## Description of the data and file structure The Paleobiology Database download was performed on February 3, 2024 using the following query: [http://paleobiodb.org/data1.2/occs/list.csv?datainfo&rowcount&base_name=Chondrichthyes&pgm=gplates,scotese,seton&show=full,classext,genus,subgenus,acconly,ident,img,etbasis,strat,lith,env,timebins,timecompare,resgroup,ref,ent,entname,crmod](http://paleobiodb.org/data1.2/occs/list.csv?datainfo&rowcount&base_name=Chondrichthyes&pgm=gplates,scotese,seton&show=full,classext,genus,subgenus,acconly,ident,img,etbasis,strat,lith,env,timebins,timecompare,resgroup,ref,ent,entname,crmod "http://paleobiodb.org/data1.2/occs/list.csv?datainfo&rowcount&base_name=Chondrichthyes&pgm=gplates,scotese,seton&show=full,classext,genus,subgenus,acconly,ident,img,etbasis,strat,lith,env,timebins,timecompare,resgroup,ref,ent,entname,crmod").  We refined data to match the cleaning protocols designed by E. Sibert for Whitenack, Lisa B., Sora L. Kim, and Elizabeth C. Sibert. "Bridging the gap between chondrichthyan paleobiology and biology." In *Biology of Sharks and Their Relatives*, pp. 1-29. CRC Press, 2022 and is in “chond.occurrences.csv”. We use the following broad taxonomic groupings: Stem Chondrichthyan, Stem Holocephali, Holocephali, Hybodonta, Selachii, and Batomorphii. Groups for each order are found in the file “groups_order.csv”. We use the following time periods: Paleozoic, Mesozoic, and Cenozoic. We cleaned up the intervals and assign time periods found in the file “time.csv”. We ignore occurrences for which we cannot assign a group. We also ignore occurrences without obvious site-level metadata. We additionally remove obvious taxonomic and site errors. Localities can be in multiple time periods if their earliest interval to latest interval spans two time periods. For example, the Takatika Grit Formation in New Zealand spans the Campanian (83.6 Mya, Mesozoic) to the Middle Paleocene (58.7 Mya, Cenozoic). The script to clean the data and tally localities based on taxonomic group and time period is “shark_localities_AREPS.R”. ### Files and variables **File: chond.occurrences.csv** **Description:** List of occurrences for which dates and taxonomy are correct. The routine for this is designed by E. Sibert for Whitenack, Lisa B., Sora L. Kim, and Elizabeth C. Sibert. "Bridging the gap between chondrichthyan paleobiology and biology." In *Biology of Sharks and Their Relatives*, pp. 1-29. CRC Press, 2022  **Variables** * oid: Identifier for that collection. * idn: Identified name. **File: groups_order.csv** **Description:**  A file that matches a taxonomic Order to one of the following groups: Stem Chondrichthyan, Stem Holocephali, Holocephali, Hybodonta, Selachii, or Batomorphii. **Variables** * Order: A file matching taxonomic order within Elasmobranchs. * group: Grouping with an alphabetical identifier (e.g., e_Selachii) for sorting. * group2: Grouping without an alphabetical identifier (e.g., Selachii). **File: time.csv** **Description:** A file matching intervals to the following time periods: Paleozoic, Mesozoic, and Cenozoic. **Variables** * interval: Geologic time interval of an occurrence. * zoic: Paleozoic, Mesozoic, or Cenozoic. ## Code/software **Setup** Follow these steps to set up the project: **Download all files:** 1. Download the the data and software files.  **Set up environment:** 1. Put all files in a folder. 2. Open up R. Set working directory to folder with all files and scripts. 3. Open up the script, "shark_localities_AREPS.R". 4. Install any packages not already in your library. Specifically,* dplyr* (v1.1.4),* tidyr* (v1.3.1), and* reshape2* (v1.4.4).  **Run the code:** 1. The first section, load packages, loads the required libraries. 2. The second section, load data, loads the data for the data manipulation and analysis. 3. The third section, merge and manipulate data, merges the files from the PaleoBioDB download (we used "chondrichthyes_pbdb_data_3Feb2024.csv" but provide the query above) with the cleaned occurrence data (chond.occurrences.csv) together. 4. The fourth section, assign groupings, matches the orders from the PaleoBioDB download to those in a matching file (groups_order.csv). 5. The fifth section, what is missing, goes through the unassigned occurrences. All notes for decisions are commented throughout this section. 6. The sixth section, assign time, matches the time intervals to a matching file (time.csv). 7. The seventh section, make locality and lagerstätten df, creates a column "unique_form" to assign unique localities to occurrences. This includes cleaning locality names (subsection clean locality names) and checking known lagerstätten (subsection check known lagerstatten). All notes for decisions are commented throughout this section. 8. The eighth section, count localities per time and per group, is where the number of unique localities per time period are tallied. A new column, lager, is created to denote if the unique_form includes a lagerstätten or not. All occurrences without assigned groups or unique formations are removed. 1. Three subsets are created: one for counts of Paleozoic localities per group (num.loc.paleo), one for counts of Mesozoic localities per group (num.loc.meso), and one for Cenozoic localities per group (num.loc.ceno). 9. The ninth section, notes, is a space with additional notes for decisions made. **Access information** Other publicly accessible locations of the data: * paleobiodb.org Data was derived from the following sources: * paleobiodb.org ## Access information Other publicly accessible locations of the data: * paleobiodb.org Data was derived from the following sources: * paleobiodb.org