Skip to content

Instantly share code, notes, and snippets.

View etiennebr's full-sized avatar

Etienne B. Racine etiennebr

  • Intact Lab
  • Montreal
View GitHub Profile
@krlmlr
krlmlr / Rprofile-entrace
Last active January 7, 2021 01:59
Pretty stack traces in R
# Add this to your .Rprofile
options(
error = quote(rlang::entrace()),
rlang__backtrace_on_error = "collapse" # or "branch" or "full"
)
@jschoeley
jschoeley / bubble-grid-maps.R
Created July 1, 2018 14:35
Bubble-grid-maps in R
# BUBBLE-GRID-MAPS
# Jonas Schöley (cc-by)
library(eurostat) # eurostat data
library(tidyverse) # tidy data transformation
library(lubridate) # date and time support
library(sf) # simple features GIS
# download eurostat data of population counts by NUTS-3 region
euro_pop <-
library(rnaturalearth)
library(sf)
library(plotly)
library(crosstalk)
library(viridis)
ng <- ne_states(country = "Nigeria", returnclass = "sf") %>%
select(Name = name)
# Source: https://dhsprogram.com/pubs/pdf/FR293/FR293.pdf

1:1 questions

Always end with an assignment

What can I hold you accountable for next time we talk?

What can I be accountable to you for the next time we talk?

Short term

How is [project] going? What could we do to make it better?

Is there anything blocking you from getting your work done?

Are there any projects you’d really like to work on if you were given the opportunity?

@jcheng5
jcheng5 / README.md
Last active December 15, 2022 16:01
Using arbitrary Leaflet plugins with Leaflet for R

Using arbitrary Leaflet JS plugins with Leaflet for R

The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.

If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.

@ramnathv
ramnathv / orig.png
Created March 23, 2016 04:59 — forked from hrbrmstr/orig.png
Supreme Annotations - moar splainin here: http://rud.is/b/2016/03/16/supreme-annotations/ - NOTE: this requires the github version of ggplot2
orig.png
@sboysel
sboysel / rspatialresources.md
Last active September 5, 2022 15:28
R Spatial Analysis Notes

R Spatial Analysis Notes

Spatial Analysis in R

Key Packages

  • sp - defines the set of base classes for spatial data in R. Most useful for creating, converting, merging, transforming (e.g. projection), and plotting (see spplot) Spatial* objects.
  • rgdal - wrapper
anonymous
anonymous / index.html
Created December 17, 2015 02:30
JS Bin // source https://jsbin.com/xonujewayu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.radio label {
display: inline-block;
cursor: pointer;
position: relative;
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active April 25, 2024 15:14
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 26, 2024 18:01
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)