Social Network Analysis Project: FOAF and Network Analysis
VerifiedAdded on 2019/09/16
|3
|1162
|339
Project
AI Summary
This project focuses on developing a series of four web pages to analyze a social network of friends, represented using FriendOfAFriend (FOAF) relations. The assignment requires students to implement the social network model in JavaScript, create an occurrence matrix to improve efficiency, build a composite table to show connectivity, and use data matching techniques, data and control structures, and DOM elements. The project involves modifying provided JavaScript and HTML files to meet the specified functional requirements, including creating and manipulating the social network structure, generating tables to represent network data, and analyzing the relationships between nodes based on link weightings. The tasks emphasize client-side programming, ensuring no external server calls or static data loading, and assess the student's ability to apply programming principles to solve real-world network analysis problems.

Introduction
Computerised systems that support social networking such as Facebook and
LinkedIn typically rely on underlying connectivity in the form of a
FriendOfAFriend (FOAF) relation. This represents a relationship between two
object supported by a link. Figure 1 illustrates the FOAF relation.
Figure 1. Example of FOAF relations.
Within a social network this relation is the basic building block of a network of
friends. By focusing only on friendships (the relation) between friends (objects)
it is possible to simplify the potentially complex interrelated world of many
objects into one that only expresses a single type of relation that is
unidirectional. Although this is a simplified view on how social networks build
connectivity between objects, it does allow the relation between objects to be
unified and weighted such that each relation becomes a link between two objects
with a ‘strength of association’. This network is represented in Figure 2. Top left
is the generalised case with three instances of that case below. The diagram on
the right represents an interconnected example of a number of instances formed
into a unidirectional graph.
Figure 2. Series of relations and resultant network of friends.
Design Brief
Figure 2 represents a social network of 10 nodes (A-J). Each node is connected to
a variable number of its neighbours via links (1-13). Each link between a pair of
nodes is given a simple integer weighting. High weightings equate to a high
‘strength of association’ and thus a strong link between nodes. As links are two-
way channels information can travel in either direction between two nodes.
When communication occurs between two nodes, the ‘strength of association’
for a particular network path is the cumulative weights of all the links for one
route between two nodes. For example, one path between Abdul Fay is A,C,G,F
with a cumulative weighting of 56. Another might be A,C,D,E,F with a cumulative
weighting of 91. The most direct route is A,C,F with a cumulative weighting of 16,
but this may not be the most reliable communication route since the strength of
association between Clare and Fay is only 2 so very weak. Another variable
feature of the graph in Figure 2 is the number of links a node supports. Node
Brother ClareBob
4
2
0 3
Iris
Jane
5
7 Hugh
1
4
3
0
8
0
2
5
3
1
0
7
Abdul
Gill
Fay
Earl
ClareDave
Bob
Object Object
Relation
link
weighting
friendperson
1
80
ClareBob
2
7
DaveBob
3
10
DaveEarl 12
Computerised systems that support social networking such as Facebook and
LinkedIn typically rely on underlying connectivity in the form of a
FriendOfAFriend (FOAF) relation. This represents a relationship between two
object supported by a link. Figure 1 illustrates the FOAF relation.
Figure 1. Example of FOAF relations.
Within a social network this relation is the basic building block of a network of
friends. By focusing only on friendships (the relation) between friends (objects)
it is possible to simplify the potentially complex interrelated world of many
objects into one that only expresses a single type of relation that is
unidirectional. Although this is a simplified view on how social networks build
connectivity between objects, it does allow the relation between objects to be
unified and weighted such that each relation becomes a link between two objects
with a ‘strength of association’. This network is represented in Figure 2. Top left
is the generalised case with three instances of that case below. The diagram on
the right represents an interconnected example of a number of instances formed
into a unidirectional graph.
Figure 2. Series of relations and resultant network of friends.
Design Brief
Figure 2 represents a social network of 10 nodes (A-J). Each node is connected to
a variable number of its neighbours via links (1-13). Each link between a pair of
nodes is given a simple integer weighting. High weightings equate to a high
‘strength of association’ and thus a strong link between nodes. As links are two-
way channels information can travel in either direction between two nodes.
When communication occurs between two nodes, the ‘strength of association’
for a particular network path is the cumulative weights of all the links for one
route between two nodes. For example, one path between Abdul Fay is A,C,G,F
with a cumulative weighting of 56. Another might be A,C,D,E,F with a cumulative
weighting of 91. The most direct route is A,C,F with a cumulative weighting of 16,
but this may not be the most reliable communication route since the strength of
association between Clare and Fay is only 2 so very weak. Another variable
feature of the graph in Figure 2 is the number of links a node supports. Node
Brother ClareBob
4
2
0 3
Iris
Jane
5
7 Hugh
1
4
3
0
8
0
2
5
3
1
0
7
Abdul
Gill
Fay
Earl
ClareDave
Bob
Object Object
Relation
link
weighting
friendperson
1
80
ClareBob
2
7
DaveBob
3
10
DaveEarl 12
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Jane is on the outer edge of the network with only 1 link. This is in contrast to
node Clare with 6 links. The extent to which information spreads within the
network is, thereby, going to be a function of the strength of association
between nodes, the overall density of connections within the network and the
communication path followed when messages are sent across the network.
Functional Requirements
Create a series of four web pages each of which performs a range of Tasks (1-3)
on the ‘Network of Friends’. Supporting code with a simple working example of a
small social network is available on Blackboard as FOAF.zip. The zip file
containing the following:
FOAF.js – all the code to support a minimal social network structure;
Model.js - an example of how to build the social network;
Model.doc – a schematic representing the structure built in Model.js;
Task1-3.js – supporting JavaScript code for each task 1-4;
Task1-3.html - supporting HTML code for each task 1-4;
Task 1
Build the social network illustrated in Figure 2 using the example available in file
Model.js and the schematic in Model.doc as a guide. Starting code is provided in
form of two files Task1.js and Task1.html. The code in Task1.html provides a
template which shows how to run the example social network and the code in
Task1.js shows how to dump the structure of the network stored in global
variable NETWORK in order to verify that the model is correct. Additional marks
are available if you tailor the dump to improve readability.
For Task 1 you should submit three files myModel.js, myTask1.html and
myTask1.js each of which are modified and/or extended versions of the files
Model.js, Task1.html and Task1.js respectively.
NB: If you are unable to complete Task 1 use the pre-written example in Model.js
for all subsequent tasks.
Task 2
An occurrence matrix is a common data structure used to cache social networks
in order to improve efficiency. Run Task2.html and study the dump of the
occurrence matrix which is stored in the global variable MATRIX for the social
network model in model.js. Repeat the process for myModel.js created in Task1.
Examine the structure of the occurrence matrix and on the basis of this analysis
create a formatted table to re-represent the data as shown in Table 1.
For Task 2 you should submit three files myModel.js, myTask2.html and
myTask2.js each of which should be modified versions of the files Model.js,
Task2.html and Task2.js respectively.
NB: If you are unable to complete Task 1 submit Model.js instead of myModel.js
without penalty. This also applies to Task 3 and Task 4.
node Clare with 6 links. The extent to which information spreads within the
network is, thereby, going to be a function of the strength of association
between nodes, the overall density of connections within the network and the
communication path followed when messages are sent across the network.
Functional Requirements
Create a series of four web pages each of which performs a range of Tasks (1-3)
on the ‘Network of Friends’. Supporting code with a simple working example of a
small social network is available on Blackboard as FOAF.zip. The zip file
containing the following:
FOAF.js – all the code to support a minimal social network structure;
Model.js - an example of how to build the social network;
Model.doc – a schematic representing the structure built in Model.js;
Task1-3.js – supporting JavaScript code for each task 1-4;
Task1-3.html - supporting HTML code for each task 1-4;
Task 1
Build the social network illustrated in Figure 2 using the example available in file
Model.js and the schematic in Model.doc as a guide. Starting code is provided in
form of two files Task1.js and Task1.html. The code in Task1.html provides a
template which shows how to run the example social network and the code in
Task1.js shows how to dump the structure of the network stored in global
variable NETWORK in order to verify that the model is correct. Additional marks
are available if you tailor the dump to improve readability.
For Task 1 you should submit three files myModel.js, myTask1.html and
myTask1.js each of which are modified and/or extended versions of the files
Model.js, Task1.html and Task1.js respectively.
NB: If you are unable to complete Task 1 use the pre-written example in Model.js
for all subsequent tasks.
Task 2
An occurrence matrix is a common data structure used to cache social networks
in order to improve efficiency. Run Task2.html and study the dump of the
occurrence matrix which is stored in the global variable MATRIX for the social
network model in model.js. Repeat the process for myModel.js created in Task1.
Examine the structure of the occurrence matrix and on the basis of this analysis
create a formatted table to re-represent the data as shown in Table 1.
For Task 2 you should submit three files myModel.js, myTask2.html and
myTask2.js each of which should be modified versions of the files Model.js,
Task2.html and Task2.js respectively.
NB: If you are unable to complete Task 1 submit Model.js instead of myModel.js
without penalty. This also applies to Task 3 and Task 4.

