Add Japan (392) to the offline demographics country map - #1196
Open
arihantlodha-cmd wants to merge 1 commit into
Open
Add Japan (392) to the offline demographics country map#1196arihantlodha-cmd wants to merge 1 commit into
arihantlodha-cmd wants to merge 1 commit into
Conversation
Maps UN country code 392 to JPN so get_un_data's offline fallback finds Japan's data (EAPD-DRB/Population-Data#14) when no API token is present, like the other supported countries.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1196 +/- ##
=======================================
Coverage 72.74% 72.74%
=======================================
Files 22 22
Lines 5768 5768
=======================================
Hits 4196 4196
Misses 1572 1572
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
|
Thanks @arihantlodha-cmd — the entry looks right. One note for whoever merges: Also, while you're in this dict — worth adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
"392": "JPN"to thecountry_dictinogcore/demographics.py, so the offline data fallback (used when no UN API token is present) can find Japan's demographic data by country code, like the other supported countries.This pairs with EAPD-DRB/Population-Data#14, which adds the Japan data (
Data/JPN/) to the mirror this fallback reads from. That PR should merge first; on its own this entry has no data behind it yet.Motivation: I'm building an open-source OG model of Japan on top of OG-Core, and Japan is currently the only major economy without an OG country model. This (plus the data PR) lets OG-Core use Japan demographics offline. With a UN API token the live pull already works for Japan (code 392); this just extends the token-free path.