This project aims to create a dashboard that enables a visual analysis of inter-countries sanctions from a business perspective using the OpenSanctions Default dataset from OpenSanctions.
Additionally, the 7+ Million Company Dataset from People Data Labs is joined in order to include affected industries.
- Install PostgreSQL & Python
- Download Files into a
datafolder (replace YYYYMMDD with the current data) - create virtual env and install the requirements
python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt - Create database and insert the data (+transformations)
- Create database
In the PostgreSQL editor insert the following SQL code:
sudo -u postgres psql
CREATE DATABASE sanctions; ALTER DATABASE sanctions OWNER TO sanctions; CREATE USER sanctions WITH ENCRYPTED PASSWORD 'sanctions'; ALTER DATABASE sanctions OWNER TO sanctions; GRANT ALL PRIVILEGES ON DATABASE sanctions to sanctions; GRANT ALL ON SCHEMA sanctions.public TO sanctions;
- Create schema
python3 ./util/DB.py sql/schema.sql
- Insert the OpenSanctions entries/ datasets and companies in the database (extract schemas & industries)
# Insert the OpenSanctions entries & datasets in the database and extract the schemas python3 ./util/ParseOpenSanctionsData.py download_datasets ./data/index.json python3 ./util/ParseOpenSanctionsData.py write_entities ./data/entities.ftm.json python3 ./util/ParseOpenSanctionsData.py extract_schemas ./data/schemas.txt # Insert the CompanyData in the database and extract the industries python3 ./util/ParserCompanySetData.py parser_company_set_data ./data/companies_sorted.csv python3 ./util/ParserCompanySetData.py extract_industries ./data/industries.txt
- Insert the countries and perform the SQL transformations to enable the
Country-Sanctions->countryanalysis. Furthermore, it adds indexes to increase the dashboards performance.python3 ./util/DB.py ./sql/countries.sql python3 ./util/DB.py ./sql/index_and_joins.sql
- Create database
- Start the Dashboard:
python3 sanctions_dashboard dashboard.py
This dashboard was created by TU Vienna student Nicolas Bschor in collaboration with WU Vienna Professor Dr. Jakob Müllner during the 'Interdisciplinary Project in Data Science' course for academic research of sanctions.
It may only be used for non-commercial purposes!
The data used in this dashboard is sourced from OpenSanctions (Sanctions Information) and People Data Labs (Company Industries).
We only applied various transformation techniques to allow the analysis without changing the information. Therefore, we cannot ensure completeness, correctness, or if the data is up to date. Users are advised to verify information independently, and the developers assume no responsibility for the consequences of its use. Use the dashboard at your own risk.


