Skip to content

Instantly share code, notes, and snippets.

View Robinlovelace's full-sized avatar

Robin Lovelace Robinlovelace

View GitHub Profile
@kadyb
kadyb / fastrbindsf.R
Created February 18, 2023 11:24
Fast rows combine in {sf}
## This function is faster alternative to `rbind()` in the {sf} package.
## Basically, it uses `collapse::unlist2d()` to combine rows.
## See also: https://github.com/r-spatial/sf/issues/798
fastrbindsf = function(x, check = FALSE) {
if (length(x) == 0) stop("Empty list")
if (isTRUE(check)) {
ref_crs = sf::st_crs(x[[1]])
ref_colnames = colnames(x[[1]])
for (i in seq_len(length(x))) {
####
####
#### AIM: Use PCT data to create scenario of change where commuting cycling levels increase and car journeys decrease which can be imported
#### into A/B Street city simulation software. This method should be fully reproducible for other pct_regions.
####
####
#### LIBRARYS ####
library(pct)
library(sf)
library(tidyverse)
library(magrittr)
library(sf)
library(lwgeom)
library(sfnetworks)
library(osmdata)
library(ggspatial)
library(mapview)
library(tidygraph)
library(SpatialPosition)
@noamross
noamross / find_local_tweeps.R
Created August 14, 2017 23:43
A visit to Durham
library(rtweet) #rtweet API creds should already be set up
library(stringi)
library(dplyr)
friends = get_friends(user="noamross")
followers = get_followers("noamross")
tweeps_id = distinct(bind_rows(friends, followers))
tweeps_info = lookup_users(tweeps_id$user_id)
# A regex for a visit to Durham
@alehandrof
alehandrof / simpletask gtd.md
Last active April 26, 2024 17:59
How to GTD with Simpletask

How to GTD with Simpletask

This is a guide to implementing Getting Things Done (GTD) using [Simpletask][] by [Mark Janssen][].

Simpletask uses the [todo.txt][] syntax, but has sufficient differences and quirks of its own to be worth describing in detail---at least, that's the story I'm going with. I actually began this guide as an exploration of my own trusted system. Personal workflows are by definition eccentric; I have included only what seems to me to be broadly useful.

This implementation of GTD covers the "standard" classifications: next actions by context, projects, somedays, agendas by person and meeting, etc. In a departure from strict GTD, each entry in these lists is also tagged with an area of focus, interest or responsibility. I find that the ability to slice the system by this extra dimension is worth the additional complexity at the processing and organizing stages. Limitations, issues and workarounds are discussed at the end.

Before we begin, some words of wisdom