Use geom_rect or geom_polygon from ggplot2 for shading effects

Use geom_rect or geom_polygon from ggplot2 for shading effects

In this post I build two graph examples where my colleagues desired some shading effects in order to emphasize certain data. For this task, I used geom_rect() and geom_polygon() from the ggplot2 package. While geom_rect() draws rectangles (as its name suggests), with geom_polygon() one can draw rectangles and more, allowing for more flexibility. geom_polygon() is a bit more complex to use.

Written with Rmarkdown and rendered as html on Rpubs here.

Pacific centered map with Voronoi tessellation and text labels repel away from each other

Pacific centered map with Voronoi tessellation and text labels repel away from each other

The main steps for this map consist in getting country polygons data, cropping and shifting the geographical coordinates for a Pacific view, labeling some entities (here some small landmasses in Pacific) and adding boundaries between them using Voronoi tessellation method.

Written with Rmarkdown and rendered as html here, by courtesy of htmlpreview.github.io. Also published on RPubs here.

bootstrapnet – an R package to bootstrap indices of ecological networks

bootstrapnet – an R package to bootstrap indices of ecological networks

I recently wrote an R package for my colleagues, which wraps around the commonly used package bipartite (CRAN link here), to resample network (web) indices / metrics and further build rarefaction/accumulation curves of these indices for comparison reasons (of different treatments), especially when the number of interactions varies between treatments.

I build a GitHub site here, and its GitHub repository is here. Feel free to submit issues/suggestions here.

Exactly as bipartite, this package is useful for research on two levels ecological webs, like plant-pollinator webs/networks/interactions or predator-prey-webs. Such research is useful for informing decision makers about how to best manage, for example, grasslands containing various types of plant-pollinator webs.

Whirlpool tumble dryer, AWZ 7813 – squeaking noise; changing the idler assembly (the pulley jokey)

Whirlpool tumble dryer, AWZ 7813 – squeaking noise; changing the idler assembly (the pulley jokey)

Besides programming I am also interested in trying to fix stuff or break them while trying to “fix” them … I recently got an used Whirlpool tumble dryer, model “AWZ 7813”. The poor thing made a lot of noise and I decided to have a look inside. Of course, a good idea is to get the service manual – see manualslib.com here. This obviously helps a lot with figuring out haw pieces fit together.

Continue reading “Whirlpool tumble dryer, AWZ 7813 – squeaking noise; changing the idler assembly (the pulley jokey)” →

Euclidean vs. Geodesic Buffering in R

Euclidean vs. Geodesic Buffering in R

I posted recently a question on gis.stackexchange.com (Euclidean and Geodesic Buffering in R) and I’m looking forward if there is a more straightforward way to do geodesic buffering in R. As explained in Understanding Geodesic Buffering one should prefer geodesic over euclidean buffering when working at global scale due to projection distortions. Continue reading “Euclidean vs. Geodesic Buffering in R” →