Skip to content

Instantly share code, notes, and snippets.

rich-iannone / subset.POSIXct.R
Last active Feb 23, 2021
Several examples in R on creating subsets of data via a POSIXct time object.
View subset.POSIXct.R
# Create a simple data frame for testing
df <- data.frame(POSIXtime = seq(as.POSIXct('2013-08-02 12:00'),
as.POSIXct('2013-08-06 05:00'), len = 45),
x = seq(45))
# The Subset Examples
# All data on 2013-08-06
sub.1 <- subset(df, format(POSIXtime,'%d')=='06')
Zverik / SingleTile.js
Last active Jul 4, 2018
A layer for single-tile WMS layers. Displays a layer as a big picture, updates it on pan and zoom. This is a hack, made for an internal project; still waiting for to be solved nicely. Example: L.singleTile('').setParams({layers: 'landsat'}).addTo(map); (won't work, because tha…
View SingleTile.js
* L.SingleTile uses L.ImageOverlay to display a single-tile WMS layer.
* url parameter must accept WMS-style width, height and bbox.
L.SingleTile = L.ImageOverlay.extend({
defaultWmsParams: {
service: 'WMS',
request: 'GetMap',
version: '1.1.1',