Highlights
x = get_user("lafpark") y = get_friends(x$user_id)
The function get_friends returns a table containing twitter ids. To convert these to user names, use the function get_user. Note that the size of the set of friends is likely to be in the order of 10,000. Rather than analysing all 10,000, take a reasonable size sample of the friends to use for the remainder of the project. Briefly summarise who each of the friends is, if there are any similarities between the friends, and identify if there are any common friends between the three politicians. 2. We currently have a set of relationships between the three politicians and a sample of their friends. Determine if there are friend relationships between the friends and plot the graph of relationships containing the three politicians, their friends and all relationships. The library retweet provides a function to check if users are friends. Note that Twitter rate limits users so that one user does not use all of their resources. So when accessing the API many times, you may receive no results and have to wait 15 minutes before resuming. To plot the graph, construct an adjacency matrix containing the known relationships, and use graph_from_adjacency_matrix(A, mode = "undirected") from the graph to create the graph. Colour the nodes to denote which of the above three leaders they are friends with. What does the graph structure tell us about the politicians and their friends? 3. Before completing the remainder of the analysis, we will add edges between each of the three party leaders, under the assumption that they follow each other, but not in a friendly way. Compute the diameter and density of the graph, and neighbourhood overlap of each edge and determine which nodes have the greatest social capital. Were the results obvious from the graph structure? 4. Compute if there is homophily between the Labour and combined Liberal/National parties. To do this, assume that any friends of a politician share their political views. Use a significance level of ? = 0.05 5. Finally, determine if the signed network is weakly balanced (using hierarchical clustering) and identify if any within or between signed relationships are not as expected. For this 3 analysis, treat all existing edges are positive and all missing edges as negative. Write up a report containing your code and analysis of the data with each section clearly labelled. Clearly annotate your code and make sure to state any conclusions you make from each piece of analysis. Remember that you are examining how the political parties are related, so make sure that the conclusion of each section refers back to this.This Report Writing Assessment has been solved by our Report Writing experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.