This work has as purpose to analyze under different metrics the air traffic in Brazil. Besides that, it makes it possible upload your own dataset (.graphml
) and see all these analyses applied to him. Have fun!
Work of undergraduate course about Network Analysis (IMD1155) of Bachelor's degree in Information Technology from the Federal University of Rio Grande do Norte (UFRN), with Ivanovitch Medeiros Dantas da Silva as professor.
Group:
- Álvaro Ferreira Pires de Paiva
- Enrolment: 2016039162
- E-mail: alvarofepipa@gmail.com
- Marcos Vinícius Rêgo Freire
- Enrolment: 20210053533
- E-mail: mvinnicius22@hotmail.com
You can find the dataset used in this work in alvarofpp/dataset-flights-brazil
.
You can find a detailed approach of these metrics above:
Metric | Description |
---|---|
Diameter |
Diameter it is the shortest distance between the two most distant nodes in the network. |
Radius |
The Radius of a network is the minimum eccentricity. |
Periphery |
The Periphery of a network is a set of all nodes whose eccentriciy is equals the diameter. |
Degree Centrality |
Degree Centrality assigns an importance score based simply on the number of links held by each node. |
Betweenness Centrality |
Betweenness Centrality shows which nodes are "bridges" between nodes in a network. |
Closeness Centrality |
The Closeness Centrality scores each node based on their "closeness" to all other nodes in the network. |
Eigenvector Centrality |
The Eigenvector Centrality measures a node’s influence based on the number of links it has to other nodes in the network. |
k-core |
A k-core in a network is a subset of its nodes in which all nodes have at least k connections to each other. |
k-shell |
The k-shell of a graph G is the set of all nodes belonging to the k–core of G but not to the (k+1)–core. |
You can run the app in 3 different ways:
- Virtual environment;
- Docker container;
- Docker-compose.
In your environment:
# Install requirements for scripts
pip install -r requirements.txt
# (optional) If you want updates the data
python3 extract.py
# Run the app
streamlit run app.py
These instructions will cover usage information and for the docker container.
In order to run this app you'll need docker installed.
Step 1:
# Build the docker image
docker build -t streamlitapp:latest .
# Or specifying a file
docker build -t streamlitapp:latest .f Dockerfile
Step 2:
# Run a container
docker run -p 8501:8501 streamlitapp:latest
If you prefer to use docker-compose to run the app with others services, this is the section.
See the Docker prerequisites section before this section. After that, you need to install docker-compose:
After installed docker-compose, create a .env
file (you can see .env.example
as an example).
STREAMLIT_PORT
- The port the app runs on. By default, is8501
.
# Run the app
docker-compose up
Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.
This project is licensed under the MIT License - see the LICENSE.md file for details.