country-json icon indicating copy to clipboard operation
country-json copied to clipboard

Version 2

Open kennarddh opened this issue 2 years ago • 4 comments

To Do

  • [ ] Define Data Structure
    • [x] ISO3166
    • [x] Average Height
    • [x] UnitedNationsMember
    • [x] Countries name
    • [x] GS1Code
    • [x] Calling codes
    • [x] Capital cities
    • [x] Cities
    • [x] Continent
    • [x] Coastline
    • [x] Area
    • [x] ISO4217 code
    • [x] Currency symbol
    • [x] Currency name
    • [x] ccTLD
    • [x] Average elevation
    • [x] Flag
    • [ ] Geo cordinates
    • [x] Government
    • [x] Independence
    • [x] Landlocked
    • [x] Languages
    • [x] Life expectancy
    • [x] National dishes
    • [x] National symbol
    • [x] Population density
    • [x] Population
    • [x] Regions
    • [x] Religion
    • [x] Average yearly temperature
    • [x] National sports
  • [ ] Scrap data
    • [x] ISO3166
    • [x] Average Height
    • [x] UnitedNationsMember
    • [x] Countries name
    • [x] GS1Code
    • [ ] Calling codes
    • [x] Capital cities
    • [ ] Cities
    • [ ] Continent
    • [ ] Coastline
    • [ ] Area
    • [ ] ISO4217 code
    • [ ] Currency symbol
    • [ ] Currency name
    • [ ] ccTLD
    • [x] Average elevation
    • [ ] Flag
    • [ ] Geo cordinates
    • [ ] Government
    • [ ] Independence
    • [ ] Landlocked
    • [ ] Languages
    • [ ] Life expectancy
    • [ ] National dishes
    • [ ] National symbol
    • [ ] Population density
    • [ ] Population
    • [ ] Regions
    • [ ] Religion
    • [x] Average yearly temperature
    • [x] National sports

Proposed Changes

Update

  • This will be very big breaking change.
  • This will also increase the data size as more fields and data is added.
  • To reduce size we can remove null value. Like if the country doesn't have the data instead of null we delete the data to reduce size. API library can solve this to return null instead of error when getting the data.
  • Data maybe cannot be modified manually as its will be overridden every month.
  • Data will scrapped mostly from wikipedia and wikimedia. I still can't find some data.
  • Boolean will be used instead of string 1 or 0
  • Periodic update will create new pull request and still need to be reviewed manually every month. To prevent if wikipedia changed its page html structure.

Removed

  • Alphabet Letters: Do we need this data, this seems redundant.
  • ISO Numeric: Merge with ISO3166

Added

  • UnitedNationsMember data
  • Currency symbol
  • National sport
  • ISO3166
  • Many new fields

Changed

  • Change Barcode prefix to GS1Code
  • Rename Country By Abbreviation to ISO3166. Add 2 and 3 letter code.
  • Rename Currency code to ISO4217.
  • Average Height
  • Rename Domain tld to ccTLD and add new fields.
  • Rename elevation to averageElevation
  • Rename independence date to independence
  • Rename government type to government
  • Rename Capital City to Capital Cities: Country can have multiple capital cities

Source

  • ISO3166: https://en.wikipedia.org/wiki/ISO_3166-1 We can add 2 and 3 letter code.
  • Average Height: https://en.wikipedia.org/wiki/Average_human_height_by_country. We can add maleToFemaleRatio, methodology, year.
  • UnitedNationsMember: data that will include the country name, and is the country original member of united nation, and when joined united nations. https://en.wikipedia.org/wiki/Member_states_of_the_United_Nations.
  • Countries name: Extract name from Countries data.
  • GS1Code: https://en.wikipedia.org/wiki/List_of_GS1_country_codes. I don't know how to include country that have multiple code range like UPC-A compatible - Used to issue restricted circulation numbers within a geographic.
  • Calling codes: https://en.wikipedia.org/wiki/List_of_country_calling_codes. Do we need to include nested code like United States Virgin Islands No like the previous data.
  • Capital cities: https://en.wikipedia.org/wiki/List_of_national_capitals. All.
  • Cities: https://en.wikipedia.org/wiki/Lists_of_cities_by_country. Need to request to multiple child page.
  • Continent: https://simple.wikipedia.org/wiki/List_of_countries_by_continents.
  • Coastline: https://en.wikipedia.org/wiki/List_of_countries_by_length_of_coastline
  • Area: https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_area. Land and water.
  • ISO4217 code: https://en.wikipedia.org/wiki/ISO_4217
  • Currency symbol: https://en.wikipedia.org/wiki/Currency_symbol
  • Currency name: https://en.wikipedia.org/wiki/ISO_4217
  • ccTLD: https://en.wikipedia.org/wiki/Country_code_top-level_domain. New fields registry, IDN, DNSSEC, SLD, IPv6.
  • Average elevation: https://en.wikipedia.org/wiki/List_of_countries_by_average_elevation
  • Flag: https://en.wikipedia.org/wiki/Member_states_of_the_United_Nations. Scrap all country page and download flag then optimize using svgo and save as base64
  • Geo cordinates: I can't find it in wikipedia.
  • Government: https://en.wikipedia.org/wiki/List_of_countries_by_system_of_government. Is this right?
  • Independence: https://en.wikipedia.org/wiki/List_of_national_independence_days. Add month, day and from fields.
  • Landlocked: https://en.wikipedia.org/wiki/Landlocked_country#List_of_landlocked_countries_and_landlocked_de_facto_states. If country in this list it will be marked as landlocked.
  • Languages: https://en.wikipedia.org/wiki/List_of_official_languages_by_country_and_territory. Add officialLanguages, regionalLanguage, minorityLanguage, nationalLanguage,widelySpoken fields.
  • Life expectancy: https://en.wikipedia.org/wiki/List_of_countries_by_life_expectancy. World Bank Group (2022) data. male, female, all fields.
  • National dishes: https://en.wikipedia.org/wiki/National_dish. Now an array. 1 country can have multiple dishes.
  • National symbol: https://en.wikipedia.org/wiki/Lists_of_national_symbols. Need to loop through all the child pages.
  • Population density: https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population_density
  • Population: https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population_density
  • Regions: https://meta.wikimedia.org/wiki/List_of_countries_by_regional_classification
  • Religion: https://en.wikipedia.org/wiki/Religious_information_by_country. Use Pew forum data. Add percentage per country per religion
  • Average yearly temperature: https://en.wikipedia.org/wiki/List_of_countries_by_average_yearly_temperature.
  • National sports: https://en.wikipedia.org/wiki/National_sport. 1 country can have more than 1 sport. isOfficial boolean.

Note

  • Github Action Create Pull Request: https://stackoverflow.com/questions/68057744/create-pull-request-with-github-action

kennarddh avatar Aug 07 '23 16:08 kennarddh

hey, do you need help with this? if so please let me know. if you don't have time then it's ok we can save it for future tasks

samayo avatar May 05 '24 17:05 samayo

Oh, I kind of forgot about this repo, haven't checked my Github notification for a month. But I think I can continue this after I'm done with my current project. Also if you want to help, sure.

kennarddh avatar May 17 '24 16:05 kennarddh

Oh, I kind of forgot about this repo, haven't checked my Github notification for a month. But I think I can continue this after I'm done with my current project. Also if you want to help, sure.

I can help, as long as you tell me where you need one

samayo avatar May 17 '24 16:05 samayo

You can add scripts to scrap the remaining data from wikipedia or wikimedia I think.

Also ping me if you reply so I can get email notification @kennarddh

kennarddh avatar May 24 '24 07:05 kennarddh