Repository navigation
Major
- Move the table schema URL from
resource.$schematoresource.schema. In the Data Package standard,$schemais the profile of the descriptor whileschemais the Table Schema describing the columns. A resource written exactly as v1.0 prescribed could not be read. - Require
$schemaon tabular resources, pinned tohttps://datapackage.org/profiles/2.0/dataresource.json. Implementations read it to decide which version of the standard a resource follows: without it,frictionless::version()reports a resource as v1 even inside a package declaring v2. - Require
typeon tabular resources, which must betable. It replaces the Data Package v1profile: "tabular-data-resource".
A tabular resource now requires $schema, name, path, type and schema:
{
"$schema": "https://datapackage.org/profiles/2.0/dataresource.json",
"name": "tags",
"path": "tags.csv",
"type": "table",
"schema": "https://raw.githubusercontent.com/GeoPressure/GeoLocator-DP/v1.1/tags-table-schema.json"
}schema also accepts an inline descriptor, so packages stay self-contained. Package-level $schema is unchanged.
Breaking for archived packages, which carry profile and no type — hence v1.1. GeoLocatoR upgrades them on read.
Minor
- Write
fieldsMatchas a string rather than an array, as the standard requires. The array form came from an error in the published Table Schema profile (frictionlessdata/datapackage#965), fixed in Data Package v2.1. - Write
primaryKeyandforeignKeysfields as arrays of strings, the Data Package v2 spelling. The same commit removes theuniqueconstraint ontags.tag_id, which duplicated the primary key. - Allow extra columns on
tagsthroughfieldsMatch: partial, aspressurepathsalready did. The other six tables keepsuperset, which lets a table leave columns out but not add them. - Declare
categorieson every categorical field, giving each allowed value a label. The EURINGage_classandcatching_methodcodes were previously only partly documented in prose, andmeasurements.sensornow carries its vocabulary term per category. Theenumconstraint is kept alongside, as the standard allows, because no implementation enforcescategoriesyet. - Fix
observations.sexandpressurepaths.typeexamples, which were not valid values of their own fields. - Select the resource schema with
if/thenon the resourcenamerather thanoneOf. The accepted descriptors are unchanged, but a validation error now names the property at fault instead of reporting that the whole resource matched none of the branches.
Website
- Show
primaryKey,foreignKeys,missingValuesandfieldsMatchon each table page, and listcategorieswith their labels, linking SKOS terms by identifier rather than by URL. Each page now also says which columns may be left out and which must be present. - Restore the
_datasymlink for the measurements schema so the site renders the schema the standard ships, and fix a leading space in a SKOS term URL. - Add a changelog page.
CI
- Add an example data package and validate it against the profile on every pull request, together with the v2 spelling of
fieldsMatchand of the keys andcategoriesagainstenumand the field examples.
Known limitations
- Resources still carry
profile: "tabular-data-resource"alongside$schemaandtype. It is the v1 spelling those two replace, but frictionless 1.3.0, the current CRAN release, refuses to read a resource without it. It can be dropped once frictionless 2.0 ships. fieldsMatchsays nothing about which columns are required, so on its own every mode used here lets a table omit a column carrying arequiredconstraint, including a primary key (frictionlessdata/datapackage#1126).GeoLocatoR::validate_gldp()checks that separately.- Coordinate field names remain inconsistent between
observationsand the other tables (#36).
Full Changelog: v1.0...v1.1