Skip to content

Commit 9834d74

Browse files
committed
Day 9
1 parent 60a0731 commit 9834d74

File tree

4 files changed

+68
-6911
lines changed

4 files changed

+68
-6911
lines changed

day_9/day_9.ipynb

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@
4848
"api = tweepy.API(auth, wait_on_rate_limit=True)"
4949
]
5050
},
51-
{
52-
"cell_type": "code",
53-
"execution_count": null,
54-
"metadata": {},
55-
"outputs": [],
56-
"source": [
57-
"public_tweets = api.home_timeline(count=100)"
58-
]
59-
},
6051
{
6152
"cell_type": "code",
6253
"execution_count": null,
@@ -70,7 +61,7 @@
7061
" tweet_mode = 'extended',\n",
7162
" count=200).items(5000): # Change this to as high as you like, if you have time :)\n",
7263
" results.append(tweet._json)\n",
73-
" #print(tweet.user.screen_name + \"\\t\" + str(tweet.created_at) + \"\\t\" + tweet.full_text)"
64+
" print(tweet.user.screen_name + \"\\t\" + str(tweet.created_at) + \"\\t\" + tweet.full_text)"
7465
]
7566
},
7667
{
@@ -114,7 +105,9 @@
114105
"outputs": [],
115106
"source": [
116107
"import csv\n",
117-
"with open('cleaned_data.csv', 'w') as fn:\n",
108+
"with open('cleaned_data.csv', 'w', \n",
109+
" encoding='UTF-8',\n",
110+
" newline='') as fn:\n",
118111
" f = csv.writer(fn)\n",
119112
" f.writerow(['created_at',\n",
120113
" 'tweet_text',\n",

day_9/lecture/day_9.Rmd

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,16 @@ wrapify <- function (x) {paste("{", x, "}", sep="")}
2020
p <- function (x) {formatC(x, format='f', digits=1, big.mark=',')}
2121
```
2222

23-
## Weekly Dad Joke
23+
## Dad Joke
2424

2525
My neighbor had the nerve to ring my doorbell at 3 o'clock in the morning.
2626

27-
Luckily I was still up playing the drums.
27+
<span class='fragment'> Luckily I was still up playing the drums. </span>
2828

2929
## Housekeeping
3030

3131
> - Self-assessment reflection
32-
> - Engagement during reading discussion
33-
> - Move to start of class?
34-
> - Close laptops?
35-
> - Do the readings!
36-
> - Text analysis
37-
> - Move earlier? Instead of/before web scraping?
38-
> - Form a study group?
39-
40-
41-
42-
## Housekeeping
43-
44-
> - Project Planning Document due next week
45-
46-
47-
## Solution sharing
48-
49-
> - Wikipedia API
50-
> - Twitter exercises
51-
32+
> - Ping in chat if you want to talk
5233
5334
## Ethics in online data
5435
> - Some dangers
@@ -74,12 +55,11 @@ Luckily I was still up playing the drums.
7455
## Balance is needed
7556

7657
What are the dangers of too much caution?
77-
7858
> - Emotional contagion as example case
7959
8060
## Some principles
8161

82-
> - Respect for persons, beneficence, Justice, Respect for Law and Public Interest
62+
> - Respect for persons, beneficence, justice, respect for law, and public interest
8363
> - Think through possible harms to participants and the systems
8464
> - Do work that has benefits
8565
> - Consult with others
@@ -89,16 +69,18 @@ What are the dangers of too much caution?
8969
> - Alter quotes/usernames
9070
> - Share research with participants
9171
92-
93-
## Break
94-
95-
9672
## Working with online data
9773

9874
> - Save the raw data
9975
> - Make your process reproducible
10076
10177
## Limitations of online data
10278

79+
> - Found, not made
80+
> - Missing (sometimes invisibly)
81+
> - Can result from changing/hidden processes
82+
83+
## Day 9 challenge
10384

104-
## Day 8 challenges + API assignment
85+
> - API mini-project
86+
> - How/where to share?

day_9/lecture/day_9.html

Lines changed: 53 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,41 @@
13781378

13791379
<style type="text/css">code{white-space: pre;}</style>
13801380

1381+
<style type="text/css">
1382+
1383+
.container{
1384+
display: flex;
1385+
}
1386+
.col{
1387+
flex: 1;
1388+
}
1389+
.reveal section img{
1390+
border: none;
1391+
background: none;
1392+
box-shadow: none;
1393+
}
1394+
.highlight {
1395+
color: LightCoral;
1396+
}
1397+
.reveal h1,
1398+
.reveal h2,
1399+
.reveal h3,
1400+
.reveal h4,
1401+
.reveal h5,
1402+
.reveal h6 {
1403+
text-transform: none;
1404+
}
1405+
.reveal h1 {
1406+
margin-top:200px;
1407+
}
1408+
div.footnote {
1409+
font-size: 40%;
1410+
text-align: right;
1411+
}
1412+
.bg-image{
1413+
width: 180px;
1414+
}
1415+
</style>
13811416

13821417
<!-- Printing and PDF exports -->
13831418
<script id="paper-css" type="application/dynamic-css">
@@ -1766,115 +1801,17 @@
17661801
<div class="reveal">
17671802
<div class="slides">
17681803

1769-
<section>
1770-
<h1 class="title">COM 674</h1>
1771-
</section>
1772-
1773-
<section class="slide level2">
1774-
1775-
<style type="text/css">
1776-
1777-
/* Changes to RevealJS default formatting.
1778-
1779-
I prefer this style but you can change these to your preferences */
1780-
1781-
/* This bit lets you do columns */
1782-
.container{
1783-
display: flex;
1784-
}
1785-
1786-
.col{
1787-
flex: 1;
1788-
}
1789-
1790-
.reveal section img{
1791-
border: none;
1792-
background: none;
1793-
box-shadow: none;
1794-
}
17951804

1796-
.highlight {
1797-
color: LightCoral;
1798-
}
1799-
1800-
.reveal h1,
1801-
.reveal h2,
1802-
.reveal h3,
1803-
.reveal h4,
1804-
.reveal h5,
1805-
.reveal h6 {
1806-
text-transform: none;
1807-
}
1808-
1809-
.reveal h1 {
1810-
margin-top:200px;
1811-
}
1812-
1813-
div.footnote {
1814-
font-size: 40%;
1815-
text-align: right;
1816-
}
1817-
1818-
.bg-image{
1819-
width: 180px;
1820-
}
1821-
1822-
.reveal .slides section .fragment.fade-in-then-out,
1823-
.reveal .slides section .fragment.current-visible {
1824-
opacity: 0;
1825-
visibility: hidden; }
1826-
.reveal .slides section .fragment.fade-in-then-out.current-fragment,
1827-
.reveal .slides section .fragment.current-visible.current-fragment {
1828-
opacity: 1;
1829-
visibility: inherit; }
1830-
1831-
.reveal .slides section .fragment.fade-in-then-semi-out {
1832-
opacity: 0;
1833-
visibility: hidden; }
1834-
.reveal .slides section .fragment.fade-in-then-semi-out.visible {
1835-
opacity: 0.5;
1836-
visibility: inherit; }
1837-
.reveal .slides section .fragment.fade-in-then-semi-out.current-fragment {
1838-
opacity: 1;
1839-
visibility: inherit; }
1840-
1841-
</style>
1842-
</section>
1843-
<section id="weekly-dad-joke" class="slide level2">
1844-
<h2>Weekly Dad Joke</h2>
1805+
<section id="dad-joke" class="slide level2">
1806+
<h2>Dad Joke</h2>
18451807
<p>My neighbor had the nerve to ring my doorbell at 3 o’clock in the morning.</p>
1846-
<p>Luckily I was still up playing the drums.</p>
1808+
<p><span class="fragment"> Luckily I was still up playing the drums. </span></p>
18471809
</section>
18481810
<section id="housekeeping" class="slide level2">
18491811
<h2>Housekeeping</h2>
18501812
<ul>
1851-
<li class="fragment">Self-assessment reflection
1852-
<ul>
1853-
<li class="fragment">Engagement during reading discussion
1854-
<ul>
1855-
<li class="fragment">Move to start of class?</li>
1856-
<li class="fragment">Close laptops?</li>
1857-
<li class="fragment">Do the readings!</li>
1858-
</ul></li>
1859-
<li class="fragment">Text analysis
1860-
<ul>
1861-
<li class="fragment">Move earlier? Instead of/before web scraping?</li>
1862-
<li class="fragment">Form a study group?</li>
1863-
</ul></li>
1864-
</ul></li>
1865-
</ul>
1866-
</section>
1867-
<section id="housekeeping-1" class="slide level2">
1868-
<h2>Housekeeping</h2>
1869-
<ul>
1870-
<li class="fragment">Project Planning Document due next week</li>
1871-
</ul>
1872-
</section>
1873-
<section id="solution-sharing" class="slide level2">
1874-
<h2>Solution sharing</h2>
1875-
<ul>
1876-
<li class="fragment">Wikipedia API</li>
1877-
<li class="fragment">Twitter exercises</li>
1813+
<li class="fragment">Self-assessment reflection</li>
1814+
<li class="fragment">Ping in chat if you want to talk</li>
18781815
</ul>
18791816
</section>
18801817
<section id="ethics-in-online-data" class="slide level2">
@@ -1918,15 +1855,12 @@ <h2>Ethics in online data</h2>
19181855
</section>
19191856
<section id="balance-is-needed" class="slide level2">
19201857
<h2>Balance is needed</h2>
1921-
<p>What are the dangers of too much caution?</p>
1922-
<ul>
1923-
<li class="fragment">Emotional contagion as example case</li>
1924-
</ul>
1858+
<p>What are the dangers of too much caution? &gt; - Emotional contagion as example case</p>
19251859
</section>
19261860
<section id="some-principles" class="slide level2">
19271861
<h2>Some principles</h2>
19281862
<ul>
1929-
<li class="fragment">Respect for persons, beneficence, Justice, Respect for Law and Public Interest</li>
1863+
<li class="fragment">Respect for persons, beneficence, justice, respect for law, and public interest</li>
19301864
<li class="fragment">Think through possible harms to participants and the systems</li>
19311865
<li class="fragment">Do work that has benefits</li>
19321866
<li class="fragment">Consult with others</li>
@@ -1937,9 +1871,6 @@ <h2>Some principles</h2>
19371871
<li class="fragment">Share research with participants</li>
19381872
</ul>
19391873
</section>
1940-
<section id="break" class="slide level2">
1941-
<h2>Break</h2>
1942-
</section>
19431874
<section id="working-with-online-data" class="slide level2">
19441875
<h2>Working with online data</h2>
19451876
<ul>
@@ -1949,9 +1880,18 @@ <h2>Working with online data</h2>
19491880
</section>
19501881
<section id="limitations-of-online-data" class="slide level2">
19511882
<h2>Limitations of online data</h2>
1883+
<ul>
1884+
<li class="fragment">Found, not made</li>
1885+
<li class="fragment">Missing (sometimes invisibly)</li>
1886+
<li class="fragment">Can result from changing/hidden processes</li>
1887+
</ul>
19521888
</section>
1953-
<section id="day-8-challenges-api-assignment" class="slide level2">
1954-
<h2>Day 8 challenges + API assignment</h2>
1889+
<section id="day-9-challenge" class="slide level2">
1890+
<h2>Day 9 challenge</h2>
1891+
<ul>
1892+
<li class="fragment">API mini-project</li>
1893+
<li class="fragment">How/where to share?</li>
1894+
</ul>
19551895
</section>
19561896
</div>
19571897
</div>

0 commit comments

Comments
 (0)