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": {
|
||||
"Package": "openSkies",
|
||||
"Version": "1.2.2",
|
||||
"Source": "Repository",
|
||||
"Version": "1.2.1",
|
||||
"Source": "GitHub",
|
||||
"Type": "Package",
|
||||
"Title": "Retrieval, Analysis and Visualization of Air Traffic Data",
|
||||
"Date": "2025-08-20",
|
||||
"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\")))",
|
||||
"Date": "2024-04-03",
|
||||
"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.",
|
||||
"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",
|
||||
@@ -1928,6 +1929,7 @@
|
||||
"knitr",
|
||||
"BiocStyle",
|
||||
"RUnit",
|
||||
"BiocGenerics",
|
||||
"rmarkdown",
|
||||
"markdown"
|
||||
],
|
||||
@@ -1935,9 +1937,13 @@
|
||||
"BugReports": "https://github.com/Rafael-Ayala/openSkies/issues",
|
||||
"NeedsCompilation": "no",
|
||||
"Encoding": "UTF-8",
|
||||
"Repository": "https://packagemanager.posit.co/cran/latest",
|
||||
"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>)",
|
||||
"Maintainer": "Rafael Ayala <rafaelayalahernandez@gmail.com>"
|
||||
"Repository": "CRAN",
|
||||
"RemoteType": "github",
|
||||
"RemoteHost": "api.github.com",
|
||||
"RemoteUsername": "eneller",
|
||||
"RemoteRepo": "openSkies",
|
||||
"RemoteRef": "main",
|
||||
"RemoteSha": "6841db8a4cd483260c95146a7531973b692d553a"
|
||||
},
|
||||
"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)
|
||||
```
|
||||
|
||||
# Load Library
|
||||
```{r preamble, echo=FALSE}
|
||||
```{r preamble, message=FALSE}
|
||||
# Load Libraries
|
||||
library(dplyr)
|
||||
library(lubridate)
|
||||
library(readr)
|
||||
@@ -20,26 +20,27 @@ library(openSkies)
|
||||
library(dotenv)
|
||||
library(httr)
|
||||
library(jsonlite)
|
||||
|
||||
```
|
||||
|
||||
# Download flights
|
||||
```{r include=FALSE}
|
||||
#
|
||||
#time_now <- Sys.time()
|
||||
#time_one_hour_ago <- time_now - 3600
|
||||
#
|
||||
## get departures from frankfurt airport
|
||||
#flights <- getAirportDepartures(airport = "EDDF", startTime = time_one_hour_ago, endTime = time_now)
|
||||
#
|
||||
#print(paste("Found flights:", length(flights)))
|
||||
#head(flights)
|
||||
```{r opensky_lib, include=FALSE}
|
||||
|
||||
time_now <- Sys.time()
|
||||
time_one_hour_ago <- time_now - 3600
|
||||
|
||||
# get departures from frankfurt airport
|
||||
flights <- getAirportDepartures(airport = "EDDF", startTime = time_one_hour_ago, endTime = time_now )
|
||||
print(paste("Found flights:", length(flights)))
|
||||
head(flights)
|
||||
```
|
||||
|
||||
|
||||
```{r openskies, include=FALSE}
|
||||
load_dot_env()
|
||||
```{r opensky_rest, include=FALSE}
|
||||
# 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_secret <- Sys.getenv("OPENSKY_CLIENT_SECRET")
|
||||
|
||||
token_url <- "https://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token"
|
||||
|
||||
token_resp <- POST(
|
||||
|
||||
Reference in New Issue
Block a user