Skip to content

Instantly share code, notes, and snippets.

@DavisVaughan
Created January 31, 2018 21:23
Show Gist options
  • Save DavisVaughan/7c17f9920bf8a2f864cebc78e0b65393 to your computer and use it in GitHub Desktop.
Save DavisVaughan/7c17f9920bf8a2f864cebc78e0b65393 to your computer and use it in GitHub Desktop.
library(DBI)
library(dplyr)
library(pool)
pool <- dbPool(drv = RPostgres::Postgres(),
dbname = "rstudioconftweets",
host = "rstudioconf-tweets.c0azx4micevq.us-east-1.rds.amazonaws.com",
user = "guest",
password = "guest",
port = 5432)
tweets <- dbReadTable(pool, "tweets") %>%
as_tibble()
tweets
#> # A tibble: 209 x 5
#> status_id created_at user_id screen_name text
#> <chr> <dttm> <chr> <chr> <chr>
#> 1 955570716073750529 2018-01-22 17:39:47 64496701 tanyacash21 "Looking f…
#> 2 955819821962268674 2018-01-23 10:09:38 7881054… taraskaduk @dataandme…
#> 3 955865363304140800 2018-01-23 13:10:36 8128169… jarvmiller Got my Mas…
#> 4 955879822462537728 2018-01-23 14:08:03 19520842 AmeliaMN There are …
#> 5 955968655292030979 2018-01-23 20:01:03 18207549 ellisvalen… @hadleywic…
#> 6 956198495676977153 2018-01-24 11:14:21 2320192… StatSteph So who els…
#> 7 956205544221630466 2018-01-24 11:42:21 8692871… RLadiesOrl… @rstudio @…
#> 8 956214536406695937 2018-01-24 12:18:05 16284661 gdequeiroz Getting re…
#> 9 956228904204857345 2018-01-24 13:15:11 7123657… ParmutiaMa… This is pa…
#> 10 956233941966577664 2018-01-24 13:35:12 8692871… RLadiesOrl… @gdequeiro…
#> # ... with 199 more rows
poolClose(pool)
#' Created on 2018-01-31 by the [reprex package](http://reprex.tidyverse.org) (v0.1.1.9000).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment