Load a QuickDraw category as an R object
qd_read(category, verbose = TRUE) qd_read_bitmap(category)
category | a valid QuickDraw category |
---|---|
verbose | avoid qd_download() message if verbose = TRUE |
qd_read()
: loads a QuickDraw ndjson file as a tibble::tibble()
,
containing 6 columns: word, key_id, countrycode, timestamp, recognized,
drawing.
qd_read_bitmap()
: loads a QuickDraw npy file as an ordinary R matrix,
requires the reticulate
package, with python and numpy installed. Each
row of the matrix represents a 28 by 28 bitmap image, so the total dimension
is n_images * 784.
qd_read("apple")#>#> # A tibble: 144,722 x 6 #> word countrycode timestamp recognized key_id drawing #> <chr> <chr> <chr> <lgl> <chr> <list> #> 1 apple US 2017-03-10 22:17:57.574… FALSE 642057960108… <list [6… #> 2 apple RU 2017-03-08 06:29:44.162… TRUE 498611011767… <list [2… #> 3 apple GB 2017-03-10 12:41:33.390… TRUE 648908292017… <list [2… #> 4 apple US 2017-03-16 18:01:54.559… TRUE 458761941129… <list [1… #> 5 apple TH 2017-03-29 14:35:17.694… TRUE 519860142682… <list [3… #> 6 apple FI 2017-03-09 11:06:43.607… TRUE 482623506035… <list [3… #> 7 apple US 2017-01-23 01:47:21.106… TRUE 558973318070… <list [3… #> 8 apple AU 2017-03-24 06:05:28.250… TRUE 554662900216… <list [2… #> 9 apple FR 2017-03-27 08:47:31.865… TRUE 563406171851… <list [3… #> 10 apple RU 2017-03-21 11:04:02.971… TRUE 633967635909… <list [2… #> # … with 144,712 more rows