RDE Model
This module contains all Research Data Entity classes and supporting types for working with TimeAtlas data.
Type Aliases
The module defines several type aliases for improved code readability:
- timeatlas.RDEModel.GeometryType
Union type for all supported Shapely geometry types in the Time Atlas data model.
- timeatlas.RDEModel.UUID
String representation of a Universal Unique Identifier (UUID).
- timeatlas.RDEModel.ObsReference
Reference to an Observation entity, either as an object or UUID string.
- timeatlas.RDEModel.HRReference
Reference to a HistoricalRecord entity, either as an object or UUID string.
- timeatlas.RDEModel.DatasetReference
Reference to a Dataset entity, either as an object or UUID string.
- timeatlas.RDEModel.POIReference
Reference to a PointOfInterest entity, either as an object or UUID string.
- timeatlas.RDEModel.GeometryReference
Reference to a Geometry entity, either as an object or UUID string.
- timeatlas.RDEModel.AreaReference
Reference to an Area entity, either as an object or UUID string.
- timeatlas.RDEModel.LayerReference
Reference to a Layer entity, either as an object or UUID string.
- timeatlas.RDEModel.MapReference
Reference to a Map entity, either as an object or UUID string.
Base Classes
- class timeatlas.RDEModel.UUIDEntity[source]
Bases:
objectBase class for entities that have a unique identifier.
All Research Data Entities (RDE) in the Time Atlas data model have a unique UUID generated from a UUIDv5 algorithm with a custom dataset-based namespace and a deterministic identifier from the data.
- id
Universal unique identifier of the resource when provided to the constructor, it can be either a valid UUID string, a uuid.UUID object, or a tuple of (UUIDManager, value) to generate a deterministic UUID based on the manager’s namespace and the provided value. If no ID is provided, a random UUID will be generated.
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- get_ref()[source]
Return the UUID reference of this entity.
- Returns:
The UUID string of this entity
- Return type:
- classmethod parse_uuid(data_id)[source]
Parse a UUID from various formats.
In the API, unique IDs are often represented as URLs, but in the data model we keep only the UUID part. This method extracts the UUID from URL format.
- Parameters:
data_id (str) – The ID to parse, either as a UUID string or URL containing UUID
- Returns:
The parsed UUID string
- Return type:
None
- class timeatlas.RDEModel.RDE[source]
Bases:
objectBase class for all Research Data Entities (RDE) in the Time Atlas data model.
Provides common serialization and type handling methods for all RDE types. All RDE instances are related using numerical identifiers (UUIDs), which are transformed into URLs when ingested in the backend.
- to_dict(exclude_fields={})[source]
Convert the RDE instance to a dictionary representation.
Handles proper serialization of nested RDE objects, enums, and special types like MultiLingualValue and RDETimeRange. Automatically adds the rde_type field for main RDE entities.
- Parameters:
exclude_fields – Set of field names to exclude from the output dictionary
- Returns:
Dictionary representation of the RDE instance
- Return type:
- get_type()[source]
Get the RDE type enum value for this entity.
- Returns:
The RDEType enum value or None if not a main RDE type
- Return type:
RDEType | None
- classmethod constructor_from_json_obj(json_obj)[source]
Construct an RDE instance from a JSON object.
This method should be implemented in subclasses to handle specific deserialization logic for each RDE type.
- Parameters:
json_obj (dict) – Dictionary containing the RDE data
- Returns:
An instance of the RDE subclass
- Raises:
NotImplementedError – If not implemented in subclass
- Return type:
- __init__()
- Return type:
None
Core RDE Entities
- class timeatlas.RDEModel.Dataset[source]
Bases:
RDE,UUIDEntityA homogeneous collection of information ingested in the Time Machine system.
Represents the link between research data and its numerical expression and exploitation. Allows users to access meta/paradata on the dataset level. The entity is tied to operational configuration describing how the entities forming the dataset should be handled and served.
- id
Universal unique identifier of the dataset
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- name
Multilingual short title displayed as header in the frontend
- time_range
Temporal range of the dataset’s existence
- has_areas
References to areas the dataset is related to
- Type:
list[timeatlas.RDEModel.AreaReference] | None
- configuration
Metadata configuration for HRs from this dataset
- metadata
List of free-form metadata fields for contextual information
- hrs
List of Historical Records in this dataset (processing only)
- obs
List of Observations in this dataset (processing only)
- name: MultiLingualValue
- time_range: RDETimeRange
- has_areas: list[AreaReference] | None
- configuration: DatasetConfiguration
- metadata: list[FreeFormMetadata]
- hrs: list[HistoricalRecord]
- obs: list[Observation]
- to_dict(exclude_fields={'hrs', 'obs'})[source]
Convert to dictionary representation.
- Parameters:
exclude_fields – Fields to exclude (defaults to processing-only fields)
- Returns:
Dictionary representation with serialized nested objects
- Return type:
- instantiate_all_rde_members(rde_list)[source]
Populate the hrs and obs lists from a list of RDE entities.
Helper method for processing that adds all HRs and Observations belonging to this dataset to the internal lists.
- __init__(id, slug, name, time_range, creation_time=None, version=None, sources=<factory>, has_areas=<factory>, configuration=<factory>, metadata=<factory>, hrs=<factory>, obs=<factory>)
- Parameters:
slug (str)
name (MultiLingualValue)
time_range (RDETimeRange)
creation_time (str | None)
version (str | None)
has_areas (list[AreaReference] | None)
configuration (DatasetConfiguration)
metadata (list[FreeFormMetadata])
hrs (list[HistoricalRecord])
obs (list[Observation])
- Return type:
None
- class timeatlas.RDEModel.HistoricalRecord[source]
Bases:
RDE,UUIDEntityA single “atom” of knowledge from a historical document.
An Historical Record represents a record of information about a place, location, or set of people found from a historical document. It is the source from which any information accessible through the Time Machine projects comes from. Examples: a census entry, a parcel listing row, a sentence from a research book, a photograph depicting an urban space.
The granularity should be as precise as possible, with the source URL ideally being a IIIF annotation of the information from a document’s scan.
- id
Universal unique identifier of the historical record
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- dataset
Reference to the dataset this HR belongs to
- time_range
Temporal range of the record’s existence
- paradata
How the data was acquired (manual, semi-automatic, automatic)
- Type:
timeatlas.TAEnums.ParadataValues
- has_observations
List of observations documented in this historical source
- dataset: DatasetReference
- time_range: RDETimeRange
- paradata: ParadataValues
- has_observations: list[ObsReference]
- classmethod constructor_from_json_obj(json_obj)[source]
Construct a HistoricalRecord from a JSON object.
- actualize_observations_references(entity_list)[source]
Replace observation UUID references with actual Observation objects.
- classmethod constructor_from_dataframe_row(row)[source]
Construct a HistoricalRecord from a pandas DataFrame row.
Automatically extracts metadata fields from columns not used by core attributes.
- __init__(id, dataset, time_range, paradata, has_observations, metadata=<factory>, rights_attribution=None)
- Parameters:
dataset (DatasetReference)
time_range (RDETimeRange)
paradata (ParadataValues)
has_observations (list[ObsReference])
metadata (dict)
rights_attribution (str | None)
- Return type:
None
- class timeatlas.RDEModel.Observation[source]
Bases:
RDE,UUIDEntityThe space-time representation of information recorded in a historical source.
An Observation is tied to a single point of physical space represented by a single latitude and longitude. It can be a physical location (e.g., cadastral parcel) or an event (e.g., apprenticeship). It serves as a pivot entity linking Historical Records, Points of Interest, and Geometries.
A single HR can hold multiple Observations (e.g., a postcard showing multiple identified landmarks, where each landmark gets a dedicated Observation).
- id
Universal unique identifier of the observation
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- historical_record
Reference to the HR that attests to this observation’s existence
- geometry
GPS coordinates of the observation as a Shapely Point
- has_geometries
List of geometry entities tied to this observation
- part_of_point_of_interest
Optional reference to the associated POI
- Type:
- historical_record: HRReference
- has_geometries: list[GeometryReference]
- part_of_point_of_interest: POIReference | None = None
- classmethod constructor_from_json_obj(json_obj)[source]
Construct an Observation from a JSON object.
Handles both standard JSON and GeoJSON Feature formats.
- __init__(id, historical_record, geometry, has_geometries=<factory>, part_of_point_of_interest=None)
- Parameters:
historical_record (HRReference)
geometry (Point)
has_geometries (list[GeometryReference])
part_of_point_of_interest (POIReference | None)
- Return type:
None
- class timeatlas.RDEModel.PointOfInterest[source]
Bases:
RDE,UUIDEntityA point that has been observed by one or many observations.
Points of Interest are what have been observed and relate to coordinate handles of observations to place on a map. They can be pointed to by multiple Observations from different datasets, acting as an aggregate by virtue of having observations located on the same exact coordinate space.
- id
Universal unique identifier of the POI
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- geometry
GPS coordinates of the POI as a Shapely Point
- height
Elevation information (terrain and building height) in meters
- height: HeightInfo
- class timeatlas.RDEModel.Geometry[source]
Bases:
RDE,UUIDEntityMathematical representation of a physical location as GPS coordinates.
Represents geographical areas tied to an Observation and Historical Record. Can represent parcels, buildings, streets, courtyards, parishes, or any arbitrary zone. Can also exist without being referenced by a record, existing only as part of a vector Layer.
- id
Universal unique identifier of the geometry
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- geometry
Shapely geometry object (Point, LineString, Polygon, Multi*)
- part_of_layer
Optional reference to the layer this geometry belongs to
- Type:
- Raises:
ValueError – If the geometry is not valid according to Shapely validation
- __init__(id, geometry, part_of_layer=None)
- Parameters:
geometry (GeometryType)
part_of_layer (LayerReference | None)
- Return type:
None
- geometry: GeometryType
- part_of_layer: LayerReference | None = None
- classmethod constructor_from_json_obj(json_obj)[source]
Construct a Geometry from a JSON object.
Handles GeoJSON Feature format where properties and geometry are separate.
Map & Layer Entities
- class timeatlas.RDEModel.Map[source]
Bases:
RDE,UUIDEntityA group of geographical layers stemming from a single historical map.
Represents a historical map from which users can freely select layers to display in the interface. Each map contains one or more layers (raster or vector) that can be toggled on/off.
- id
Universal unique identifier of the map
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- name
Multilingual short title displayed as header in the frontend
- time_range
Temporal range of the map’s existence
- layers
List of layer entities derived from this map
- metadata
List of free-form metadata fields for contextual information
- areas
References to areas the map is related to (must have at least one)
- name: MultiLingualValue
- time_range: RDETimeRange
- layers: list[LayerReference]
- metadata: list[FreeFormMetadata]
- areas: list[AreaReference]
- to_dict(exclude_fields={})[source]
Convert to dictionary representation.
- Parameters:
exclude_fields – Set of field names to exclude
- Returns:
Dictionary representation with serialized nested objects
- Return type:
- __init__(id, name, slug, time_range, layers=<factory>, metadata=<factory>, thumbnail=None, version=None, areas=<factory>)
- Parameters:
name (MultiLingualValue)
slug (str)
time_range (RDETimeRange)
layers (list[LayerReference])
metadata (list[FreeFormMetadata])
thumbnail (str | None)
version (str | None)
areas (list[AreaReference])
- Return type:
None
- class timeatlas.RDEModel.Layer[source]
Bases:
RDE,UUIDEntityA synthetic derivation from a map (raster or vector).
Represents an abstraction of objects that users can manipulate to display as a 2D planar field in the interface. Can be either a vectorization of specific content from a map or the actual digital facsimile of the map.
- id
Universal unique identifier of the layer
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- name
Multilingual short title displayed in the frontend
- description
Brief multilingual description displayed in overlay choices
- time_range
Temporal range of the layer’s existence
- map
Reference to the map this layer is part of
- type
Layer type (RASTER: image tiles, VECTOR: geometry entities)
- layer_configurations
List of configurations for accessing this layer
- name: MultiLingualValue
- description: MultiLingualValue
- time_range: RDETimeRange
- map: MapReference
- layer_configurations: list[LayerConfiguration]
- to_dict(exclude_fields={})[source]
Convert to dictionary representation.
- Parameters:
exclude_fields – Set of field names to exclude
- Returns:
Dictionary representation with serialized layer configurations
- __init__(id, slug, name, description, time_range, map, type, layer_configurations=<factory>)
- Parameters:
slug (str)
name (MultiLingualValue)
description (MultiLingualValue)
time_range (RDETimeRange)
map (MapReference)
type (LayerType)
layer_configurations (list[LayerConfiguration])
- Return type:
None
- class timeatlas.RDEModel.LayerConfiguration[source]
Bases:
RDE,UUIDEntityConfiguration describing how a layer is served and accessed.
Defines the technical details for how the frontend can access and display a layer, including service endpoints, zoom levels, and spatial extent.
- id
Universal unique identifier of the layer configuration
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- service
Service configuration (URL and type) for accessing tiles
- extent
Optional bounding box boundary of the layer
- Type:
- service: LayerConfigurationService
- extent: GeographicalExtent | None = None
- classmethod constructor_from_json_obj(json_obj)[source]
Construct a LayerConfiguration from a JSON object.
- to_dict(exclude_fields={})[source]
Convert to dictionary representation.
- Parameters:
exclude_fields – Set of field names to exclude
- Returns:
Dictionary representation with serialized service and extent
- __init__(id, service, min_zoom_level, max_zoom_level, extent=None)
- Parameters:
service (LayerConfigurationService)
min_zoom_level (int)
max_zoom_level (int)
extent (GeographicalExtent | None)
- Return type:
None
Geographic Entities
- class timeatlas.RDEModel.Area[source]
Bases:
RDE,UUIDEntityThe boundary of a specific geographical entity.
Represents geographical boundaries of continents, countries, cities, or ad-hoc administrative zones. Used to index maps and datasets to curated areas in the Time Atlas, enabling spatial filtering and organization.
- id
Universal unique identifier of the area
- Type:
timeatlas.RDEModel.UUID | str | tuple[timeatlas.RDEModel.UUIDManager, str] | None
- name
Multilingual name of the geographical entity
- geometry
Shapely geometry object representing the boundary (typically Polygon)
- __init__(id, slug, name, geometry)
- Parameters:
slug (str)
name (MultiLingualValue)
geometry (GeometryType)
- Return type:
None
- name: MultiLingualValue
- geometry: GeometryType
- class timeatlas.RDEModel.GeographicalExtent[source]
Bases:
objectBounding box representing the geographical extent of a map or layer.
Stores the boundary coordinates in [min_x, min_y, max_x, max_y] format, representing the spatial limits of a geographical entity.
- Raises:
AssertionError – If coordinates don’t meet format requirements
Configuration & Metadata
- class timeatlas.RDEModel.DatasetConfiguration[source]
Bases:
RDEOperational configuration for a Dataset.
Describes how the Historical Records in a dataset should be handled and served through the information system. Includes metadata field configurations and display settings for the frontend.
- metadata_field_config
List of configurations for each metadata field in HRs
- metadata_field_config: list[MetadataFieldConfig]
- classmethod constructor_from_json_obj(json_obj)[source]
Construct a DatasetConfiguration from a JSON object.
- class timeatlas.RDEModel.MetadataFieldConfig[source]
Bases:
RDEConfiguration for a metadata field in a Historical Record.
Describes how the frontend and/or backend should manipulate values recorded in the HR’s metadata property. Each field configuration specifies display properties, data type, indexing behavior, and semantic tags.
- type
The data type of the metadata field (STRING, INTEGER, FLOAT, LIST, URL)
- Type:
timeatlas.TAEnums.MetadataType | None
- display_label
Multilingual label to display next to the value in the frontend
Whether the field should not be displayed to normal users
- Type:
- tag
Broad category for this field (PEOPLE, PLACE, LAND_USE) for facet search
- Type:
- paradata
How the data was acquired/produced for this specific field
- Type:
timeatlas.TAEnums.ParadataValues | None
- display_label: MultiLingualValue
- tag: MetadataTag | None = None
- classmethod constructor_from_json_obj(json_obj)[source]
Construct a MetadataFieldConfig from a JSON object.
- __init__(id, type=None, display_label=<factory>, nullable=True, indexable=False, short_display=False, hidden=False, tag=None, paradata=None)
- Parameters:
id (str)
type (MetadataType | None)
display_label (MultiLingualValue)
nullable (bool)
indexable (bool)
short_display (bool)
hidden (bool)
tag (MetadataTag | None)
paradata (ParadataValues | None)
- Return type:
None
- class timeatlas.RDEModel.FreeFormMetadata[source]
Bases:
RDEFree-form metadata field for Datasets and Maps.
Holds arbitrary contextual information that relates to a Dataset or Map. Both the label and value are specified as multilingual entities since they are arbitrary and need localization support.
- type
The metadata type (STRING, INTEGER, FLOAT, LIST, URL)
- Type:
timeatlas.TAEnums.MetadataType
- label
Multilingual label for the metadata field
- value
Multilingual value for the metadata field
- type: MetadataType
- label: MultiLingualValue
- value: MultiLingualValue
- to_dict()[source]
Convert to dictionary representation.
- Returns:
Dictionary with type as string value and multilingual label/value
- __init__(type, label, value)
- Parameters:
type (MetadataType)
label (MultiLingualValue)
value (MultiLingualValue)
- Return type:
None
- class timeatlas.RDEModel.MultiLingualValue[source]
Bases:
objectContainer for multilingual text values following IIIF format.
Stores text that can be expressed in multiple languages, similar to the IIIF format for multilingual descriptions. Each language can have multiple values.
- values
Dictionary mapping language codes (2-3 letters) to lists of text values Example: {“en”: [“English text”], “fr”: [“Texte français”]}
Supporting Classes
- class timeatlas.RDEModel.RDETimeRange[source]
Bases:
objectRepresents a temporal range for RDE entities.
Datetime values formatted as ISO 8601 strings representing the range of time existence for an RDE, denoting the starting and ending points. Used by Historical Records, Datasets, Maps, and Layers.
- Raises:
ValueError – If datetime format is invalid
AssertionError – If start_time is greater than end_time
- class timeatlas.RDEModel.HeightInfo[source]
Bases:
objectElevation information for Points of Interest.
Stores elevation data separated between terrain and building height, both expressed in meters. This information is typically referenced from Maptiler’s Database and is used by the interface to correctly place POIs in 3D vision mode.