enram / vptstools

Python library to transfer and convert vertical profile time series data
https://enram.github.io/vptstools/
MIT License
4 stars 1 forks source link

Validating generated csv files #10

Closed peterdesmet closed 1 year ago

peterdesmet commented 2 years ago

@stijnvanhoey CSV files can be validated with:

  1. Create a datapackage.json file with the following content:
{
  "profile": "tabular-data-package",
  "resources": [
    {
      "name": "vpts",
      "path": "vpts.csv",
      "profile": "tabular-data-resource",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": "https://raw.githubusercontent.com/enram/vpts-csv/main/vpts-csv-table-schema.json"
    }
  ]
}
  1. Place the datapackage.json file in the same directory as your CSV file. Rename the path value if necessary to point to the CSV file (above named vpts.csv).
  2. Install https://github.com/frictionlessdata/frictionless-py, I'm using v4.40.0
  3. Running in CLI: frictionless validate datapackage.json
stijnvanhoey commented 1 year ago

handles on frictionless so-called "resource" level in https://github.com/enram/vptstools/pull/19