-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
87 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import pandas as pd | ||
|
||
from air_traffic.io import read_trajectories_range | ||
from air_traffic.trajectory import distance_hkia | ||
|
||
|
||
# --------------------------------------------------------------------------- # | ||
datadir = "../data/cleaned" | ||
|
||
start = "2017-01-01" | ||
end = "2017-01-31" | ||
|
||
# --------------------------------------------------------------------------- # | ||
dataset = read_trajectories_range(datadir, start, end, fname_only=True) | ||
|
||
for files in dataset: | ||
for f in files: | ||
|
||
print(f) | ||
df = pd.read_csv(f, header=0) | ||
|
||
lat = df["latitude"].to_numpy() | ||
lon = df["longitude"].to_numpy() | ||
time = df["time"].to_numpy() | ||
|
||
d = df.apply(distance_hkia, axis=1) | ||
|
||
# Save the result | ||
df = df.assign(distance=d) | ||
df.to_csv(f, index=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
BASEDIR=$(dirname "BASH_SOURCE") | ||
cd $BASEDIR | ||
echo "Start ..." | ||
|
||
# The raw data originally is stored as .zip files, | ||
# | ||
echo "Step 1: Extract flight trajectories from raw data..." | ||
python 1_extract.py | ||
|
||
echo "Step 2: Clean up extracted trajectory data..." | ||
python 2_filter.py | ||
|
||
echo "Step 3: Compute statistics from fixed entry ring..." | ||
python 3_stat_fixed_distance.py | ||
|
||
echo "Step 4: Compute distances..." | ||
python 4_distance_time_curves.py | ||
|
||
|
||
echo "All done!!" |