Chart Your Personal Network SOCL 3633 Research Methods · Lab 14 · Midwestern State University

Last week you described your own network. Today you see its shape. You load the two files you saved in Lab 13 into R, measure how connected the people in your network are, and draw the network twice: once plain, and once colored by the question that named each person. Keep this page open next to RStudio and work through the tabs in order. Submit your response sheet and the picture of your network in the Lab 14 submission on D2L by Thursday, April 22, at 11:59 p.m.

Get set up

If you do not have your files

  1. Copy them from your Lab 13 submission. Your submitted text on D2L contains both files. Copy the lines under alters.csv: into a new plain text file in Notepad (Mac: TextEdit, then Format, Make Plain Text) and save it as alters.csv. Do the same for the lines under ties.csv:.
  2. Or use the practice files. Download example_alters.csv and example_ties.csv from the Week 13 module, and change the two file name lines in Step 1, as the comment in the script shows. The practice network was written for this course and does not describe real people.

If something goes wrong

What you seeWhat to do
"cannot open file 'alters.csv': No such file or directory"The file is in a different folder, or its name is different. Check the Files pane. Then click Session, Set Working Directory, To Source File Location, and run Step 1 again.
The file is named alters.csv.txt or alters (1).csvRename it so the full name is exactly alters.csv. Windows hides file endings, so saving as "alters.csv" in Notepad can add .txt. In the Save dialog, choose "All files" before you type the name.
"there is no package called 'igraph'"Run Step 0 again and wait for it to finish. If it still fails, tell your instructor.
"Some vertex names in edge list are not listed in vertex data frame"A name in ties.csv is spelled differently from alters.csv. Open both files in RStudio's Files pane and make the initials match exactly.
A + sign in the ConsoleA parenthesis or quotation mark is missing. Press Escape in the Console, fix the line, and run it again.

Load and measure: Steps 1 to 3

Step 1: load your two files

Put alters in the blank in nrow(____) and run it, then run nrow(ties). The first number is how many people you named; the second is how many pairs of them know each other.

Checkpoint. With the practice files, both numbers are 8: eight people and eight ties.

Step 2: build the network

Run the graph_from_data_frame() line, then net. R joins your two files into one network: each person is a node, and each tie connects two nodes. The first line of the summary shows the number of people and ties, such as 8 8.

Step 3: how connected is your network?

Put net in the blank in edge_density(____) and run it. Then run the three lines below it, which compute the same number by hand.

Density
The number of ties divided by the number of possible pairs. With 8 people there are 8 × 7 ÷ 2 = 28 possible pairs, the same count as the tie generator in Lab 13. A density of 1 means everyone knows everyone; 0 means nobody knows anybody else.
Checkpoint. With the practice files, density is 0.2857: 8 ties out of 28 possible pairs. Ego is not counted, because you are tied to everyone by definition.

Draw your network: Step 4

No blanks. Run the set.seed() and layout_with_fr() lines, then select all the lines of the plot() command and run them. The drawing appears in the Plots pane. Click Zoom to see it larger.

Network drawing of the practice file. Two groups of three people each: MA, DA, and LR all know each other, and KB, RS, and TW all know each other. JT is tied to LR and to KB, linking the two groups. AN is tied to no one.
This is the practice network. You are not in the drawing: these are the ties among the people you named. Look for three things. Groups of people who all know each other (MA, DA, LR). A bridge, a person who is the only link between two groups (JT). An isolate, a person tied to no one else (AN).

Then run components(net)$no, which counts the separate pieces of the network, and degree(net), which shows how many others each person is tied to.

Checkpoint. With the practice files, the network has 2 pieces (everyone else, and AN alone). LR and KB have the highest degree, 3. AN has 0.
Your drawing will look different, and that is the point. If everyone you named knows everyone else, you will see one tight cluster. If nobody knows anybody, you will see separate dots. Both are real results.

Color and save: Steps 5 and 6

Step 5: which question named each person?

  1. Run the alters$named_by <- ifelse(...) lines. They make a new column that says whether each person was named for important matters, for job help, or for both.
  2. Put named_by in the blank in table(alters$____) and run it.
  3. Run the group_colors lines and the V(net)$color line, then the plot() and legend() lines.
The same practice network, with each person colored by the question that named them. MA, DA, and AN are light blue, important matters only. KB, RS, and TW are orange, job help only. LR and JT are gray, both questions.
The people stay in the same places as in Step 4; only the color changes. In the practice network, the important-matters people sit in one group and the job-help people in the other, and the two people named for both are the ones who connect them. Look at where the colors fall in yours.

Step 6: save the colored drawing

  1. In the png( line, replace lastname with your last name, for example smith_lab14_network.png.
  2. Select every line from png( to dev.off() and run them together. Nothing appears in the Plots pane; the picture is saved in your SOCL3633 folder.
  3. Find the file in the Files pane and click it to check that it opens.
Before you leave: save the script (File, then Save). Keep your network files until the end of the semester, then delete them along with your other course data.

Lab 14 response sheet

Answer in complete sentences. Then assemble your answers and paste them into the Lab 14 submission on D2L. In the same submission, upload the picture of your network. Both are due Thursday, April 22, at 11:59 p.m.

Your name
Which data did you use?
1. How many people and ties are in your network, and what is its density? Is it dense or sparse, and what does that tell you about how the people you named are connected?
Two to three sentences. Use your numbers from Steps 1 and 3.
2. Describe the shape of your network in the Step 4 drawing: any groups, isolates, or bridges. What settings in your life do the groups match?
Three to four sentences. Refer to people by their initials.
3. In the colored drawing, are the people you would ask about a job in a different part of your network from the people you discuss important matters with? Connect what you see to the chapter 16 section on weak ties and strong ties.
Three to four sentences.
4. Your drawing shows at most 10 people. What does it leave out, and what would a whole network study of this class need that your data do not have?
Three to four sentences.

Sources

Bernard, H. Russell, and Amber Wutich. 2026. Social Research Methods: Qualitative and Quantitative Approaches. 3rd ed. Thousand Oaks, CA: SAGE. Chapter 16.
Csárdi, Gábor, and Tamás Nepusz. 2006. "The igraph Software Package for Complex Network Research." InterJournal, Complex Systems 1695. https://igraph.org
Granovetter, Mark S. 1973. "The Strength of Weak Ties." American Journal of Sociology 78(6):1360-1380.

The practice files example_alters.csv and example_ties.csv describe an invented network written for this course. They do not describe real people.