Skip to content

Instantly share code, notes, and snippets.

View RMHogervorst's full-sized avatar
😁
we have status now?

Roel Hogervorst RMHogervorst

😁
we have status now?
View GitHub Profile
@djnavarro
djnavarro / molten_heart4.R
Created December 1, 2019 00:03
fifty shades of pink
#install.packages("remotes")
#remotes::install_github("djnavarro/jasmines")
#remotes::install_github("djnavarro/fifty")
library(jasmines)
library(dplyr)
set.seed(125)
seed_heart(10000) %>%
mutate(
x = x * 35,
#Urban Complexity
library(tidyverse)
library(tmap)
library(tmaptools)
library(osmdata)
library(sf)
library(stplanr)
library(igraph)
gh_migrate("YOUR_GITHUB_USERNAME", "GITHUB_REPO")
gitea_user <- function(gitea_username,
api_endpoint = Sys.getenv("GITEA_BASE_URL"),
gitea_token = Sys.getenv("GITEA_PAT")) {
require("httr", quietly = TRUE)
require("jsonlite", quietly = TRUE)
httr::GET(
@oliveratgithub
oliveratgithub / emojis.json
Last active July 25, 2024 07:18
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
library(data.table)
library(gganimate)
library(ggplot2)
#toy example data
dt = data.table(time=1:10, x=round(runif(10, 50, 100), 0))
#number of frames per bar
n_frames_per_bar = 20
#create sequence per time (to imitate the bar growing from ground)
@hadley
hadley / advise.md
Created February 13, 2015 21:32
Advise for teaching an R workshop

I think the two most important messages that people can get from a short course are:

a) the material is important and worthwhile to learn (even if it's challenging), and b) it's possible to learn it!

For those reasons, I usually start by diving as quickly as possible into visualisation. I think it's a bad idea to start by explicitly teaching programming concepts (like data structures), because the pay off isn't obvious. If you start with visualisation, the pay off is really obvious and people are more motivated to push past any initial teething problems. In stat405, I used to start with some very basic templates that got people up and running with scatterplots and histograms - they wouldn't necessary understand the code, but they'd know which bits could be varied for different effects.

Apart from visualisation, I think the two most important topics to cover are tidy data (i.e. http://www.jstatsoft.org/v59/i10/ + tidyr) and data manipulation (dplyr). These are both important for when people go off and apply

@virtadpt
virtadpt / Ironmonger
Created July 8, 2014 17:16
Huginn Agent Scenario: Ironmonger
{
"name": "Ironmonger",
"description": "Ironmonger is a network of agents which watches the stock prices of the 20 biggest defense contractors in the United States and alerts if their stock prices jump by more than three (3) standard deviations, meaning that one or more has just won a big contract and something's coming. Send an e-mail if something happens.",
"source_url": false,
"guid": "88f6cd314e66146e2314b6860c9e91d5",
"exported_at": "2014-07-08T17:15:18Z",
"agents": [
{
"type": "Agents::PeakDetectorAgent",
"name": "Ironmonger - Watch for rapid stock price changes",