https://github.com/mlucifer27/bilateral-visualization
Streamlit app visualizes bilateral relationship scores between 100 countries from 1945 to 2024. It supports interactive heatmaps, network graphs, pairwise comparisons, and more.
https://github.com/mlucifer27/bilateral-visualization
d3blocks data-analysis data-visualization plotly-python python streamlit
Last synced: 18 days ago
JSON representation
Streamlit app visualizes bilateral relationship scores between 100 countries from 1945 to 2024. It supports interactive heatmaps, network graphs, pairwise comparisons, and more.
- Host: GitHub
- URL: https://github.com/mlucifer27/bilateral-visualization
- Owner: mlucifer27
- License: mit
- Created: 2025-07-06T21:44:34.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-07-06T21:55:34.000Z (12 months ago)
- Last Synced: 2025-07-06T22:35:05.615Z (12 months ago)
- Topics: d3blocks, data-analysis, data-visualization, plotly-python, python, streamlit
- Language: Python
- Homepage: https://bilateral-visualization.streamlit.app/
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bilateral Relationship Visualization
This Streamlit app visualizes bilateral relationship scores between 100 countries from 1945 to 2024. It supports interactive heatmaps, network graphs, pairwise comparisons, and more.
## Features
- Heatmap of country-to-country relationships (overall, economic, political, security, cultural)
- Interactive tooltips and details on hover/click
- Year slider to explore changes over time
- Top-N strongest/weakest relationships
- Country relationship distribution (histogram, boxplot, summary stats)
- Country-to-network graph
- Pairwise comparison (table and line charts)
- Modular, efficient, and optimized for performance
## Screenshots








## Data
- `data/overall.csv`: Main dataset. Columns: `year`, `country1`, `country2`, `overall`, `economic`, `political`, `security`, `cultural`
- `data/countries.txt`: List of country names (one per line)
## Getting Started
### 1. Clone the repository
```bash
git clone https://github.com/mlucifer27/bilateral-visualization.git
cd bilateral-visualization
```
### 2. Install dependencies
It is recommended to use a virtual environment.
```bash
pip install -r requirements.txt
```
### 3. Run the app
```bash
streamlit run app.py
```
The app will open in your browser at `http://localhost:8501`.
## Deployment
### Streamlit Community Cloud
1. Push your code (including data files) to GitHub.
2. Go to [https://streamlit.io/cloud](https://streamlit.io/cloud) and sign in with GitHub.
3. Click "New app", select your repo, branch, and `app.py`.
4. Click "Deploy". Your app will be live at a public URL.
### Notes
- Ensure `data/overall.csv` and `data/countries.txt` are present in the repo for deployment.
- For large/private data, consider using cloud storage and loading data at runtime.
- For secrets, use Streamlit's [secrets management](https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app/secrets-management).
## Customization
- All key parameters (year range, colormap, figure size, etc.) are modularized in the code for easy adjustment.
- The app is structured for easy extension and optimization.
## License
MIT