diff --git a/data-science/data_contracts/README.md b/data-science/data_contracts/README.md deleted file mode 100644 index b00cb3e5..00000000 --- a/data-science/data_contracts/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Data Contracts - -This directory contains data contracts for the data science components of the Lucky Parking project. - -## What are Data Contracts? - -Data contracts are formal agreements between data producers and consumers that define the structure, quality, and semantics of data. They ensure data reliability and consistency across different components of the system. - -## Structure - -Each data contract specifies: -- Schema definition (fields, types, constraints) -- Data quality expectations (nullability, uniqueness, ranges) -- Semantic meaning of data elements -- Versioning information - -## Usage - -Data contracts are used by: -- Data validation pipelines -- ETL processes -- API interfaces between services -- Machine learning model training and inference - -## Files - -- `schema.json`: JSON Schema definitions for data entities -- `contracts.yaml`: YAML files describing specific data contracts -- `examples/`: Sample data instances that conform to the contracts - -## Contributing - -When adding or modifying data contracts: -1. Ensure backward compatibility where possible -2. Update version numbers appropriately -3. Provide clear documentation of changes -4. Add examples demonstrating correct usage -5. Update any dependent consumers of the contract - -## Maintenance - -Data contracts should be reviewed periodically to ensure they remain accurate reflections of the data being produced and consumed. \ No newline at end of file diff --git a/data-science/data_contracts/data_contract.yaml b/data-science/data_contracts/data_contract.yaml deleted file mode 100644 index 38c24e2f..00000000 --- a/data-science/data_contracts/data_contract.yaml +++ /dev/null @@ -1,108 +0,0 @@ -#Created using the editor at https://editor.datacontract.com -apiVersion: "v3.1.0" -kind: "DataContract" -id: "example-id" -version: "0.0.1" -status: "draft" -name: "Lucky Parking Data Contract" -schema: - - name: "single_data" - businessName: "Schema 1" - physicalType: "table" - properties: - - name: "region_type" - logicalType: "string" - required: true - primaryKey: false - quality: - - type: "library" - metric: "invalidValues" - description: "Region Type should be one of the valid region types" - mustBe: 0 - arguments: - validValues: - - "Neighborhood Council" - - "Zip Code" - - "Place (Radius)" - dimension: "conformity" - - name: "region" - logicalType: "string" - required: false - primaryKey: false - - name: "date_min" - logicalType: "date" - required: true - primaryKey: false - - name: "date_max" - logicalType: "date" - required: true - primaryKey: false - - name: "chart_type" - logicalType: "string" - required: false - primaryKey: false - quality: - - type: "library" - mustBe: 0 - metric: "invalidValues" - arguments: - validValues: - - "Total # Citations" - - "Citations per Sq. Mile (Density)" - - "Violation Type" - - "Total $ Fine Amount" - - "Fine $ Amount per Sq. Mile (Density)" - - "Day of the Week" - dimension: "conformity" - - name: "compare_mode" - businessName: "Schema 2" - physicalType: "table" - properties: - - name: "region_type" - logicalType: "string" - primaryKey: false - required: true - quality: - - type: "library" - metric: "invalidValues" - arguments: - validValues: - - "Neighborhood Council" - - "Zip Code" - - "Place (Radius)" - mustBe: 0 - description: "Region Type should be one of the valid region types" - dimension: "conformity" - - name: "region_1" - logicalType: "string" - required: false - primaryKey: false - - name: "region_2" - logicalType: "string" - required: false - primaryKey: false - - name: "date_min" - logicalType: "date" - required: true - primaryKey: false - - name: "date_max" - logicalType: "date" - required: true - primaryKey: false - - name: "chart_type" - logicalType: "string" - required: false - primaryKey: false - quality: - - type: "library" - mustBe: 0 - metric: "invalidValues" - arguments: - validValues: - - "Total # Citations" - - "Citations per Sq. Mile (Density)" - - "Violation Type" - - "Total $ Fine Amount" - - "Fine $ Amount per Sq. Mile (Density)" - - "Day of the Week" - dimension: "conformity"