Skip to content

Instantly share code, notes, and snippets.

@hannes
Created November 30, 2017 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannes/d18a0f2f494db69e157abd753d6bf31d to your computer and use it in GitHub Desktop.
Save hannes/d18a0f2f494db69e157abd753d6bf31d to your computer and use it in GitHub Desktop.
# install.packages("MonetDBLite")
# install.packages("dbplot")
# install.packages("nycflights13")
# install.packages("ggplot2")
# install.packages("dplyr")
library("ggplot2")
library("dplyr")
library("dbplot")
src <- MonetDBLite::src_monetdblite()
monetdblite_flights <- copy_to(src, nycflights13::flights, "flights")
# this works
monetdblite_flights %>% dbplot_bar(origin)
monetdblite_flights %>% dbplot_bar(origin, mean(dep_delay))
monetdblite_flights %>% dbplot_line(month)
# this does not, missing window functions
monetdblite_flights %>% dbplot_histogram(sched_dep_time)
monetdblite_flights %>% dbplot_histogram(sched_dep_time, binwidth = 200)
monetdblite_flights %>% filter(!is.na(arr_delay)) %>% dbplot_raster(arr_delay, dep_delay)
monetdblite_flights %>% filter(!is.na(arr_delay)) %>% dbplot_raster(arr_delay, dep_delay, mean(distance))
monetdblite_flights %>% db_compute_bins(arr_delay)
# missing approx percentile (would also be nice)
monetdblite_flights %>% dbplot_boxplot(origin, dep_delay)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment