Skip to content

Latest commit

 

History

History
75 lines (45 loc) · 3.17 KB

datapackage.md

File metadata and controls

75 lines (45 loc) · 3.17 KB

Data Package

TIDES data must include a datapackage.json in the format specified by the tides-data-package json schema, which is an extension of the frictionless data package schema.

You may create your own datapackage.json based on the documentaiton or start with the provided template, but don't forget to validate it to make sure it is in the correct format!

Data Package Format

{{ frictionless_data_package('spec/tides-datapackage-profile.json') }}

Tabular Data Resource

Required and recommended fields for each tabluar-data-resource are as follows:

{{ frictionless_data_package('spec/tides-datapackage-profile.json',sub_schema="resources") }}

Template

The canonical datapackage.json template is available at /data/template/TIDES/datapackage.json.

!!! warning This version of tides-data-package template is dependent on the version of the documentation you are viewing and only represents the canonical tides-data-package template if you are viewing the main documentation version.

{{ include_file('samples/template/TIDES/datapackage.json',code_type='json') }}

Validation

There are lots of options for validating your datapackage.json file including:

CLI

You can easily validate your data package file with the script provided in /bin/validate-data-package-to-profile

??? tip "installation requirements"

Make sure you have jsonschema-cli installed. You can install it specifically or with all of the other suggested tools using one of the commands below:

=== "Mac"

    ```sh
    brew install jq # mac
    pip install -r requirements.txt
    ```

=== "Windows"

    ```sh
    curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe #windows
    pip install -r requirements.txt
    ```

=== "Linux"

    ```sh
    sudo apt-get install jq # linux
    pip install -r requirements.txt
    ```
validate-data-package-json -f my-datapackage.json

{{ include_file('bin/validate-datapackage-to-profile',code_type='sh') }}

Point-and-Drool

Because a tides-datapackage-profile is just a json-schema, you can use the myriad of different json-schema validator out there on the web. Use the canonical tides-datapackage-profile or copy and paste the version from below.

!!! warning This version of tides-datapackage-profile is dependent on the version of the documentation you are viewing and only represents the canonical tides-datapackage-profile if you are viewing the main documentation version.

{{ include_file('spec/tides-datapackage-profile.json',code_type='json') }}