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

Fix/ndc parties inconsistency #1674

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

Bluesmile82
Copy link
Collaborator

@Bluesmile82 Bluesmile82 commented Aug 18, 2023

This PR attempts to fix an inconsistency on the NDC explorer between the number of parties that have submitted their new or updated NDCs on the top of the page and the one shown on the legend of the map.

  • The first problem was that EUU was not recognised as a country on this count on the WORLD selection. I don't remember if we changed this status for the map. Now the WORLD selection includes EUU so its counted.

  • The second problem, still not fixed, is an inconsistency on the VAT (Holy See) on different indicators. This may be a data problem. On the number on the top which comes from the 'ndce_status_2020' indicator the Holy See is counted but on the legend which comes from the 'latest submission' indicator it is on the Only First NDC category, so its not counted.

After giving it a thought Im not sure if we should depend on two different indicators to show the same number. We may want to talk to WRI about this.

@what-the-diff
Copy link

what-the-diff bot commented Aug 18, 2023

PR Summary

  • Enhancements to the ndcs-explore-map-selectors.js
    This PR introduces a new function, getCountriesAndParties, that calculates the total count of parties and countries based on the data provided in submissions. There's an added variable, countriesSubmissions, that filters out the europeSlug from submissions. The calculation method for countriesNumber has been updated to use the length of countriesSubmissions.

    Additionally, to handle the special case of European countries, a new condition has been added. In case the given submissions data includes europeGroupExplorerPagesSlug, a new variable europeanCountriesWithSubmission has been introduced. It calculates the intersection between europeanCountries and countriesSubmissions to adjust the count of countries for those European countries that have no submissions.

  • Update to selectors.js
    An element is appended to PARTIES_MISSING_IN_WORLD_SECTION. This will be based on the value sent to EUURegion. This helps in better categorizing and segregating parties that are not part of the world section.

@Bluesmile82 Bluesmile82 merged commit 7a8c464 into develop Aug 18, 2023
2 of 3 checks passed
@Bluesmile82 Bluesmile82 deleted the fix/ndc-parties-inconsistency branch August 18, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants