Other
Time intervals and scales
PaleobiologyDB.pbdb_interval — Function
pbdb_interval(; kwargs...)Get information about a single geologic time interval, selected by name or id.
Arguments
kwargs...: One of the following must be provided (but not both):name: Interval name (e.g. "Miocene").id: PBDB interval identifier.
vocab: Set to "pbdb" to return full field names (default for text formats).order: Return the interval in a specific order (rarely used here; see PBDB docs).
Returns
A DataFrame describing the selected interval.
Examples
pbdb_interval(name = "Miocene")
pbdb_interval(id = 1)PaleobiologyDB.pbdb_intervals — Function
pbdb_intervals(; kwargs...)Get information about multiple geologic time intervals.
Arguments
kwargs...: Filtering and output parameters. Common options include:min_ma: Return only intervals at least this old (Ma).max_ma: Return only intervals at most this old (Ma).order: Return intervals in the requested order (e.g. "age" or "name").vocab: Field naming vocabulary ("pbdb" for full names).
Returns
A DataFrame with the selected intervals.
Examples
pbdb_intervals(min_ma = 0, max_ma = 5)PaleobiologyDB.pbdb_scale — Function
pbdb_scale(id; kwargs...)Get information about a single time scale, selected by identifier.
Arguments
id: PBDB scale identifier (required).kwargs...: Additional parameters, e.g.:vocab: Set to "pbdb" to return full field names.
Returns
A DataFrame with information about the requested time scale.
Examples
pbdb_scale(1)PaleobiologyDB.pbdb_scales — Function
pbdb_scales(; kwargs...)Get information about multiple time scales.
Arguments
kwargs...: Optional parameters, e.g.:vocab: Set to "pbdb" to return full field names.
Returns
A DataFrame listing the requested time scales (or all, if no filter provided).
Examples
pbdb_scales()Stratigraphy
PaleobiologyDB.pbdb_strata — Function
pbdb_strata(; kwargs...)Get information about geological strata, selected by name, rank, and/or geography.
Arguments
kwargs...: Filtering and output parameters. Common options include:name: Full or partial name (wildcards%and_allowed).rank: One of "formation", "group", or "member".lngmin,lngmax,latmin,latmax: Bounding box (if you provide one oflngmin/latmin, you must provide the paired max).loc: WKT geometry string to constrain by polygon/geometry.vocab: Set to "pbdb" to return full field names (default for text formats).
Returns
A DataFrame with strata records matching the query.
Examples
pbdb_strata(rank = "formation", lngmin = -120, lngmax = -100, latmin = 30, latmax = 50)PaleobiologyDB.pbdb_strata_auto — Function
pbdb_strata_auto(; kwargs...)Autocomplete: list of strata matching a given prefix or partial name.
Arguments
kwargs...: Common options include:name: Prefix or partial name (≥ 3 significant characters). May end with a space +gorfto hint at group/formation.rank: Optional rank filter ("formation" or "group").lngmin,lngmax,latmin,latmax: Optional bounding box to constrain suggestions.limit: Maximum number of matches.
Returns
A DataFrame of matching stratum names, ranks, and occurrence counts (JSON endpoint is converted to DataFrame).
Examples
pbdb_strata_auto(name = "Pin")References
The reference functions retrieve bibliographic data associated with taxa, occurrences, or collections, and can fetch a specific reference record directly.
# References for a taxon group
refs = pbdb_ref_taxa(name = "Canidae", show = ["both", "comments"])
# References cited in occurrence records
occ_refs = pbdb_ref_occurrences(base_name = "Canis", ref_pubyr = 2000)
# A specific reference record
ref_detail = pbdb_reference(1003, show = "both")PaleobiologyDB.pbdb_reference — Function
pbdb_reference(id; kwargs...)Get information about a single bibliographic reference.
Arguments
id: Reference identifier (required).kwargs...: Additional parameters, for example:vocab: Set to "pbdb" to use full field names.show: Extra information blocks (e.g. "counts" to report numbers of taxa/opinions/occurrences/specimens; "both" to include both formatted reference and individual fields).
Returns
A DataFrame with information about the requested reference.
Examples
pbdb_reference(1003; show = "both")PaleobiologyDB.pbdb_references — Function
pbdb_references(; kwargs...)Get information about multiple bibliographic references.
Arguments
kwargs...: Filtering and output parameters. Common options include:ref_author: Match on author last name(s).ref_pubyr: Publication year.pub_title: Publication title.order: Sort order; one or more of "author", "pubyr", "reftitle", "pubtitle", "pubtype", "created", "modified", "rank", with optional ".asc"/".desc" suffix.vocab: Set to "pbdb" for full field names.
Returns
A DataFrame with references matching the query.
Examples
pbdb_references(ref_author = "Polly")Opinions
PaleobiologyDB.pbdb_opinion — Function
pbdb_opinion(id; kwargs...)Get information about a single taxonomic opinion.
Arguments
id: Identifier of the opinion (required).kwargs...: Additional parameters, for example:vocab: Set to"pbdb"to return full field names.show: Extra information blocks (e.g."basis","entname","refattr").
Returns
A DataFrame with the requested opinion.
Examples
pbdb_opinion(1000; show = "full")PaleobiologyDB.pbdb_opinions — Function
pbdb_opinions(; kwargs...)Get information about multiple taxonomic opinions.
Arguments
kwargs...: Filtering options. Common parameters include:id: One or more opinion identifiers.op_author: Filter by opinion author name(s).ops_created_before,ops_created_after: Date/time filters.op_type: Opinion type filter ("all","class","valid","accepted","junior","invalid").vocab: Vocabulary for field names.
Returns
A DataFrame with opinions matching the query.
Examples
pbdb_opinions(op_pubyr = 1818)Counting
PaleobiologyDB.pbdb_count — Function
pbdb_count(endpoint; kwargs...) -> Union{Int, Missing}Return the total number of records matching a query without downloading the records themselves.
Internally issues the query with limit=0 and format=json, then reads the records_found field from the PBDB JSON response envelope. This is fast because no record data is transferred.
Arguments
endpoint: PBDB path such as"occs/list","colls/list", etc.base_url: Override the default base URL.readtimeout: HTTP read timeout in seconds (default 300).retries: Number of retries on failure (default 3).kwargs...: Any PBDB filter parameters (same aspbdb_query).
Returns
An Int with the total number of matching records, or missing if the API does not return a records_found field for the given endpoint.
Examples
pbdb_count("occs/list"; base_name = "Canidae")
pbdb_count("colls/list"; interval = "Miocene", cc = "ASI")pbdb_count(resource::Symbol; kwargs...) -> Union{Int, Missing}Return the total number of records for the given resource type without downloading the records themselves.
resource must be one of: collections, occurrences, opinions, references, specimens, taxa.
Examples
pbdb_count(:occurrences; base_name = "Canidae")
pbdb_count(:collections; interval = "Miocene", cc = "ASI")
# Dynamic dispatch and splatting work:
params = Dict(:base_name => "Canidae")
pbdb_count(:occurrences; params...)