geography package¶
The geography package provides access to various data related to geographic information about the world, regions, and their countries.
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/geography/how-many-countries-are-there-in-the-world
Countries in the world¶
>>> from worldometer.world.geography import (
WorldCountries,
AsiaCountries,
AfricaCountries,
EuropeCountries,
LatinAmericanAndTheCaribbeanCountries,
NorthernAmericanCountries,
OceaniaCountries
)
>>> wc = WorldCountries()
>>> wc.total
195
>>> wc.countries()[0]
WorldCountriesData(
idx=1,
country='India',
population=1428627663,
world_share='17.76 %',
land_area=2973190
)
>>> ac = AfricaCountries()
>>> ac.total
54
>>> ac.countries()[0]
CountryData(
idx=1,
country='Nigeria',
population=223804632,
subregion='Western Africa'
)
>>> ac.dependencies()[0]
DependencyData(
idx=1,
territory='Réunion',
population=981796,
dependency_of='France'
)
- class worldometer.world.geography.countries.WorldCountries¶
Represents the data table of a list of 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
- total¶
The total number of countries in the world.
- Type:
int
Notes
Check the source table in List of countries.
- countries() List[WorldCountriesData] ¶
Get a list of all the countries’ data from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.AsiaCountries¶
Represents the data tables of Asia’s countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Asia.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.AfricaCountries¶
Represents the data tables of Africa’s countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Africa.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.EuropeCountries¶
Represents the data tables of Europe’s countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Europe.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.LatinAmericanAndTheCaribbeanCountries¶
Represents the data tables of Latin American And The Caribbean countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Latin American And The Caribbean.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.NorthernAmericanCountries¶
Represents the data tables of Northern American countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Northern American.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.OceaniaCountries¶
Represents the data tables of the Oceania countries.
- 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
- total¶
The total number of countries in the region.
- Type:
int
Notes
Check the source tables in Countries in Oceania.
- countries() List[CountryData] ¶
Get a list of all the data for countries in the region from the table.
Each index in the list contains an object representing a data row of the table.
- dependencies() List[DependencyData] ¶
Get a list of all the data for dependencies in the region from the table.
Each index in the list contains an object representing a data row of the table.
- class worldometer.world.geography.countries.WorldCountriesData(idx: int, country: str, population: int, world_share: str, land_area: int)¶
Represents a data row from the respective table.
- idx¶
- Type:
int
- country¶
- Type:
str
- population¶
- Type:
int
- Type:
str
- land_area¶
- Type:
int
Largest countries in the world¶
>>> from worldometer.world.geography import LargestCountries
>>> lc = LargestCountries()
>>> lc.data[0]
LargestCountriesData(
idx=1,
country='Russia',
total_area_km2=17098242,
total_area_mi2=6601665,
land_area_km2=16376870,
land_area_mi2=6323142,
percentage_of_world_landmass='11.0 %'
)
- class worldometer.world.geography.largest_countries.LargestCountries¶
Represents the data table of the largest countries in the world (by area).
- 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 Countries in the World.
- property data: List[LargestCountriesData]¶
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.geography.largest_countries.LargestCountriesData(idx: int, country: str, total_area_km2: int, total_area_mi2: int, land_area_km2: int, land_area_mi2: int, percentage_of_world_landmass: str)¶
Represents a data row from the respective table.
- idx¶
- Type:
int
- country¶
- Type:
str
- total_area_km2¶
- Type:
int
- total_area_mi2¶
- Type:
int
- land_area_km2¶
- Type:
int
- land_area_mi2¶
- Type:
int
- percentage_of_world_landmass¶
- Type:
str