Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Samenvatting Computational Analysis in Communication

Rating
-
Sold
-
Pages
52
Uploaded on
13-11-2023
Written in
2023/2024

Samenvatting van het vak Computational Analysis in Communication Science. Dit vak is bedoeld voor Masterstudenten Communicatiewetenschap aan de Vrije Universiteit te Amsterdam. De samenvatting bevat een mix tussen de colleges, oefenvragen van het tentamen en een verwerking van de theorie en praktijk (in R). Deels in het Nederlands, deels in het Engels geschreven.

Show more Read less
Institution
Course

Content preview

College 1 2/11/2021

Definitie Computational Communication Science:
‘’Computational Communication Science (CCS) is the label applied to emerging subfield that
investigates the use of computational algorithms to gather and analyze big and often semi-
or unstructured data sets to develop and test communication science theories.’’

Control L = Tekst gaat weg in ‘output’ (in console)
Command enter = Output runnen
Untitled(1) = het script van R, daar kun je codes in plakken
Run = kun je ook gebruiken (alles selecteren en op run klikken)
# = een comment plaatsen bij je codes
Sum = tussen haakjes () bij elkaar optellen

X = 2  x betekent nu 2 in R  je krijgt in environment nu x =2
Environment = hier zie je wat je hebt gedaan/gecodeerd
Je kan nu in plaats van X, 2 gebruiken
Y <- ‘’Some text’’ = kijk in environment, je ziet nu Y = ‘’some text’’
X <- 5 = X krijgt nu de waarde 5, kijk in environment, je ‘overschrijft’ de eerder gemaakte
code x = 2

Character
Dit zijn woorden en letters
X <- ‘’Some text’’ = ##assign text to the name x
Class(x) = ##view the class of the value assigned to x

Object name (black) en character (purple) zijn niet hetzelfde!
X <- 999 is niet hetzelfde als Y <- 999
Class krijg je of het numeric is of niet
Met de X kun je rekenen dus bijvoorbeeld X*2
Z = de geschreven versie van het cijfer, bijv. NA_real_

In Global Environment:
X = 999
Y = ‘’999’’
Z = NA_real_

C = Combine, we kunnen een aantal cijfers in 1 ‘’object’’ voegen, dit noemen we
ook wel een vector
V1 <- c(1, 2, 10, 15) = ## a numeric vector of length 4
V2 <- c(‘’a’’, ‘’b’’, ‘’b’’) = ## a character vector of length 3
V3 <- 1:10 = ## a numeric vector of length 10 with the values 1 to 10
V4 <- c(1:10)
C(1, 2, ‘’c’’) = ## becomes a character vector of length 3

X <- c(1, 2, 3, 4, 5)
Y <- c(10, 20, 30, 40, 50)
1
Julia van den Hoogen

,X+Y = ## for 2 vectors of same size calculations are pairwise (1+10, 2+20 etc.)
X + 10 = ## for a vector and single value, the value is repeated (1 + 10, 2 + 10, etc.)

#selecting
X <- c(‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’)
X{5} = select the fifth element
X {c(1,3)] = ## select the first and third element
Nex <- x[2:5] = ## select elements two to five

Data frame
Data frame = het eindresultaat van je case
Id = vector 1 to 10
C=
G = character values man en vrouw (M en F)
Arguments zijn allemaal gesplitst van elkaar met komma’s
C Function in een andere Function  function dat creating a vector in een data frame vector
coderen
Altijd ‘d’ gebruiken als date frame
Row = het aantal observaties
Columns = het aantal vragen dat je hebt gesteld bijvoorbeeld

Als de komma in het begin staat selecteer je columns
Als je een dubbel == teken doet krijg je alleen de variabele/de column die je wilt weten, je
krijgt maar 1 variabele dan
d[d$gender == ‘’M’’] = je selecteert nu bijvoorbeeld alleen de waarde M (mannen)

getwd = je krijgt waar je bent in je computer, als je data wilt vinden in
je script is dit handig
Session  set working directory  to source file location
Dataset opslaan is file and save as
Save het object die je wilt opslaan en de file  #save and load a csv file
csv = Comma seperate vector (values)

functions with multiple arguments
# install.packages (‘’quanteda’’) = ##only once on each computer
Library(quenteda) = ##each time we want to use the functions from
the package
Je hoeft het maar 1 keer te installeren, dus als je het een keer (met ##) hebt gerunt dan hoef
je dat daarna NOOIT meer te doen
Help funtion in R = ? in R typen, bijvoorbeeld ?sum je krijgt
suggesties wat het moet/kan zijn (kijk in help venster van R)




2
Julia van den Hoogen

, College 2 4/11/2021

DBL in R = Numeriek
Bijv. 3 x 3 dimensies = Drie rijen en drie kolommen
Chr = Zijn alle variabelen die je runt

Tidy verse je dataset is handig voordat je een daadwerkelijke analyse gaat draaien
Dit is genoeg (WG voorbeeld):




Abs in R = Absolute value
%>% = Pipeline (shortcut = Command, options M), %>% vat alles samen, dus
filter, mutate, select en arrange doet %>% in 1 keer!
Read scv (url) is de url van je dataset
Voorbeeld van zo’n ‘pipeline’:
“Syntax”:




“Output”:




3
Julia van den Hoogen

, Hoorcollege 2

Problem: how to transform data to produce good visualizations?

1. From raw data to tidy data
2. Why we should look at data
3. Visualization examples for different methods
4. Theories of perception
5. Principles of data visualization

1. From Raw Data to Tidy Data
Preprocessing and Data Wrangling

A general model of data science




 Importing data
- Data comes in different forms (two- or multidimensional, test or numbers…) ad
formats (.csv, .txt, .sav, .stata, .html…)
- First, we must find a way to import this data into R
- This typically means that you take data stored in a file, database, or web application
programming interface (API), and load it into a data frame in R
- Imagine we would have found the following table on Wikipedia and would want to
get it into R (van een map in je pc/laptop uploaden of via een site data downloaden
etc.)

 Importing data: Scraping a webpage
- There is indeed an R-package that can download the entire html and CSS code of a
website




4
Julia van den Hoogen

Written for

Institution
Study
Course
Unknown

Document information

Uploaded on
November 13, 2023
Number of pages
52
Written in
2023/2024
Type
SUMMARY

Subjects

$7.75
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
jhdansen Hogeschool van Amsterdam
Follow You need to be logged in order to follow users or courses
Sold
33
Member since
7 year
Number of followers
23
Documents
15
Last sold
3 months ago

3.4

8 reviews

5
3
4
0
3
3
2
1
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions