đź‘Ą EPFL Graphsociatif
A force graph visualization of the associative network at EPFL.
This project provides a set of Python scripts to retrieve, process, and visualize information about units and accreditations of associations at EPFL (École Polytechnique Fédérale de Lausanne).
To run the scripts, you need the following:
- Python 3.x installed on your machine.
- Access to the EPFL network via VPN or Wi-Fi. The scripts require network access to the EPFL LDAP server.
- Clone or download this repository to your local machine.
- Make sure you have the
utils.py
script in the same directory. - Open a terminal or command prompt and navigate to the project directory.
- Install the required Python packages by running:
pip install -r requirements.txt
To retrieve and process unit and accreditation data, follow these steps:
-
Open a terminal or command prompt in the project directory.
-
Run the following command to execute the data retrieval and processing script:
python scrap.py
This script performs the following tasks:
- Retrieves the list of associations units and units groups from EPFL's search API and stores them in
units.json
andgroups.json
. - Retrieves accreditations from the EPFL LDAP server and stores them in
accreds.json
. - Computes the size of each unit and updates
units.json
. - Computes user details and the number of accreditations for each user, saving the results in
users.json
. - Computes links between units and users and saves them in
links.json
. - Writes a consolidated data file named
data.json
.
To visualize the data just open the index.html
file in a web browser with a web server.
The HTML file provides an interactive visualization of the relationships between units and users. It uses D3.js with d3-force to render the graph.
You can further customize the visualization in the index.html
file or modify D3.js parameters in the network.js
file.
This project is licensed under the MIT License - see the LICENSE file for details.