• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    F#
  • Created almost 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Star Wars social network

The Star Wars social network

This repository contains the code I used to create my blog post on the Star Wars social network.

Update: I added the 7th episode Star Wars: The Force Awakens and included more network analysis on my blog.

The folder data contains:

  • characters.csv: extracted list of named characters that appeared in the screenplays.

  • aliases.csv: csv file with alternative names for some of the characters

  • charactersPerScene.csv: each line contains name of a character followed by the relative times when the character is mentioned in the screenplay. I used this data to generate character timelines. The values were computed as

     episode number + scene number/number of scenes in episode
    

    Values [0,1] correspond to mentions in Episode I, [1,2] to Episode II etc.

    [Note that this is not a valid csv file because each line contains a different number of columns]

Networks

The folder networks contains:

  • starwars-episode-N-interactions.json contains the social network extracted from Episode N, where the links between characters are defined by the times the characters speak within the same scene.
  • starwars-episode-N-mentions.json contains the social network extracted from Episode N, where the links between characters are defined by the times the characters are mentioned within the same scene.
  • starwars-episode-N-interactions-allCharacters.json is the interactions network with R2-D2 and Chewbacca added in using data from mentions network.
  • starwars-full-... contain the corresponding social networks for the whole set of 6 episodes.

Description of networks

The json files representing the networks contain the following information:

Nodes

The nodes contain the following fields:

  • name: Name of the character
  • value: Number of scenes the character appeared in
  • colour: Colour in the visualization

Links

Links represent connections between characters. The link information corresponds to:

  • source: zero-based index of the character that is one end of the link, the order of nodes is the order in which they are listed in the “nodes” element
  • target: zero-based index of the character that is the the other end of the link.
  • value: Number of scenes where the “source character” and “target character” of the link appeared together. Please not that the network is undirected. Which character represents the source and the target is arbitrary, they correspond only to two ends of the link.

The other files contain the code used to generate the data files and the plots.

  • interactions.html and episode-interactions.html contain the D3.js code to visualize the networks.
  • The rest of the code is in F# and uses FsLab
  • To run the code, use paket reference manager to download all the dependencies

Using the social network data

For details please refer to the associated repository evelinag/star-wars-network-data containing only the dataset.

Citing the dataset

If you use the dataset in your work, please use the following citation:

Gabasova, E. (2016). Star Wars social network. DOI: https://doi.org/10.5281/zenodo.1411479.

@misc{gabasova_star_wars_2016,
  author  = {Evelina Gabasova},
  title   = {{Star Wars social network}},
  year    = 2016,
  url     = {https://doi.org/10.5281/zenodo.1411479},
  doi     = {10.5281/zenodo.1411479}
 }

More Repositories

1

Ariadne

F# library for Gaussian process models
F#
40
star
2

stackoverflow-survey-analysis

My contribution to the tabs versus spaces and salary debate
29
star
3

Projects

Various projects and samples
F#
24
star
4

tabs-spaces-talk

CSS
23
star
5

SentimentAnalysisDemo

Talk on sentiment analysis of tweets using F#
F#
19
star
6

ffplot

Wrapper for ggplot2 to simplify creating of plots in F# using RPRovider
F#
17
star
7

fsharp-swapi

F# wrapper for the Star Wars API
F#
17
star
8

clusternomics

Integrative clustering for heterogeneous biomedical datasets.
R
14
star
9

probabilistic-programming

[Talk] How to look like a statistician: a developer's guide to probabilistic programming
F#
10
star
10

polyglot-data-science

Polyglot data science tutorial
F#
9
star
11

fableconf-data-viz

Demos from Fableconf 2018: data visualization with F# script files, Fable REPL and Recharts
F#
9
star
12

explorable-reinforcement-learning

Explorable explanation of basic reinforcement learning algorithms
F#
8
star
13

star-wars-network-data

Star Wars social network data
7
star
14

SentimentAnalysis-QConRio

Code and slides from QCon Rio 2015
F#
6
star
15

Social-network-analysis

This repository contains accompanying material for Chapter 5 - Social network analysis from F# Deep Dives book.
F#
6
star
16

aoc2019

Advent of Code 2019
F#
3
star
17

LanguageRecognizer

F# tutorial: code for building a language recognizer.
F#
3
star
18

breaking-black-box-ai

Slides and demos
Jupyter Notebook
2
star
19

talk-fssnip-recommender

Spice up your website with machine learning
F#
2
star
20

DataAnalysis-Oredev

"Putting fun into data analysis with F#" talk at Oredev 2015
F#
2
star
21

cancer-research-and-ML

Materials from my talk on machine learning in cancer research
F#
2
star
22

fsharpexchange2017

Keynote from F# eXchange 2017
F#
1
star