-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcodebook.Rmd
194 lines (104 loc) · 3.11 KB
/
codebook.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
title: "Metadata on the IG monitoring database"
number_sections: yes
output:
pdf_document:
number_sections: true
md_document:
variant: gfm
params:
pwd: "hodor"
---
Here you'll find a codebook explaining the database structure for the "Undressing Instagram" project.
**Story by:** [Judith Duportail](https://twitter.com/judithduportail), [Nicolas Kayser-Bril](https://twitter.com/nicolaskb)
**Data collection:** [Édouard Richard](https://twitter.com/vied12)
**Data analysis:** [Kira Schacht](https://twitter.com/daten_drang)
# Setup
Follow the steps below in a terminal to load the database from a dump file and save under the name `igdb`.
```
pg_restore 02-19_backup > backup.sql
sudo -i -u postgres
dropdb igdb
createdb igdb
igdb < backup.sql
```
Load packages needed
```{r}
library("RPostgreSQL")
```
Read database
```{r}
# create a connection to the postgres database
con = dbConnect(dbDriver("PostgreSQL"), dbname= "igdb", host="127.0.0.1",
user="postgres", password = params$pwd)
#list tables in the database
dbListTables(con)
```
# Codebook
## data_donors_donor_following
Observed accounts each donor follows
`id` Pair ID
`donor_id` Donor ID
`iguser_id` Observed account ID
## data_donors_datadonation
Log of donation runs
`id` Encounter ID
`created` Encounter time
`ig_posts_seen` Number of IG posts seen (12 normally)
`donor_id` Donor ID
## data_donors_encounter
Log of encounters with posts from observed accounts
`id` Encounter ID
`position_in_list` Position of encounter in the user feed. Starts counting at 0
`data_donation_id` ID of donation run
`ig_post_id`
## data_donors_donor
List of donors
`id`
`ig_donor_id`
`created`
`last_status`
`last_status_changed`
`version`
`updated`
`display_name`
## data_donors_donorfollowing
List of accounts the donor follows, encountered in the feed during donation runs
`id`
`created`
`following_ig_username`
`donor_id`
## ig_observer_igimage
List of images in observed posts
`id` Image ID
`image_url` Image URL
`ig_post_id` Post ID
## ig_observer_iguser
List of details for observed IG accounts.
`id` Account ID
`created` Timestamp of observation creation
`ig_username` Username
`created_by_id` Observation created by
`ig_biography` IG Bio
`ig_business_category_name` Business category
`ig_full_name` Full name
`ig_id` IG User ID
`ig_is_business_account` Is business account?
`ig_profile_pic` URL of profile pic
`sex` Gender of user m or f
## ig_observer_gvisionanalyse
Result of G Vision analysis
`id`
`analyse`
`ig_image_id`
`created`
## ig_observer_igpost
List of posts by observed accounts
`id` Post ID
`created` Encountered timestamp
`ig_id` IG ID
`ig_shortcode` IG Shortcode
`ig_taken_at_timestamp` IG picture timestamp
`ig_type` Type: Image, Video, Image gallery
`ig_user_id`
`created_by_donor`