chore: cleanup
move to own github version of openSkies for new auth
This commit is contained in:
20
renv.lock
20
renv.lock
@@ -1897,12 +1897,13 @@
|
|||||||
},
|
},
|
||||||
"openSkies": {
|
"openSkies": {
|
||||||
"Package": "openSkies",
|
"Package": "openSkies",
|
||||||
"Version": "1.2.2",
|
"Version": "1.2.1",
|
||||||
"Source": "Repository",
|
"Source": "GitHub",
|
||||||
"Type": "Package",
|
"Type": "Package",
|
||||||
"Title": "Retrieval, Analysis and Visualization of Air Traffic Data",
|
"Title": "Retrieval, Analysis and Visualization of Air Traffic Data",
|
||||||
"Date": "2025-08-20",
|
"Date": "2024-04-03",
|
||||||
"Authors@R": "c( person(\"Rafael\", \"Ayala\", email = \"rafaelayalahernandez@gmail.com\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0002-9332-4623\")), person(\"Daniel\", \"Ayala\", email = \"dayala1@us.es\", role = \"aut\", comment = c(ORCID = \"0000-0003-2095-1009\")), person(\"David\", \"Ruiz\", email = \"druiz@us.es\", role = \"aut\", comment = c(ORCID = \"0000-0003-4460-5493\")), person(\"Aleix\", \"Sellés\", role = \"aut\"), person(\"Lara\", \"Selles Vidal\", email = \"lara.selles@oist.jp\", role = \"aut\", comment = c(ORCID = \"0000-0003-2537-6824\")))",
|
"Author": "Rafael Ayala, Daniel Ayala, David Ruiz, Aleix Sellés, Lara Sellés Vidal",
|
||||||
|
"Maintainer": "Rafael Ayala <rafael.ayala@oist.jp>",
|
||||||
"Description": "Provides functionalities and data structures to retrieve, analyze and visualize aviation data. It includes a client interface to the 'OpenSky' API <https://opensky-network.org>. It allows retrieval of flight information, as well as aircraft state vectors.",
|
"Description": "Provides functionalities and data structures to retrieve, analyze and visualize aviation data. It includes a client interface to the 'OpenSky' API <https://opensky-network.org>. It allows retrieval of flight information, as well as aircraft state vectors.",
|
||||||
"Acknowledgements": "The development of this software is supported by the Spanish Ministry of Science and Innovation (grant code PID2019-105471RB-I00) and the Regional Government of Andalusia (grant code P18-RT-1060).",
|
"Acknowledgements": "The development of this software is supported by the Spanish Ministry of Science and Innovation (grant code PID2019-105471RB-I00) and the Regional Government of Andalusia (grant code P18-RT-1060).",
|
||||||
"License": "CC BY-NC 4.0",
|
"License": "CC BY-NC 4.0",
|
||||||
@@ -1928,6 +1929,7 @@
|
|||||||
"knitr",
|
"knitr",
|
||||||
"BiocStyle",
|
"BiocStyle",
|
||||||
"RUnit",
|
"RUnit",
|
||||||
|
"BiocGenerics",
|
||||||
"rmarkdown",
|
"rmarkdown",
|
||||||
"markdown"
|
"markdown"
|
||||||
],
|
],
|
||||||
@@ -1935,9 +1937,13 @@
|
|||||||
"BugReports": "https://github.com/Rafael-Ayala/openSkies/issues",
|
"BugReports": "https://github.com/Rafael-Ayala/openSkies/issues",
|
||||||
"NeedsCompilation": "no",
|
"NeedsCompilation": "no",
|
||||||
"Encoding": "UTF-8",
|
"Encoding": "UTF-8",
|
||||||
"Repository": "https://packagemanager.posit.co/cran/latest",
|
"Repository": "CRAN",
|
||||||
"Author": "Rafael Ayala [aut, cre] (ORCID: <https://orcid.org/0000-0002-9332-4623>), Daniel Ayala [aut] (ORCID: <https://orcid.org/0000-0003-2095-1009>), David Ruiz [aut] (ORCID: <https://orcid.org/0000-0003-4460-5493>), Aleix Sellés [aut], Lara Selles Vidal [aut] (ORCID: <https://orcid.org/0000-0003-2537-6824>)",
|
"RemoteType": "github",
|
||||||
"Maintainer": "Rafael Ayala <rafaelayalahernandez@gmail.com>"
|
"RemoteHost": "api.github.com",
|
||||||
|
"RemoteUsername": "eneller",
|
||||||
|
"RemoteRepo": "openSkies",
|
||||||
|
"RemoteRef": "main",
|
||||||
|
"RemoteSha": "6841db8a4cd483260c95146a7531973b692d553a"
|
||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"Package": "openssl",
|
"Package": "openssl",
|
||||||
|
|||||||
31
src/main.Rmd
31
src/main.Rmd
@@ -10,8 +10,8 @@ date: "`r Sys.Date()`"
|
|||||||
knitr::opts_chunk$set(echo = TRUE)
|
knitr::opts_chunk$set(echo = TRUE)
|
||||||
```
|
```
|
||||||
|
|
||||||
# Load Library
|
```{r preamble, message=FALSE}
|
||||||
```{r preamble, echo=FALSE}
|
# Load Libraries
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
library(lubridate)
|
library(lubridate)
|
||||||
library(readr)
|
library(readr)
|
||||||
@@ -20,26 +20,27 @@ library(openSkies)
|
|||||||
library(dotenv)
|
library(dotenv)
|
||||||
library(httr)
|
library(httr)
|
||||||
library(jsonlite)
|
library(jsonlite)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Download flights
|
# Download flights
|
||||||
```{r include=FALSE}
|
```{r opensky_lib, include=FALSE}
|
||||||
#
|
|
||||||
#time_now <- Sys.time()
|
time_now <- Sys.time()
|
||||||
#time_one_hour_ago <- time_now - 3600
|
time_one_hour_ago <- time_now - 3600
|
||||||
#
|
|
||||||
## get departures from frankfurt airport
|
# get departures from frankfurt airport
|
||||||
#flights <- getAirportDepartures(airport = "EDDF", startTime = time_one_hour_ago, endTime = time_now)
|
flights <- getAirportDepartures(airport = "EDDF", startTime = time_one_hour_ago, endTime = time_now )
|
||||||
#
|
print(paste("Found flights:", length(flights)))
|
||||||
#print(paste("Found flights:", length(flights)))
|
head(flights)
|
||||||
#head(flights)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```{r openskies, include=FALSE}
|
```{r opensky_rest, include=FALSE}
|
||||||
load_dot_env()
|
# gets opensky data using the REST API at https://openskynetwork.github.io/opensky-api/rest.html
|
||||||
|
|
||||||
my_client_id <- Sys.getenv("OPENSKY_CLIENT_ID")
|
my_client_id <- Sys.getenv("OPENSKY_CLIENT_ID")
|
||||||
my_client_secret <- Sys.getenv("OPENSKY_CLIENT_SECRET")
|
my_client_secret <- Sys.getenv("OPENSKY_CLIENT_SECRET")
|
||||||
|
|
||||||
token_url <- "https://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token"
|
token_url <- "https://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token"
|
||||||
|
|
||||||
token_resp <- POST(
|
token_resp <- POST(
|
||||||
|
|||||||
Reference in New Issue
Block a user