Skip to main content

Interoperability Enabler

Project description

What is it?

Interoperability Enabler (IE) component is designed to facilitate seamless integration and interaction among various artefacts within the SEDIMARK ecosystem, including data, AI models, and service offerings.

Key Feature

  • Data Formatter - Convert JSON data (time-series data) into the SEDIMARK internal processing format (pandas DataFrames)
  • Data Quality Annotations - Enable adding any kind of quality annotations to data inside pandas DataFrames
  • Data Mapper – Convert data from pandas DataFrames into JSON
  • Data Extractor – Extract relevant data from a pandas DataFrame
  • Metadata Restorer – Restore metadata to a pandas DataFrame
  • Data Merger – Merge two DataFrames by matching column names

Installation

The source code can be found on GitHub at https://github.com/Sedimark/InteroperabilityEnabler.

To install the package, you can use pip:

pip install InteroperabilityEnabler

Quick Start Examples

Data Formatter (to convert the input data into a pandas DataFrame)

from InteroperabilityEnabler.utils.data_formatter import data_formatter

FILE_PATH="sample.json"
context_df, time_series_df = data_formatter(FILE_PATH)

Data Quality Annotations (to enrich pandas DataFrames by adding quality annotations)

Instance-level annotations:

from InteroperabilityEnabler.utils.annotation_dataset import add_quality_annotations_to_df

context_df, annotated_df = add_quality_annotations_to_df(
    context_df, time_series_df, assessed_attrs=None
)

Attribute-level annotation:

from InteroperabilityEnabler.utils.annotation_dataset import add_quality_annotations_to_df

assessed_attrs = ["no"]  # Base attribute name
context_df, annotated_df = add_quality_annotations_to_df(
    context_df, time_series_df, assessed_attrs=assessed_attrs
)

Data Mapper (to convert the DataFrame into JSON format)

from InteroperabilityEnabler.utils.data_mapper import data_mapper

data_json = data_mapper(context_df, annotated_df)

Data Extractor (to extract and return specific columns from a pandas DataFrame)

from InteroperabilityEnabler.utils.extract_data import extract_columns

# Select columns by index
column_indices = [2, 5]

selected_df, selected_column_names = extract_columns(time_series_df, column_indices)

print("\nSelected DataFrame:")
print(selected_df)

print("\nSelected Column Names:")
print(selected_column_names)

Metadata Restorer (to restore column names into a pandas DataFrame)

import pandas as pd
from InteroperabilityEnabler.utils.add_metadata import add_metadata_to_predictions_from_dataframe

PREDICTED_DATA = "predicted_data.csv" # example - prediction results from an AI model
predicted_df = pd.read_csv(PREDICTED_DATA, header=None)
predicted_df = add_metadata_to_predictions_from_dataframe(
    predicted_df, selected_column_names
)

Data Merger (merge two DataFrames)

from InteroperabilityEnabler.utils.merge_data import merge_predicted_data

# To combine the original input data with the corresponding prediction results from an AI model
merged_df = merge_predicted_data(time_series_df, predicted_df)

Acknowledgement

This software has been developed by Inria under the SEDIMARK(SEcure Decentralised Intelligent Data MARKetplace) project. SEDIMARK is funded by the European Union under the Horizon Europe framework programme [grant no. 101070074].

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interoperabilityenabler-0.1.5.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interoperabilityenabler-0.1.5-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file interoperabilityenabler-0.1.5.tar.gz.

File metadata

  • Download URL: interoperabilityenabler-0.1.5.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for interoperabilityenabler-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1a35773e58bdd458b4c1fcce3768919c0c23991146d0faa6f7ad6efe4faa086f
MD5 063c1a433127a2a17a6459fd8d98ac24
BLAKE2b-256 076da29b90d501058ba50c443bd11ae0beefaf2008c3384372cc6ed909688d09

See more details on using hashes here.

File details

Details for the file interoperabilityenabler-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for interoperabilityenabler-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ef24526d74e00621b2951808187ab8165e8b8e413e6b70d8d6f05487f311a1fb
MD5 2b1f176d703aa80386a2362bcce7b6bd
BLAKE2b-256 aaaebfce07a5d0420189de9ca4b21f51e5358b0078d21ef218532c0544083e2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page