Major ggspatial updates

by on March 28, 2017

I took the day to update ggspatial an old R project that was never published to CRAN. The idea is to create ggplot layer() calls from sp Spatial* objects using a consistent interface. Last year I wrote a blog post about how that might work, and while the usage hasn’t changed much, the implementation is […]

Line-by-line, row-by-row…

by on March 27, 2017

The NatChem database from Environment Canada contains the best long-term atmospheric monitoring data that exists for Canada, similar to the National Atmospheric Deposition Program (NADP) in the US. Unlike the NADP, the distribution format associated with NatChem data is a hideous export format that looks like it was used by SAS at one point. readLines(“natchem_sample.CSV”, […]

Processing sub-bottom profiling data in Python

by on November 17, 2016

In addition to processing bathymetric data, my research on lakes requires sub-bottom profiling, or the collection of low-energy seismic data collected similarly to bathymetric data. The system we use is the SyQwest HydroBox, which, due to many hardware and software limitations, has been particularly frustrating. Still, when it does work properly, the HydroBox data has […]

apply() yourself in R

by on November 14, 2016

A few months ago I wrote what I thought was a quite useful post on list comprehensions in R, which, after working with numerous datasets since, I have realized is almost useless. In the post, I suggested a few ways to go about generating vectors of data using non-vectorized functions. Packages such as foreach, plyr, […]

Holes in ggplot polygons

by on July 13, 2016

As part of my efforts to construct an R package connecting ggplot and Spatial objects, I came across an issue with ggplot involving holes in polygons. According to the collective knowledge of StackOverflow, it’s possible to make this happen by putting the coordinates in the correct clockwise/counterclockwise order, extending geom_polygon() somehow, or other really complicated […]

The missing list comprehensions in R

by on March 13, 2016

The first problem I had with making the move to R from Python was the lack of the list comprehension, which in python lets you easily create new vectors (well, lists, because it’s Python) by evaluating a function. In R this is mostly taken care of because all the base functions (and most package functions) […]

WP Facebook Like Send & Open Graph Meta powered by