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.
- 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.
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
Hosted on Streamlit Community Cloud. Expect a heavy cold start, or even a manual start.
https://worldbank.streamlit.app