Skip to content

Borehole

Borehole

Bases: BaseModel

An Antarctic borehole with location, metadata, and data URLs.

Attributes:

Name Type Description
name str

Short identifier for the borehole.

location str

Human-readable location description.

region Literal['East', 'West']

East or West Antarctica.

start_year int | None

First year the borehole was drilled, or None if unknown.

end_year int | None

Last year the borehole was drilled, or None if unknown.

type str

Borehole type descriptor.

lat float

Latitude in decimal degrees.

lon float

Longitude in decimal degrees.

ice_thickness float

Ice thickness at the borehole in meters.

drilled_depth float

Depth drilled in meters.

original_publication str

Citation for the original data publication.

has_temperature Annotated[bool, BeforeValidator(parse_bool)]

Whether temperature data is available.

has_chemistry Annotated[bool, BeforeValidator(parse_bool)]

Whether chemistry data is available.

has_conductivity Annotated[bool, BeforeValidator(parse_bool)]

Whether conductivity data is available.

has_grain_size Annotated[bool, BeforeValidator(parse_bool)]

Whether grain size data is available.

temperature_data_url str | None

URL to the temperature CSV, if available.

chemistry_data_url str | None

URL to the chemistry CSV, if available.

grainsize_data_url str | None

URL to the grain size CSV, if available.

from_csv(text, client=None) classmethod

Parses borehole locations from CSV text and attaches data URLs.

Parameters:

Name Type Description Default
text str

Raw CSV content with borehole location data.

required
client Client | None

Optional client for fetching data URLs. Creates a default client if not provided.

None

Returns:

Type Description
list[Borehole]

A list of Borehole instances with data URLs populated.

to_feature()

Converts this borehole to a GeoJSON Feature.

Returns:

Type Description
Feature

A GeoJSON Feature with a Point geometry and borehole properties.

to_feature_collection(boreholes) classmethod

Converts a list of boreholes to a GeoJSON FeatureCollection.

Parameters:

Name Type Description Default
boreholes list[Borehole]

The boreholes to convert.

required

Returns:

Type Description
FeatureCollection

A GeoJSON FeatureCollection with one Point feature per borehole.

to_point()

Converts this borehole's location to a GeoJSON Point.

Returns:

Type Description
Point

A GeoJSON Point at the borehole's longitude and latitude.

parse_bool(value)

Parses a value to bool, treating "NaN" as False.

Parameters:

Name Type Description Default
value Any

The value to parse.

required

Returns:

Type Description
bool

False if the value is "NaN", otherwise bool(value).