Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/afkarxyz/world-population

Fetching real-time data from worldometers.info/world-population in JSON format.
https://github.com/afkarxyz/world-population

Last synced: 10 days ago
JSON representation

Fetching real-time data from worldometers.info/world-population in JSON format.

Awesome Lists containing this project

README

        

## Prerequisites

1. Install the required Python libraries
```
pip install asyncio beautifulsoup4 zendriver
```
2. Google Chrome

## Result

Here is an example of JSON output with a 1-second update interval; you can turn it into an API.

```json
{
"current_population": "8,199,106,677",
"births_today": "317,322",
"deaths_today": "149,524",
"population_growth": "167,798",
"births_this_year": "3,582,153",
"deaths_this_year": "1,687,928",
"population_growth_year": "1,894,226",
"top_20_countries": [
{
"rank": 1,
"country": "India",
"population": "1,457,774,431"
},
{
"rank": 2,
"country": "China",
"population": "1,417,610,976"
},
{
"rank": 3,
"country": "U.S.A.",
"population": "346,405,460"
},
{
"rank": 4,
"country": "Indonesia",
"population": "284,669,429"
},
{
"rank": 5,
"country": "Pakistan",
"population": "253,355,246"
},
{
"rank": 6,
"country": "Nigeria",
"population": "235,236,687"
},
{
"rank": 7,
"country": "Brazil",
"population": "212,429,526"
},
{
"rank": 8,
"country": "Bangladesh",
"population": "174,685,176"
},
{
"rank": 9,
"country": "Russia",
"population": "144,383,622"
},
{
"rank": 10,
"country": "Ethiopia",
"population": "133,857,477"
},
{
"rank": 11,
"country": "Mexico",
"population": "131,435,427"
},
{
"rank": 12,
"country": "Japan",
"population": "123,408,339"
},
{
"rank": 13,
"country": "Egypt",
"population": "117,503,439"
},
{
"rank": 14,
"country": "Philippines",
"population": "116,342,674"
},
{
"rank": 15,
"country": "D.R. Congo",
"population": "111,146,912"
},
{
"rank": 16,
"country": "Vietnam",
"population": "101,310,981"
},
{
"rank": 17,
"country": "Iran",
"population": "92,017,241"
},
{
"rank": 18,
"country": "Turkey",
"population": "87,585,903"
},
{
"rank": 19,
"country": "Germany",
"population": "84,299,001"
},
{
"rank": 20,
"country": "Thailand",
"population": "71,642,488"
}
],
"timestamp": "2025-01-10 20:59:38"
}
```