Skip to content

A Streamlit app which fetches an overview data from the World Bank API.

License

Notifications You must be signed in to change notification settings

vlatan/world-bank-data

Repository files navigation

World Bank Data

A Streamlit app which fetches an overview data from the World Bank, specifically from the topics and their indicators defined in topics.json, and charts the data for selected countries.

Features

  • It makes heavy use of the asyncio Python native library to achieve concurrent I/O operations, namely API calls to World Bank.
  • If Redis service available it will cache the data fetched in Redis, if not it will failover to caching in memory.

Quick Start

Take a look at the example.env, create your own .env file in the root of this repo and adjust the environment variables.

Create/activate virtual environment and install the app dependencies.

python3 -m venv .venv &&
source .venv/bin/activate &&
pip install --upgrade pip &&
pip install -r requirements.txt

Run the app out of the box on localhost, on port 8501.

streamlit run run.py

If you want to make use of Docker use the the following command, which utilizes the compose.yaml file to spin the app and a Redis service in the background, which will make the app available on localhost, on port 8000.

docker compose up --build --remove-orphans -d

You can check out the app logs with:

docker compose logs -f app

Deployed

https://worldbank.streamlit.app

License

License: MIT

Releases

No releases published

Packages

No packages published