This is a python Flask app data dashboard that pulls data from the World Bank API. The visualizations are made with the plotly library.
Here is a working version of the app: https://worldbank-api-flask-dashboard.herokuapp.com/
To get the app working locally:
- Clone or download the repository locally
- Within the world_bank_api_dashboard directory, create a virtual Python environment with the Terminal command
python3 -m venv flaskapp
whereflaskapp
is the name of your environment. You can choose any name. - Activate the virtual environment with the command
source flaskapp/bin/activate
- Then run the command
pip install -r requirements.txt
- Next, set the FLASK_APP variable to worldbank.py by running the following command
export FLASK_APP=worldbank.py
. - And finally, run the command
python -m flask run
to start the app - The terminal will output the local web address and port where the app is running. As an example, this might be
http://127.0.0.1:5000/
. Now, open a web browser and go to that web address.
You will need Python3 installed on your local machine.
Flask apps can be deployed to a variety of platforms. Here is an example for deploying the web app with Heroku.
- Install the Heroku command line interface
- Then, in the command line enter
heroku login
and enter your account name and password - Cd into the world_bank_api_dashboard repository folder
- In the command line, enter
heroku create
- Then enter
git push heroku master
- And finally 'heroku open'