knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The quickdraw package allows you to download and retrieve the dataset categories from the quickdraw dataset:

Data Retrieval

Data files are cached and retrieved using the qd_read function:

library(quickdraw)

octopus <- qd_read("octopus")
octopus

The last column is a nested list which is a drawing made, it consists of the x,y coordinates for each stroke:

You will have to properly install the R package cloudml and a command line tool, gsutil, for qd_read() to read data properly from Google Cloud Storage. To install gsutil, type cloudml::gcloud_install() in the console and follow the instructions.

You can draw a pic with qd_tidy and qd_draw

octopus %>% 
  qd_tidy(10) %>% 
  qd_draw()

You could also animate multiple drawings with qd_draw

octopus %>% 
  qd_tidy(sample.int(nrow(octopus), 6)) %>% 
  qd_draw(animate = TRUE)


huizezhang-sherry/quickdraw documentation built on July 17, 2020, 8:40 a.m.