Table 1. Occurrence Matrix for Social Network
Task 3
Use the same occurrence matrix stored in MATRIX, create a composite table
which shows which friends/nodes in the network of friends has the greatest
connectivity. This is a useful piece of information because it shows the strongest
routes for communication which is often used in social networks to promote
virality. Table 2 shows a basic output from the social network.
Table 2. Connectivity/Linkage Table for Social Network
For Task 3 you should submit three files myModel.js, myTask3.html and
myTask3.js each of which should be modified versions of the files Model.js,
Task3.html and Task3.js respectively.
Each task must be programmed in JavaScript, HMTL and CSS using appropriate
data matching techniques, data and control structures and DOM elements to
satisfy the specification. All coding must be client-side and there must be no
external calls to server pages or loading of external web pages containing static
tables of data.
Task 3
Use the same occurrence matrix stored in MATRIX, create a composite table
which shows which friends/nodes in the network of friends has the greatest
connectivity. This is a useful piece of information because it shows the strongest
routes for communication which is often used in social networks to promote
virality. Table 2 shows a basic output from the social network.
Table 2. Connectivity/Linkage Table for Social Network
For Task 3 you should submit three files myModel.js, myTask3.html and
myTask3.js each of which should be modified versions of the files Model.js,
Task3.html and Task3.js respectively.
Each task must be programmed in JavaScript, HMTL and CSS using appropriate
data matching techniques, data and control structures and DOM elements to
satisfy the specification. All coding must be client-side and there must be no
external calls to server pages or loading of external web pages containing static
tables of data.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 3
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.
