R

ROracle, SQL, and other things I forgot

This week marks me reinstalling {ROracle} and looking into accessing our datawarehouse directly from R. Something I had pushed for a quite a while now. Getting up and running Installing ROracle on our work laptops is not a “straight forward” excercise. There exists also quite a number of blog posts and messages highlighting that this is generally a pain on other systems as well. For ECTRL check out the installation guide set-up by Enrico.

Writing a paper with bookdown and rticles IEEE

Part of my regular activities is writing papers for conferences. Over time, I have developed a skeleton to get me kick-started. Since moving to R & RMarkdown, there is a bit of infrastructure setup involved. Voila my YAML and basic paper structure for a {bookdown}-supported paper using {rticles}’ IEEE template. Just paste and copy … and get going! --- title: "Building Back Better – Democratisation of Performance Monitoring with Open Data" date: "09 June 2021" output: bookdown::pdf_book: base_format: rticles::ieee_article bibliography: "DASC2021.

TinyTex on work PC

Once every so often I run into problems with TinyTex on my Windows work laptop. And every time this happens, I realise that I should have jotted down what I did to overcome the issues. issues We cannot use the built in install_tinytex() as this puts the installation in the wrong place. From time to time additional LATEX packages need to be added. download and setup At work we have no admin rights on our laptops.

Scraping country codes and ICAO id from wikipedia

Overview At the time being I am working on a project aiming to derive flight statistics from the COVID data set published by Opensky Network on a global country level. This data set comprises for a good share of flights only the last and first detected position. My idea is therefore to link these positions with the country to complement the “local” count, if no departure (origin) or destination airport is provided in the dataset.

Extracting airport data from World Airports

Overview A quick API query to extract airport data, in particular the aerodrome reference point in R. httr and jsonlite {httr} and {jsonlite} super powers to help: ################## AIRPORT INFORMATION ################################## # https://www.airport-data.com/api/ap_info.json?icao=ESSA library(httr) library(jsonlite) # helper function to retrieve apt information get_apt_info <- function(.icao){ request <- httr::GET("https://www.airport-data.com/api/ap_info.json", query = list(icao=.icao)) payload <- jsonlite::fromJSON(rawToChar(request$content)) payload <- tibble::as_tibble(payload) return(payload) } apt <- get_apt_info("ESSA") %>% rename(ICAO = icao, LAT = latitude, LON = longitude) %>% mutate(LAT = as.

Up and running with Xaringan

Overview For the upcoming round of LearnR at work I plan to make - finally - use of Xaringan slides. Xaringan is based on the remark.js and produces html5-slides. Preparation As usual … install the package from CRAN install.packages("xaringan") or make use of the development version from github: ## only install devtools if needed ## #install.packages(devtools) devtools::install_github('yihui/xaringan') Kick-off a presentation To create a xaringan presentation, you create an R Markdown document with the xaringan::moon_reader output format.

Hello R Markdown

R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. You can embed an R code chunk like this: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.