Publications by Matt Leonawicz
R Shiny App: Alaska Sea Ice Edge
A simple app for mapping estimates of Alaska sea ice edge during different months, years, and decades is now formally available. I made this app in R about six months ago and shared an earlier version on Twitter. I have cleaned up the code a bit. Most notably, it now offers somewhat more adaptive color options for a variable number of factor leve...
749 sym 4 img
Animated great circles 1: flat map to 3D Earth
More fun with great circle arcs. Who doesn’t love a good great circles graphic? This time, however, it is an animation. Using R, not only have I animated path traversal along great circle arcs, but I’ve also projected them onto a three dimensional global surface. It was not without its challenges. And yes, the title indicates there will be mo...
5086 sym 8 img
Updated climate projections by cities
[Alpha] and [beta] versions of a simple R Shiny web application showing projected climate trends for various Alaska and western Canada communities is available. [The alpha and beta versions are currently nonfunctional. But you can skip to the final version here. Some of the text below only pertains to the alpha and beta versions. See the new post...
1559 sym 4 img
Animated paths in R: toy example
Recently I have shared examples of animations made using R which feature traversal of pathways, specifically grid cell borders and great circle arcs. Here I provide the basic code required to generate a path sequence from a path. The fundamental ideas are as follows: Pathways are represented by lines. Lines are represented by a series of points...
3289 sym R (1050 sym/2 pcs) 4 img
Animated great circles 2: smoother lines
Here is draft two of my great circle arcs R animation. This time I focused on improving the smoothness of the lines and removing some buggy line behavior, keeping it on a flat map for now. As with DRAFT 1, the YouTube video is of significantly reduced quality, to the point that you will see zero improvement. It’s really not even worth watching ...
1374 sym 4 img
Climate projections by cities: R + Shiny + rCharts + leaflet
I have approached a final draft of my Community Charts version 4 Lite, now with leaflet map integration. This R Shiny web application shows projected climate trends for various Alaska and western Canada communities. Note that if no other users are already connected to the app, it will take a moment (maybe ten seconds?) to load the initial data se...
7873 sym R (1619 sym/4 pcs) 8 img
Lightning strike trend prediction with GBM in R
Lightning activity is projected to increase with climate change. Lightning activity is interesting to model with stochastic gradient boosting (GBM: generalized boosted regression models/gradient boosting machine) in R. One use I have for this at SNAP is in the context of landscape fire modeling with SNAP’s ALFRESCO model. The simulations from t...
1157 sym 4 img
R plot: Comparison of Fairbanks, Alaska and Beijing, China air quality
Here’s an interesting R plot comparing a specific air pollution metric between Fairbanks, Alaska and Beijing, China. Right off the bat, Beijing obviously has far worse air quality, and more significantly, it is a chronic, daily problem. But it is used for comparison because we already know this is the case. In Fairbanks, while air quality is k...
2090 sym 4 img
R animation: great circles 3, final draft
Here is the final draft of my great circle arcs R animation. I made this back in January shortly after my first two drafts, but am only now getting around to sharing it, which is a typical representation of how seldom I can make time for blogging. But given the recent spike in interest (thanks to Urban Demographics for sharing my work) in the fir...
5403 sym R (1040 sym/1 pcs) 5 img
R + htmlwidgets + DT + sparkline
Here are some examples with code where I use the R packages DT and sparkline to produce interactive data tables and inline graphs as well as inline graphs within data table cells. Both packages utilize the htmlwidgets package to interface with javascript libraries. With htmlwidgets you can create custom widgets to use specific javascript librarie...
950 sym 4 img