Commit ad52320f authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

feat: Initial addition of DataReadinessLevel and DataProcessingLevel enums

parent 9bc15821
Loading
Loading
Loading
Loading
Loading
+95 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@ use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};

/// Description of obstacles to shared access
///
/// Data availability is strongly related to the concept of "openness" and the "presumed open principle" for data.
///
/// Where openness is characterized as open, public, shared, or closed, availability takes a more direct approach to
/// describing the actual availability of data, which may be open but still unavailable due to other factors
/// (e.g., technical barriers, legal barriers, etc.).
#[derive(Clone, Debug, Default, Deserialize_repr, Display, Serialize_repr, PartialEq, PartialOrd, JsonSchema)]
#[repr(u8)]
#[serde(deny_unknown_fields)]
@@ -47,6 +53,95 @@ pub enum Data {
    /// Opaque data artifact
    Model(Model),
}
/// Levels adapted from NASA Earth Observing System Data and Information System ([EOSDIS]) data processing levels,
/// which are intended to describe the level of processing that has been applied to a given data set.
/// These levels are widely used in the Earth science community and provide a useful framework for understanding the maturity and usability of data products.
///
/// See <https://www.earthdata.nasa.gov/learn/earth-observation-data-basics/data-processing-levels> for more information.
///
/// [EOSDIS]: https://www.earthdata.nasa.gov/about/esdis/eosdis
#[derive(Clone, Debug, Deserialize, Display, Serialize, JsonSchema)]
pub enum DataProcessingLevel {
    /// Reconstructed, unprocessed ("raw") instrument and payload data at full resolution,
    /// with any and all communications artifacts (e.g., synchronization frames,
    /// communications headers, duplicate data) removed.
    #[display("Level 0: Raw")]
    L0,
    /// Level 1A (L1A) data are reconstructed, unprocessed instrument data at full
    /// resolution, time-referenced, and annotated with ancillary information.
    /// This ancillary information can include radiometric and geometric calibration
    /// coefficients and georeferencing parameters (e.g., platform ephemeris).
    #[display("Level 1A: Annotated")]
    L1A,
    /// L1B data are L1A data that have been processed to instrument units
    /// (not all instruments have L1B source data).
    #[display("Level 1B: Processed Annotated")]
    L1B,
    /// L1C data are L1B data that include new variables to describe the spectra.
    /// These variables allow the user to identify which L1C channels have been
    /// copied directly from the L1B and which have been synthesized from L1B and why.
    #[display("Level 1C: Spectral Variables")]
    L1C,
    /// Derived geophysical variables at the same resolution and location as
    /// L1 source data.
    #[display("Level 2: Derived Geophysical")]
    L2,
    /// L2A data contains information derived from the geolocated instrument data,
    /// such as ground elevation, highest and lowest surface return elevations,
    /// energy quantile heights ("relative height" metrics), and other
    /// waveform-derived metrics describing the intercepted surface.
    #[display("Level 2A: Surface Metrics")]
    L2A,
    /// L2B data are L2A data that have been processed to instrument units
    /// (not all instruments will have a L2B equivalent).
    #[display("Level 2B: Processed Surface Metrics")]
    L2B,
    /// Variables mapped on uniform space-time grid scales, usually with some
    /// completeness and consistency.
    #[display("Level 3: Gridded")]
    L3,
    /// L3A data are generally periodic summaries (weekly, 10-day, monthly)
    /// of L2 products.
    #[display("Level 3A: Periodic Summaries")]
    L3A,
    /// Model output or results from analyses of lower-level data
    /// (e.g., variables derived from multiple measurements).
    #[display("Level 4: Model")]
    L4,
}
/// Framework for assessing the readiness of a data set across three bands: accessibility (C), faithfulness (B), and contextual appropriateness (A)
#[derive(Clone, Debug, Deserialize, Display, Serialize, JsonSchema)]
pub enum DataReadinessLevel {
    /// Data in context. The data set has been assessed as appropriate for a specific task or question.
    /// Any remedial steps have been taken and the data is ready to be deployed in the given context.
    /// A data set may be A1 for one question but only B1 for a different question; the task definition
    /// is an important pre-requisite for this band.
    #[display("A: Appropriate")]
    A1,
    /// End of Band B. The analyst understands how faithful the data is to its original description.
    /// A broad idea of limitations in the data is present and an intuition about what may really be
    /// possible with the data set is beginning to form. Getting to this point is often the most
    /// expensive part of a data project.
    #[display("B: Faithful")]
    B1,
    /// Beginning of Band B. Data is accessible and loaded into analysis software but its faithfulness
    /// and representation have not yet been characterized. Missing values, noise, data entry errors,
    /// unit correctness, and collection bias have not been assessed.
    #[display("B: Loaded")]
    B4,
    /// Top of Band C. Data is machine readable and ethical procedures for data handling have been
    /// addressed. It is ready to be loaded into analysis software or made available via a data
    /// repository. Reaching C1 often requires significant bespoke software and human understanding
    /// of systems, ethics, and the law.
    #[display("C: Accessible")]
    C1,
    /// Bottom of Band C. Hearsay data — existence is not yet verified. Signs include statements such
    /// as "The sales department should have a record of that." Problems may include whether the data
    /// is actually being recorded, the format in which it is recorded, privacy or legal constraints,
    /// and topology limitations (e.g., data distributed across many devices).
    #[display("C: Hearsay")]
    C4,
}
/// Framework for partitioning data by quality using metaphor of mined metals
#[derive(Clone, Debug, Display, Deserialize, Serialize, JsonSchema)]
pub enum Quality {