visualization

Deploy machine learning models with R Shiny and ONNX

Python is often the go-to language for machine learning, especially for training deep learning models using the PyTorch or TensorFlow libraries. Python definitely provides nice tools for deploying such models on the web as REST APIs or GUI web applications. However, models can also be exported to the ONNX format and subsequently be used for inference using an ONNX runtime. Conversion to ONNX format, as opposed to doing inference using PyTorch, is beneficial as the ONNX runtime comes in a much smaller package in terms of size and is very efficient.

Parsing sonar data in Python using NumPy

Recreational-grade sonar equipment can collect vast amounts of data. Unfortunately, the data is often hidden in some kind of proprietary binary format. However, efforts in reverse engineering such formats have made it possible to extract of the information. I have spent time tracking down some this information which has resulted in a R-package as well which can read ‘.sl2’ and ‘.sl3’ file formats collected using Lowrance sonar equipment. See also the sllib Python library which fills a similar gap.

Shiny app for interactive time-series processing

Recently, there was a need for a way to cut and manipulate some timeseries data that had been collected to quantify greenhouse gas emissions. After collection, it is necessary to manually explore the data and select parts of the time-series for further analysis. This was an obvious case for an R Shiny app that could easily be shared with others and used for interactive processing of the data. Furthermore, the short time from idea –> sketch –> prototype –> test –> deployment is just incredible.

Creating mosaics from Sentinel 2 satellite imagery

Satellite imagery are collected at large scale and made freely available by institutions ESA and NASA. This data is collected at high spatial (10-30 m) and temporal (~2 weeks) resolution making it ideal for many applications. However, going from raw satellite imagery to nice looking image mosaics can be quite a mouthful. Here, I show how to use the gdalcubes R-package to produce a nationwide image mosaic of Denmark.

Shiny apps for creating lake bathymetric maps

In a previous post I showed how to use R for creating bathymetric maps for lakes. To make this process even easier, I have created two apps using Shiny. The maps can be downloaded, opened in Google Earth on both desktop and mobile making it easy to bring along. Try theme out! Shiny for interactive data exploration The R Shiny framework is a simple way to turn R analysis or pipelines into interactive web applications.

Bathymetric maps and interpolation with R

Knowing the depth of in aquatic environments are of interest to many e.g. sailors in coastal waters or anglers in lakes. We can measure the depth at different geographic coordinates and use this information to produce bathymetric maps and contour lines. Often however, measurements are only obtained from relatively few points which means that interpolation is required to produce continuous and pretty maps. Higher quality maps can be produced using modern sonar and echo-sounder technology but this may also require gaps to be interpolated.

Politics and environmental monitoring of aquatic systems

Monitoring of the aquatic environment is necessary to support proper management. The Environmental Protection Agency and Danish Centre For Environment And Energy are responsible for the large scale monitoring of the aquatic environment in Denmark. This covers lakes, streams, coastal habitats and more. Recent and historic monitoring data are publicly available from the surface water database ODA. This is an amazing initiative which I use extensively in my research.