
Retrieve a TAGS archive of Twitter statuses and bring into R
Source:R/setup-functions.R
read_tags.Rd
Keep in mind that read_tags()
uses the googlesheets4 package,
and one requirement is that your TAGS tracker has been "published to the
web." To do this, with the TAGS page open in a web browser, navigate to
File >> Share >> Publish to the web
. The Link
field should be
'Entire document' and the Embed
field should be 'Web page.' If
everything looks right, then click the Publish
button. Next, click
the Share
button in the top right corner of the Google Sheets
browser window, select Get shareable link
, and set the permissions
to 'Anyone with the link can view.'
Arguments
- tags_id
A Google Sheet identifier (i.e., the alphanumeric string following "https://docs.google.com/spreadsheets/d/" in the TAGS tracker's URL.)
See also
Read more about library(googlesheets4)
here.
Examples
# \donttest{
example_tags <- "18clYlQeJOc6W5QRuSlJ6_v3snqKJImFhU42bRkM_OX8"
read_tags(example_tags)
#> ✔ Reading from "#aect19 tweet collector".
#> ✔ Range ''Archive''.
#> # A tibble: 2,564 × 18
#> id_str from_…¹ text creat…² time geo_c…³ user_…⁴ in_re…⁵
#> <chr> <chr> <chr> <chr> <dttm> <chr> <lgl> <chr>
#> 1 1251954312… Harrie… "RT … Sun Ap… 2020-04-19 20:22:23 NA NA NA
#> 2 1248064163… Patric… "RT … Thu Ap… 2020-04-09 02:44:19 NA NA NA
#> 3 1234206946… ELTAug… "RT … Sun Ma… 2020-03-01 20:00:40 NA NA NA
#> 4 1229405350… gsa_ae… "RT … Mon Fe… 2020-02-17 14:00:50 NA NA NA
#> 5 1227652243… fcis_iu "Giv… Wed Fe… 2020-02-12 17:54:38 NA NA NA
#> 6 1225505187… Stauff… "RT … Thu Fe… 2020-02-06 19:43:00 NA NA NA
#> 7 1225137879… AECTTe… "RT … Wed Fe… 2020-02-05 19:23:27 NA NA NA
#> 8 1225122317… tadous… "Man… Wed Fe… 2020-02-05 18:21:36 NA NA NA
#> 9 1219758386… gsa_ae… "RT … Tue Ja… 2020-01-21 23:07:15 NA NA NA
#> 10 1219043574… aectddl "RT … Sun Ja… 2020-01-19 23:46:50 NA NA NA
#> # … with 2,554 more rows, 10 more variables: in_reply_to_screen_name <chr>,
#> # from_user_id_str <chr>, in_reply_to_status_id_str <chr>, source <chr>,
#> # profile_image_url <chr>, user_followers_count <dbl>,
#> # user_friends_count <dbl>, user_location <chr>, status_url <chr>,
#> # entities_str <chr>, and abbreviated variable names ¹from_user, ²created_at,
#> # ³geo_coordinates, ⁴user_lang, ⁵in_reply_to_user_id_str
# }