WikiNewZealand / fundamental-figures

0 stars 0 forks source link

Issue with a file #10

Closed natdudley closed 5 years ago

natdudley commented 5 years ago

My config

{
            "uri": "https://figure.nz/table/UBNMx2bi4bYNKXhi/download",
            "parent": "Education",
            "measure": { 
                "column": "Training type", 
                "include": [ 
                    {
                        "value": "All Apprentices (including New Zealand Apprentices)",
                        "label": "Apprentices"
                    },
                    {
                        "value": "New Zealand Apprentices",
                        "label": "Apprentices in the New Zealand Apprenticeships scheme"
                    }
                ],
                "exclude": [ ] 
            },
            "category": { 
                "column": "Value label", 
                "include": [ ],
                "exclude": [ ] 
            },
            "date": "Year"
        },

File headers:


Year | Training type | Territorial Authority of employment | Value | Value Unit | Value Label | Null Reason
-- | -- | -- | -- | -- | -- | --

Suspect issue: Territorial Authority is named something different.

natdudley commented 5 years ago

see also:

https://figure.nz/table/YC1uJ26319dpOw1S as another

Spksh commented 5 years ago

Added discriminator property. This defaults to "Territorial Authority".

{
            "uri": "https://figure.nz/table/UBNMx2bi4bYNKXhi/download",
            "parent": "Education",
            "discriminator": "Territorial Authority of employment",
            "measure": { 
                "column": "Training type", 
                "include": [ 
                    {
                        "value": "All Apprentices (including New Zealand Apprentices)",
                        "label": "Apprentices"
                    },
                    {
                        "value": "New Zealand Apprentices",
                        "label": "Apprentices in the New Zealand Apprenticeships scheme"
                    }
                ],
                "exclude": [ ] 
            },
            "category": { 
                "column": "Value label", 
                "include": [ ],
                "exclude": [ ] 
            },
            "date": "Year"
        },

Another example is https://figure.nz/table/T52DqR6aqRo8a8Lp, where the csv uses "Territorial authority" (note the lowercase a). We'd do this, to match the casing:

    {
      "uri": "https://figure.nz/table/T52DqR6aqRo8a8Lp/download",
      "parent": "Education",
      "discriminator": "Territorial authority",
      "measure": {
        "column": "Measure",
        "include": [],
        "exclude": []
      },
      "category": {
        "column": "Value Label",
        "include": [],
        "exclude": []
      },
      "date": "Year as at 1 July"
    }