Skip to content

Instantly share code, notes, and snippets.

View rafapereirabr's full-sized avatar

Rafael H M Pereira rafapereirabr

View GitHub Profile
@stmarcin
stmarcin / quick_gtfs_map_r5r
Created October 22, 2021 19:51
quick and dirty map to test new {r5r} function transit_network_to_sf()
# settings & libraries
library(r5r)
library(sf)
library(dplyr)
library(ggplot2)
# used but not loaded
# library(eurostat)
# library(here)
# library(rJava)
# library(osmextract)
@kuanb
kuanb / peartree.ipynb
Last active April 2, 2023 20:00
First stab at using Partridge as the basis for generating a NetworkX Graph of a GTFS feed (please note this is just a hacky sketch)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Shiny app to highlight on a Leaflet map by brushing a Plotly chart. Run for yourself with (provided all of the packages are installed):

shiny::runGist('da941dac84f730adcdde')

To get this to work on another dataset, you're going to need to have a sequential ID variable that matches the pointNumber column in the data frame generated by Plotly's event_data. See the setup.R script for how this was derived.

library(ggplot2)
library(dplyr)
library(tidyr)
library(stringr)
library(scales)
library(gridExtra)
library(grid)
# use the NPR story data file ---------------------------------------------
# and be kind to NPR's bandwidth budget
@clhenrick
clhenrick / README.md
Last active April 1, 2024 14:55
PostgreSQL & PostGIS cheatsheet (a work in progress)