Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifiers for ECDE page content #16

Closed
charliepascoe opened this issue Feb 16, 2021 · 8 comments
Closed

Identifiers for ECDE page content #16

charliepascoe opened this issue Feb 16, 2021 · 8 comments
Assignees

Comments

@charliepascoe
Copy link
Collaborator

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
Copy link
Collaborator Author

charliepascoe commented Feb 16, 2021

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:

  • Consolidated.json - which contains the main text for the pages
  • FiltersConsol.json - which contain the text for the drop down menus
  • PUPlotsConsol.json - which contain suggested text for the pop-up plots on the "explore page"

@charliepascoe
Copy link
Collaborator Author

@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
Copy link
Collaborator Author

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
Copy link

sharppaul commented Feb 24, 2021

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
Copy link

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

charliepascoe commented Mar 3, 2021

@sharppaul The identifiers have been added to the json files

ECDE Actions automation moved this from In progress to Done Mar 3, 2021
@sharppaul
Copy link

Thanks for the update @charliepascoe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants