DOMINIC SIMPSON

DOMINIC SIMPSON

World GeoData

World GeoData app

View website
View GitHub repository

My fascination with global statistics and geopolitics can be seen in this website, which was built by myself and one other person as part of the HTTP portfolio of Founders & Coders’ pre-Apprenticeship Bootcamp.

It uses asynchronous JavaScript to fetch and then display data/statistics relating to countries around the world: population, currency, land mass, languages, capital city, etc, as well as the current weather in the capital of the respective country. The data is fetched from two APIs: REST Countries and Open-Meteo. The country data is fetched from the former, which provides comprehensive information about countries worldwide. The weather data is obtained from the latter, which offers accurate and up-to-date weather forecasts for various locations. This includes providing WMO codes, which are standardized formats defined by the World Meteorological Organization for transmitting meteorological observation data, ensuring consistent international exchange of weather and climate information. Examples are:

  • 0: “Clear sky”
  • 1: “mainly clear”
  • 2: “partly cloudy”
  • 3: “overcast”
  • 45: “foggy”
  • 48: “foggy with frost”
  • 51: “light drizzle”
  • 53: “moderate drizzle”
  • 55: “dense drizzle”
  • 56: “light freezing drizzle”
  • 57: “dense freezing drizzle”
  • 61: “light rain”
  • 63: “moderate rain”
  • 65: “heavy rain”
  • 66: “light freezing rain”
  • 67: “heavy freezing rain”
  • 71: “light snow”
  • 73: “moderate snow”
  • 75: “heavy snow”
  • 77: “snow grains”
  • 80: “light rain showers”
  • 81: “moderate rain showers”
  • 82: “violent rain showers”
  • 85: “light snow showers”
  • 86: “heavy snow showers”
  • 95: “a thunderstorm”
  • 96: “a thunderstorm with light hail”
  • 99: “a thunderstorm with heavy hail”

When the user types in the name of a country in the Search bar, the page will then be populated with data relating to that specific country, along with its flag and official name.

A couple of interesting issues relating to geopolitics came up when constructing the website. If two countries share the same name – for example, there are two countries called the Congo, and two called Korea – an option bar will come up listing both; the user will have to choose one of the two. Both sets of countries are officially differentiated by being called either the ‘Democratic People’s Republic of / Democratic Republic of’, on the one hand (somewhat ironic in the case of North Korea); and ‘Republic of’ on the other. A similar principle applies with other issues over country names – for example, if the user types in ‘China’, due to political sensitivities they will have to choose between the ‘People’s Republic of China’ (China itself); the ‘Republic of China’ (Taiwan); Hong Kong; and Macau. Typing ‘Ireland’, meanwhile brings up both the United Kingdom of Great Britain and Northern Ireland, and the Republic of Ireland.

The website also includes disputed territories such as the aforementioned Taiwan, the State of Palestine, Kosovo, and the Falkland Islands. In addition, it retains previous names of countries if a country has officially changed its name. Typing in ‘Swaziland’, for example, will automatically bring up ‘Kingdom of Eswatini’ – the country’s current name, after making the name switch.