plot_flight_horizontal | R Documentation |
Plot the recorded positions of a flight on a map.
plot_flight_horizontal(
poss,
bbox = NULL,
buffer = 100,
legend.position = "none",
shape = NULL,
...
)
poss |
a dataframe of position reports with (at least)
|
bbox |
a bounding box in the format
|
buffer |
number of nautical miles (NM) around the bounding box (default 40) |
legend.position |
legend position as per ggplot2 (default "none", i.e. do not show it). |
shape |
shape of point to plot (default |
... |
Extra parameters to pass further on. |
a ggplot2
plot object.
Other plot:
plot_cpr_horizontal()
,
plot_flight_vertical_distance()
,
plot_flight_vertical_time()
## Not run:
library(dplyr)
# define the bounding box of interest
europe <- c(left = 5, bottom = 35, right = 30, top = 52)
plot_flight_horizontal(poss, europe)
plot_flight_horizontal(poss, buffer = 10) # 10km around the values
# from DB to plot
p <- export_flights_at_airport_fr24("2017-09-01T00:00:00Z",
"2017-09-02T00:00:00Z",
"SVG",
5.638, 58.877) %>%
# NOTE: convert till DB columns are properly changed
mutate(longitude = as.numeric(LON), latitude = as.numeric(LAT)) %>%
select(FLIGHT_ID, EVENT_TIME, longitude, latitude)
f <- export_flights_at_airport_fr24("2017-09-01T00:00:00Z",
"2017-09-02T00:00:00Z",
"SVG",
flow = "ARR") %>%
rename(callsign = CALLSIGN) %>%
select(FLIGHT_ID, callsign)
p1 <- p %>% left_join(f) %>% filter(!is.na(callsign))
plot_flight_horizontal(p1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.