Project with use of AWS that is used to visualize airplanes that are located in Poland. This branch is used as simplified version of entire project.
AWS EC2 instance is used for running continuous program that send request to Opensky-Api in order to get data such as:
about all airplanes that are currently above geographic bounding box (49.0273953314, 54.8515359564, 14.0745211117, 24.0299857927) (min_latitude, max_latitude, min_longitude, max_latitude) that is based on the extreme geographical points of Poland. These data (together with timestamp of performed request) are then send to Kinesis data stream.
Kinesis data stream gets data about airplanes and distribute them to different shards, that provide them into AWS Lambda.
Because data received from Opensky-Api contain data about all airplanes in specified geographic bounding box, then these contains data about airplanes above Poland, and some of neighboring countries. AWS Lambda is then used in order to remove data about airplanes that aren't above Poland. On the end of AWS Lambda function, the most important data are saved into AWS DynamoDB tables.
AWS DynamoDB is used as storage for historical and last data of airplanes above Poland in two tables.
Table for historical data has primary key which is ICAO24 of airplane and sort key which is timestamp of sending request to Opensky-API
Table for last data has only primary key which is ICAO24. Lack of sort key enable to overwrite data for each airplane
Each table contain following columns:
Local Machine (that is personal computer) is used to repeatedly reading data from DynamoDB table with last airplanes data and visualize them with use of Mapbox.
Create virtual environment:
python -m virtualenv venv
cd venv/Scripts/activate
Create account on OpenSky-api: https://opensky-network.org/index.php?option=com_users&view=registration
Create account on Mapbox: https://www.mapbox.com/maps/
ssh-keygen -o
cat ~/.ssh/id_rsa.pub
mkdir Projects
cd Projects
git clone git@github.com:jwszol-classes/isp-2020-ZekJakGynDam.git
cd isp-2020-ZekJakGynDam/
source ./ec2_setup.sh
python aws_services_creator.py
Configuration is similar to the one described in EC2 section
download AWS installer from: https://awscli.amazonaws.com/AWSCLIV2.msi and install it
create folder for AWS credentials file in following path:
C:\Users\USER
where "USER" is user name
open labs.vocareum page
click Account Details
click show
copy showed text
paste it into
C:\Users\USER\.aws\credentials
paste following text
[default]
region = us-east-1
output = json
into
C:\Users\USER\.aws\config:
run following command in virtual environment
pip install -r requirements.txt
Prepare credentials.json file in main project directory by duplicate credentials_default.json and changing its name (don't add this file to repository!). Fill places with your registrations, access tokens data, aws vocareum cookies data etc.
On EC2 instance run to read airplanes data:
python kinesis\producer.py
On local machine run to visualization airplanes:
python visualisation_animation_plotly.py
Open following url link in browser:
http://127.0.0.1:8050/