Gilligan Skipper

Total Page:16

File Type:pdf, Size:1020Kb

Gilligan Skipper

PROJECT GUTS Social Networks Build your own social network in NetLogo

This activity introduces a base NetLogo model that can be used to visualize a social network. It can also serve as the start of a NetLogo project if the student is so inclined. The social network is defined in a text file that can be created in any text editor, such as Notepad on Windows or TextEdit on the Macintosh. The file format is fairly easy but must be followed precisely, here are two networks that are very similar:

[ [ "Gilligan" "Skipper" ] [ "Gilligan" "Mary Ann" ] [ "Gilligan" "Thurston" ] [ "Gilligan" "Eunice" ] [ "Thurston" "Eunice" ] [ "Gilligan" "Professor" ] [ "Gilligan" "Skipper" ] [ "Professor" "Skipper" ] [ "Eunice" "Ginger" ] [ "S.S. Minnow" "Skipper" ] ]

[ [ ["Gilligan" "male" ] ["Skipper" "male"] true ] [ "Gilligan" [ "Mary Ann" "female" ] false ] [ "Gilligan" [ "Thurston" "male" ] true ] [ "Gilligan" [ "Eunice" "female" ] true ] [ "Thurston" "Eunice" false ] [ "Gilligan" [ "Professor" "male" ] true ] [ "Gilligan" "Skipper" true ] [ "Professor" "Skipper" true ] [ "Eunice" [ "Ginger" "female" ] false ] [ "S.S. Minnow" "Skipper" true ] ]

1. The first line of the file should have a ‘[‘ and the last line should have a ‘]’. These form the bookends for the entire social network.

2. Every name must be placed between double quotes ‘"’ and must be spelled exactly the same on every line that it appears (otherwise they will be interpreted as different people). A person can either be referred to by “name” or [ “name” “gender” ] where “gender” is one of “male” or “female”. A connection can also be highlighted by putting the word true as the third item (this can be used to denote a special relationship such as same school). Be careful to have a closing ‘]’ for each opening ‘[‘. Note there are no commas used between items. It is important that names and gender be quoted.

3. This file can be named anything, but should end with ‘.txt’ so that text editors know that they can edit the file. The project “SocialNetwork.nlogo” can be opened from within NetLogo.

4. Pressing the “setup” button will cause the file browser to appear. Find your social network file and press “open”. Initially the people in the network will appear randomly on the screen (this is a random layout). A new layout can be selected by pressing the “spring” button and adjusting the three spring layout parameter sliders. Another layout method, called the ‘radial layout’, can be selected by choosing which node to be the center of the network and pressing the ‘radial’ button (make sure that ‘spring’ button is not active or this will override the radial layout).

5. Each node in the network has two numbers associated with it. The first number, which is in parentheses, is called the ‘degree’ of the node. This is the number of other nodes that this node is connected to. The second number is the average shortest distance the node is to all other nodes in the graph, this is calculated by finding the shortest path length to every other node in the network, summing these up and dividing by the number of nodes. Note the average distance cannot be calculated if the social network has more than one component; that is, if there are nodes in the social network that have no path between them it will say ‘inf’ for infinity.

Students will use the Netlogo program SocialNetwork.nlogo to build their cell phone network then they will use it again to build their own social network.

Recommended publications