This streamlit application allows users to input a UK postcode and retrieve deprivation statistics for that area based on the indicies of Multiple deprivation (IMD) 2019 data.
-
Look up deprivation statistics by postcode
-
View detailed descriptions of each statistic to understand their meaning
The application is organized into two modules for better code organization and maintainability:
- Front end module (imd_streamlit_app.py): Contains the streamlit app code for user interaction and display
- Back end module (imd_backend.py): Contains functions responsible for data retrieval and processing.
- Interactive postcode lookup: Input any UK postcode to retrieve the corresponding deprivation statistics.
- Deprivation statistics Display: Show key statistics such as IMD Rank, IMD Decile, Income score, emloyement scor.
- Descriptions tabs: Provides detailed explanations of each description
- Python 3.10 or hight: ensure python is installed on your system
- Requried python libaries
- streamlit
- requests
- pandas
- Clone or download repo
git clone https://github.com/wilson101xx/imd_deprevation.git
- Create a virtual enviroment (This is optional)
python -m venv venv
- Activate
- Windows:
venv/scripts/activate
- Mac/Linux:
source venv/bin/activate
- Windows:
- Install required libaries
pip install -r requirments.txt
imd_streamlit_app.py
: The main streamlit application file containing the user interfaceimd_backend.py
: Contains the backend functions for data retrieval and processing.
- ensure both files are in same directory
- run the streamlit app
streamlit run imd_streamlit_app.py
- Access the app on your browser http://localhost:8501