population package¶
The population package provides access to various data related to world populations, regions, and their countries. Additionally, it includes historical data ranging from 1950 to the present day and future projections extending to 2050.
To understand the significance of each of these data sets, their sources, and any other related information, please visit the official page at https://www.worldometers.info/population
Population by country¶
>>> from worldometer.world.population import CountriesByPopulation
>>> cp = CountriesByPopulation()
>>> cp.data[0]
CountriesByPopulationData(
idx=1,
country='India',
population=1428627663,
yearly_change='0.81 %',
net_change=11454490,
density=481,
land_area=2973190,
migrants=-486136,
fertility_rate=2.0,
median_age=28.0,
urban_population='36 %',
world_share='17.76 %'
)
- class worldometer.world.population.countries_by_population.CountriesByPopulation¶
Represents the data table of countries in the world by population.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in Countries in the world by population.
- property data: List[CountriesByPopulationData]¶
Get a list of all the data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.countries_by_population.CountriesByPopulationData(idx: int, country: str, population: int, yearly_change: str, net_change: int, density: int, land_area: int, migrants: int, fertility_rate: float, median_age: float, urban_population: str, world_share: str)¶
Represents a data row from the respective table.
- idx¶
- Type:
int
- country¶
- Type:
str
- population¶
- Type:
int
- yearly_change¶
- Type:
str
- net_change¶
- Type:
int
- density¶
- Type:
int
- land_area¶
- Type:
int
- migrants¶
- Type:
int
- fertility_rate¶
- Type:
float
- median_age¶
- Type:
float
- urban_population¶
- Type:
str
- Type:
str
Population by region¶
>>> from worldometer.world.population import WorldPopulationByRegion
>>> pr = WorldPopulationByRegion()
>>> pr.current()[0]
CurrentWorldPopulationByRegionData(
idx=1,
region='Asia',
population=4753079727,
yearly_change='0.64 %',
net_change=30444963,
density=153,
area=31033131,
migrants=-1487191,
fertility_rate=1.934,
median_age=32,
urban_population='52.6 %',
world_share='59.1 %'
)
>>> pr.past()[0]
PastWorldPopulationByRegionData(
idx=1,
region='Asia',
population=1379048370,
world_share='55.2 %'
)
>>> pr.future()[0]
FutureWorldPopulationByRegionData(
idx=1,
region='Asia',
population=5292947571,
world_share='54.5 %'
)
- class worldometer.world.population.by_region.WorldPopulationByRegion¶
Represents the data table of regions in the world by population.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in Regions in the world by population.
- current() List[CurrentWorldPopulationByRegionData] ¶
Get a list of all the current data from the table.
These data are related to the current year.
Each index in the list contains an object representing a data row of the table.
- future() List[FutureWorldPopulationByRegionData] ¶
Get a list of all future data from the table.
These data are an estimate for the year 2050.
Each index in the list contains an object representing a data row of the table.
- past() List[PastWorldPopulationByRegionData] ¶
Get a list of all historical data from the table.
These data pertain to the year 1950.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.by_region.CurrentWorldPopulationByRegionData(idx: int, region: str, population: int, yearly_change: str, net_change: int, density: int, area: int, migrants: int, fertility_rate: float, median_age: int, urban_population: str, world_share: str)¶
Represents a data row from the respective table.
- idx¶
- Type:
int
- region¶
- Type:
str
- population¶
- Type:
int
- yearly_change¶
- Type:
str
- net_change¶
- Type:
int
- density¶
- Type:
int
- area¶
- Type:
int
- migrants¶
- Type:
int
- fertility_rate¶
- Type:
float
- median_age¶
- Type:
int
- urban_population¶
- Type:
str
- Type:
str
Population by year¶
>>> from worldometer.world.population import WorldPopulationByYear
>>> py = WorldPopulationByYear()
>>> py.data[0]
WorldPopulationByYearData(
year=2023,
world_population=8045311447,
yearly_change='0.88 %',
net_change=70206291.0,
density=54.0
)
- class worldometer.world.population.by_year.WorldPopulationByYear¶
Represents the data table of the world population by year.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in the world population by year.
- property data: List[WorldPopulationByYearData]¶
Get a list of all the data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.by_year.WorldPopulationByYearData(year: int, world_population: int, yearly_change: str, net_change: float, density: float)¶
Represents a data row from the respective table.
- year¶
- Type:
int
- world_population¶
- Type:
int
- yearly_change¶
- Type:
str
- net_change¶
- Type:
float
- density¶
- Type:
float
Largest cities in the world¶
>>> from worldometer.world.population import LargestCities
>>> lc = LargestCities()
>>> lc.data[0]
LargestCitiesData(
rank=1,
urban_area='Tokyo-Yokohama',
population_estimate=37843000,
country='Japan',
land_area=8547,
density=4400
)
- class worldometer.world.population.largest_cities.LargestCities¶
Represents the data table of the largest cities in the world.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in the largest cities in the world.
- property data: List[LargestCitiesData]¶
Get a list of all the data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.largest_cities.LargestCitiesData(rank: int, urban_area: str, population_estimate: str, country: str, land_area: int, density: int)¶
Represents a data row from the respective table.
- rank¶
- Type:
int
- urban_area¶
- Type:
str
- population_estimate¶
- Type:
str
- country¶
- Type:
str
- land_area¶
- Type:
int
- density¶
- Type:
int
Most populous countries¶
>>> from worldometer.world.population import MostPopulousCountries
>>> pc = MostPopulousCountries()
>>> pc.current()[0]
CurrentMostPopulousCountriesData(
idx=1,
country='India',
population=1428627663,
yearly_change='0.81 %',
world_share='17.8 %'
)
>>> pc.past()[0]
PastMostPopulousCountriesData(
idx=1,
country='China',
population=543979233,
world_share='21.8 %',
rank='(2)'
)
>>> pc.future()[0]
FutureMostPopulousCountriesData(
idx=1,
country='India',
population=1670490596,
world_share='17.2 %',
rank='(1)'
)
- class worldometer.world.population.most_populous_countries.MostPopulousCountries¶
Represents the data table of most populous countries in the world.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in Most populous countries in the world.
- current() List[CurrentMostPopulousCountriesData] ¶
Get a list of all the current data from the table.
These data are related to the current year.
Each index in the list contains an object representing a data row of the table.
- future() List[FutureMostPopulousCountriesData] ¶
Get a list of all future data from the table.
These data are an estimate for the year 2050.
Each index in the list contains an object representing a data row of the table.
- past() List[PastMostPopulousCountriesData] ¶
Get a list of all historical data from the table.
These data pertain to the year 1950.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.most_populous_countries.CurrentMostPopulousCountriesData(idx: int, country: str, population: int, yearly_change: str, world_share: str)¶
Represents a data row from the respective table.
- idx¶
- Type:
int
- country¶
- Type:
str
- population¶
- Type:
int
- yearly_change¶
- Type:
str
- Type:
str
World population projections¶
>>> from worldometer.world.population import WorldPopulationProjections
>>> pp = WorldPopulationProjections()
>>> pp.data[0]
WorldPopulationProjectionsData(
year=2023,
world_population=8045311447,
yearly_change='0.88 %',
net_change=70206291,
density=54
)
- class worldometer.world.population.projections.WorldPopulationProjections¶
Represents the data table of the world population projections.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original table.
- Type:
tuple
Notes
Check the source table in World Population Projections.
- property data: List[WorldPopulationProjectionsData]¶
Get a list of all the data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.projections.WorldPopulationProjectionsData(year: int, world_population: int, yearly_change: str, net_change: int, density: int)¶
Represents a data row from the respective table.
- year¶
- Type:
int
- world_population¶
- Type:
int
- yearly_change¶
- Type:
str
- net_change¶
- Type:
int
- density¶
- Type:
int
Regions population¶
>>> from worldometer.world.population import (
AsiaPopulation,
AfricaPopulation,
EuropePopulation,
LatinAmericanAndTheCaribbeanPopulation,
NorthernAmericanPopulation,
OceaniaPopulation
)
>>> ap = AsiaPopulation()
>>> ap.live()
4762699828
>>> ap.subregions()[0]
SubregionData(
area='Southern Asia',
population='(2,027,578,876)'
)
>>> ap.historical()[0]
HistoricalData(
year=2023,
population=4753079727,
yearly_change_percent='0.64 %',
yearly_change=30444963,
migrants=-1487191,
median_age=31.9,
fertility_rate=1.93,
density=153,
urban_population_percent='52.6 %',
urban_population=2500201501,
world_share='59.1 %',
world_population=8045311447,
rank=nan
)
>>> ap.forecast()[0]
ForecastData(
year=2025,
population=4816249054,
yearly_change_percent='0.64 %',
yearly_change=30384996,
migrants=-1555419,
median_age=32.7,
fertility_rate=1.93,
density=155,
urban_population_percent='53.8 %',
urban_population=2589655469,
world_share='61.4 %',
world_population=8191988453,
rank=nan
)
- class worldometer.world.population.regions.AsiaPopulation¶
Represents the data tables of Asia’s populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Asia Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.AfricaPopulation¶
Represents the data tables of Africa’s populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Africa Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.EuropePopulation¶
Represents the data tables of Europe’s populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Europe Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.LatinAmericanAndTheCaribbeanPopulation¶
Represents the data tables of Latin American and Caribbean populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Latin America and the Caribbean Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.NorthernAmericanPopulation¶
Represents the data tables of Northern American populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Northern American Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.OceaniaPopulation¶
Represents the data tables of the Oceania populations.
- source_path¶
The data source path.
- Type:
str
- new_column_names¶
The new column names that will be used to replace those of the original tables.
- Type:
tuple
Notes
Check the source tables in Oceania Population.
- forecast() List[ForecastData] ¶
Get a list of all forecast data from the table.
Each index in the list contains an object representing a data row of the table.
- historical() List[HistoricalData] ¶
Get a list of all historical data from the table.
Each index in the list contains an object representing a data row of the table.
- live() int | float | None ¶
Get a live population counter for the respective region.
- subregions() List[SubregionData] ¶
Get a list of all the subregions’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.population.regions.SubregionData(area: int, population: str)¶
Represents a data row from the respective table.
- area¶
- Type:
int
- population¶
- Type:
str
- class worldometer.world.population.regions.HistoricalData(year: int, population: int, yearly_change_percent: str, yearly_change: int, migrants: int, median_age: float, fertility_rate: float, density: int, urban_population_percent: str, urban_population: int, world_share: str, world_population: int, rank: int)¶
Represents a data row from the respective table.
- year¶
- Type:
int
- population¶
- Type:
int
- yearly_change_percent¶
- Type:
str
- yearly_change¶
- Type:
int
- migrants¶
- Type:
int
- median_age¶
- Type:
float
- fertility_rate¶
- Type:
float
- density¶
- Type:
int
- urban_population_percent¶
- Type:
str
- urban_population¶
- Type:
int
- Type:
str
- world_population¶
- Type:
int
- rank¶
- Type:
int
- class worldometer.world.population.regions.ForecastData(year: int, population: int, yearly_change_percent: str, yearly_change: int, migrants: int, median_age: float, fertility_rate: float, density: int, urban_population_percent: str, urban_population: int, world_share: str, world_population: int, rank: int)¶
Represents a data row from the respective table.
- year¶
- Type:
int
- population¶
- Type:
int
- yearly_change_percent¶
- Type:
str
- yearly_change¶
- Type:
int
- migrants¶
- Type:
int
- median_age¶
- Type:
float
- fertility_rate¶
- Type:
float
- density¶
- Type:
int
- urban_population_percent¶
- Type:
str
- urban_population¶
- Type:
int
- Type:
str
- world_population¶
- Type:
int
- rank¶
- Type:
int