Due date: **December 8th, 2023, 5pm** (no extension will be allowed).
Due date: **December 8th, 2023, 5pm** (no extension will be allowed).
Submit your solution by email: romain.vuillemot@ec-lyon.fr
Submit your solution by email: romain.vuillemot@ec-lyon.fr
You may work as a group (max 2) but all members are required to submit their solution and indicate their collaborator (if any).
You may work as a group (max 2) but all members are required to submit their solution and indicate their collaborator (if any).
## Goal of this assignment
## Goal of this assignment
In this assignment we provide you with a dataset of characters from a movie. Your role will be to answer the questions below programmatically, using Pyhon. **Please note you need to answer with fully working python code embedded in this notebook as solution (no external modules or files can be included).** You may then replace the code below with your answer for each question:
In this assignment we provide you with a dataset of characters from a movie. Your role will be to answer the questions below programmatically, using Pyhon. **Please note you need to answer with fully working python code embedded in this notebook as solution (no external modules or files can be included).** You may then replace the code below with your answer for each question:
```python
```python
# YOUR CODE HERE
# YOUR CODE HERE
raiseNotImplementedError()
raiseNotImplementedError()
```
```
## Grading
## Grading
- 20% for the results to the questions
- 20% for the results to the questions
- 60% for the code quality
- 60% for the code quality
- 20% for the notebook presentation
- 20% for the notebook presentation
- +10% bonus question
- +10% bonus question
## Getting started
## Getting started
We provide you with a dataset containing movie characters. Each character is represented as a row, along with connections to other characters, based on the movie script. You will use those connections to create a graph-based data structure and answer the questions.
We provide you with a dataset containing movie characters. Each character is represented as a row, along with connections to other characters, based on the movie script. You will use those connections to create a graph-based data structure and answer the questions.
To get you started with the dataset, we provide you with the code that loads it:
To get you started with the dataset, we provide you with the code that loads it:
**Question 2 -** Write a function that turns the `data` variable into a dictionnary data structure like the one below. You may then be able to plot it with the `plot_character_connections` function provided in the next cell:
**Question 2 -** Write a function that turns the `data` variable into a dictionnary data structure like the one below. You may then be able to plot it with the `plot_character_connections` function provided in the next cell:
**Question 4 -** How many communities can you identify? We define a community as a sub-graph of connected people by a path (i.e. a connected component).
**Question 4 -** How many communities can you identify? We define a community as a sub-graph of connected people by a path (i.e. a connected component).
**Question 6 (BONUS) -** Among the community of characters, is there a fully connected one? (i.e. where all characters are directly connected to the others).
**Question 6 (BONUS) -** Among the community of characters, is there a fully connected one? (i.e. where all characters are directly connected to the others).