Giter VIP home page Giter VIP logo

dataset-flights-brazil's Introduction

Flights in Brazil

This repository have datasets with all flights in Brazil registered by ANAC (Agência Nacional de Aviação Civil - National Civil Aviation Agency), all airports involved in these flights and a undirected graph with the number of flights between two airports.

Sources:

After merging the datasets, the geocoder package was used to fill in the empty values.

Datasets

You can find the datasets in data/.

All flights in Brazil by ANAC. ANAC does not provide the data dictionary. You can use lrzip to decompress the file.

All airports on ANAC flight records.

Column Type Description Example
code string ICAO airport code "SNBG"
name string Airport name. "BAIXO GUANDU"
state string State where the airport is located. "ES"
region string Region where the airport is located. "SUDESTE"
country string Country where the airport is located. "BRASIL"
continent string Continent where the airport is located. "AMÉRICA DO SUL"
lat_geo_point double Latitude of the airport reference point. -19.498889
lon_geo_point double Longitude of the airport reference point. -41.041944

It's an undirected graph.

Node attributes

The id of each node is the ICAO airport code.

Column Type Description Example
name string Airport name. "GUARULHOS"
country string Country where the airport is located. "BRASIL"
latitude double Latitude of the airport reference point. -23.435556
longitude double Longitude of the airport reference point. -46.473056

Edge attributes

Column Type Description Example
flight_count int Number of flights carried out between these airports. 147

Scripts

  • extract.py - Download all CSV files and puts them in the data/extract folder.
  • transform_to_anac_csv.py - Merges all files downloaded from ANAC, rename the columns and create anac.csv.
  • transform_to_airports_csv.py - Creates a dataset with all airports (airports.csv).
  • transform_to_graphml.py - Creates an undirected graph (air_traffic.graphml).

Generate

In your environment:

# Install requirements for scripts
pip install -r requirements.txt

# Download csv files from sources
python3 extract.py

# Transform to final files
python3 transform_to_anac_csv.py
python3 transform_to_airports_csv.py
python3 transform_to_graphml.py

If you have Docker and Makefile installed on your machine, you can execute the make build command to create the image, followed by make shell to access a container and execute the aforementioned steps to generate the files.

To convert the data/anac.csv file into data/anac.csv.lrz, you must execute the following commands:

sudo apt install lrzip
lrzip -z data/anac.csv

Contributing

Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.

License

This project is licensed under the CDLA-Sharing-1.0 License - see the LICENSE file for details.

dataset-flights-brazil's People

Contributors

alvarofpp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.