Given a country code, we can easily gather a lot of information about its population, using indicators such as the following:
- SP.POP.TOTL: Total population (https://api.worldbank.org/v2/countries/BE/indicators/SP.POP.TOTL?per_page=100&format=json&date=2000:2018)
- SP.POP.TOTL.MA.IN: Male population (https://api.worldbank.org/v2/countries/BE/indicators/SP.POP.TOTL.MA.IN?per_page=100&format=json&date=2000:2018)
- SP.POP.TOTL.FE.IN: Female population (https://api.worldbank.org/v2/countries/BE/indicators/SP.POP.TOTL.FE.IN?per_page=100&format=json&date=2000:2018)
- SP.DYN.LE00.IN: Life expectancy (https://api.worldbank.org/v2/countries/BE/indicators/SP.DYN.LE00.IN?per_page=100&format=json&date=2000:2018)
- SP.DYN.TO65.FE.ZS: Survival to age 65, female (https://api.worldbank.org/v2/countries/BE/indicators/SP.DYN.TO65.FE.ZS?per_page=100&format=json&date=2000:2018)
- SP.DYN.TO65.MA.ZS: Survival to age 65, male (https://api.worldbank.org/v2/countries/BE/indicators/SP.DYN.TO65.MA.ZS?per_page=100&format=json&date=2000:2018)
In the preceding examples, we've retrieved the available data points for Belgium between 2000 and 2018. As we saw in the previous section, there are actually many more indicators, but we'll play with only a few.