cedadev / c3s_434_ecde_page_text

To manage page text for the European Climate Data Explorer being developed by the C3S 434 project.
MIT License
0 stars 2 forks source link

Identifiers for ECDE page content #16

Closed charliepascoe closed 3 years ago

charliepascoe commented 3 years ago

The ECDE team would ideally like to use json files to integrate the page content we build here into the ECDE. However, right now they're using the markdown text because it is clear which markdown data file is for which variable. They've presented this as an identifier issue and have asked that we add identifiers for each indicator to the json info.

charliepascoe commented 3 years ago

I think the problem here is that we need to be clearer about which json files contain the content for the indicator pages on the ECDE because the consolidated json files already have an "indicator" field that links each batch of content to a specific indicator.

Currently the json files with content for the ECDE are:

charliepascoe commented 3 years ago

@sharppaul Would it help if we placed the json files for the ECDE in a separate "consolidated" directory? Or is there a particular json solution that you need? e.g. adding an "identifier" attribute to each "indicator" section.

charliepascoe commented 3 years ago

OK so I understand this now. The ECDE will automate updates to their pages from our json content. Given that it is likely that the indicator names may change they need each indicator to have a unique unchanging identifier. The identifier can simply be a number.

sharppaul commented 3 years ago

Hi @charliepascoe ,

You understood correctly, yes. If you want I can make an example in another git-branch. Then if you think it's all right we can merge it with your JSON.

Paul

sharppaul commented 3 years ago

Like discussed in the meeting today, here are my two examples. The bottom one is the original in it's current state.

[
    // Consolidated.json (identifier: C3S_434_<number>)
    // Identifier won't have to change ever, numbers can be decided on order of release, etc.
    {
        "C3S_434_12345": {
            "PageTitle": "Climatic suitability for the tiger mosquito - season length",
            "Indicator": "Climatic suitability for the tiger mosquito - season length",
            "Units": "(days)",
            "ConsolidatedText_Main": "**Context**\n ... ",
            "ConsolidatedText_Explore": "**Context**\n ... "
        }
    },

    // Consolidated.json (identifier: pagetitle with spaces replaced with dashes (matches c3s.maris.nl indicator URL (without -detail)))
    // Titles may change but this identifier may not.
    {
        "climatic-suitability-of-tiger-mosquito--season-length": {
            "PageTitle": "Climatic suitability for the tiger mosquito - season length",
            "Indicator": "Climatic suitability for the tiger mosquito - season length",
            "Units": "(days)",
            "ConsolidatedText_Main": "**Context**\n ... ",
            "ConsolidatedText_Explore": "**Context**\n ... "
        }
    },

    // Consolidated.json (old) (not recommended, order based)
    [
        {
            "PageTitle": "Climatic suitability for the tiger mosquito - season length",
            "Indicator": "Climatic suitability for the tiger mosquito - season length",
            "Units": "(days)",
            "ConsolidatedText_Main": "**Context**\n ... ",
            "ConsolidatedText_Explore": "**Context**\n ... "     
        }
    ]
]
charliepascoe commented 3 years ago

Thanks @sharppaul, I prefer the numeric option for identifiers. @jhaigh0 I have added identifiers to the ECDE spreadsheet and added an identifier column to the tabs with consolidated content. Can you include the identifiers in the json following the first of Paul's examples. Consolidated FiltersConsol PUPlotsConsol

charliepascoe commented 3 years ago

@sharppaul The identifiers have been added to the json files

sharppaul commented 3 years ago

Thanks for the update @charliepascoe