-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.datacollection.Rmd
82 lines (55 loc) · 2.85 KB
/
1.datacollection.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
output: github_document
---
## Data Collection
**Author Rscript: Francisca Ortiz.**
This documment present data collection stage of the study "Ageism in the era of Covid-19: exploring stereotypes in the press and/or social media", which has been funded by MICRA Seedcorn funding call 2021. Founded awarded to the researchers Francisca Ortiz and Louise Mitchell by January 2021.
This Rscript is based in the repository
<https://github.com/cjbarrie/academictwitteR>
### Install packages
```{}
#devtools::install_github("cjbarrie/academictwitteR")
#install.packages("get_hashtag_tweets")
library(academictwitteR)
```
### Bearer Token
Add the bearer token from your Twitter API account in between "".
```{}
bearer_token <- "AAAAAAAAAAAAAAAAAAAAAPfNOQEAAAAAEV%2BLV%2FyjOA%2FhMhDb4tuobrQdA8E%3DNw6Re9t4atB7GURhT3l42TMy7GKNGivI61WLDqwqBSG9rvbuqx"
```
### Data extraction - Stage 1
**Data extration 1**
For the data extraction were selected three specific days related with the vaccine of Covid-19. The first extraction was on 2 of December 2020: when the first COVID-19 vaccine was granted regulatory approval by the UK medicines regulator MHRA.
```{}
get_hashtag_tweets("#CovidVaccine", "2020-12-02T00:00:01Z",
"2020-12-02T23:59:59Z", bearer_token,
data_path = "/Users/franciscaortizruiz/Desktop/data")
```
**Data extration 2**
For the data extraction were selected three specific days related with the vaccine of Covid-19. The first extraction was on 4 of December 2020: first publication stablishing the plan of how the vaccinate was going to distributed in the population.
```{}
get_hashtag_tweets("#CovidVaccine", "2020-12-04T00:00:01Z",
"2020-12-04T23:59:59Z", bearer_token,
data_path = "/Users/franciscaortizruiz/Desktop/data")
```
**Data extration 3**
For the data extraction were selected three specific days related with the vaccine of Covid-19. The first extraction was on 8 of December 2020: first vaccination given in the UK.
```{}
get_hashtag_tweets("#CovidVaccine", "2020-12-08T00:00:01Z",
"2020-12-08T23:59:59Z", bearer_token,
data_path = "/Users/franciscaortizruiz/Desktop/data")
```
### Data extraction - Stage 2
For the second data extraction were selected two specific hashtags: #OkBoomer and #BoomerRemover. We follow each one for one week: between the days 2 and 8 of december 2020.
**Data extration #OkBoomer**
```{}
get_hashtag_tweets("#OkBoomer", "2020-12-02T00:00:01Z",
"2020-12-08T23:59:59Z", bearer_token,
data_path = "/Users/franciscaortizruiz/Desktop/data")
```
**Data extration #BoomerRemover**
```{}
get_hashtag_tweets("#BoomerRemover", "2020-12-02T00:00:01Z",
"2020-12-08T23:59:59Z", bearer_token,
data_path = "/Users/franciscaortizruiz/Desktop/data")
```