"Due date: **December 6th, 2023, 5pm** (no extension will be allowed).\n",
"Due date: **December 8th, 2023, 5pm** (no extension will be allowed).\n",
"\n",
"\n",
"Submit your solution by email: romain.vuillemot@ec-lyon.com\n",
"Submit your solution by email: romain.vuillemot@ec-lyon.fr\n",
"\n",
"You may work as a group (max 2) but all members are required to submit their solution and indicate their collaborator (if any).\n",
"\n",
"\n",
"## Goal of this assignment\n",
"## Goal of this assignment\n",
"\n",
"\n",
"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).** \n",
"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:\n",
"\n",
"```python\n",
"# YOUR CODE HERE\n",
"raise NotImplementedError()\n",
"```\n",
"\n",
"\n",
"## Grading\n",
"## Grading\n",
"\n",
"\n",
"- 30% on the results to the questions\n",
"- 20% for the results to the questions\n",
"- 50% on the code quality\n",
"- 60% for the code quality\n",
"- 20% on the notebook presentation\n",
"- 20% for the notebook presentation\n",
"- \\+ 10% bonus question\n",
"- +10% bonus question\n",
"\n",
"\n",
"## Getting started\n",
"## Getting started\n",
"\n",
"\n",
"We provide you with a dataset containing movie characters on each row. Each character has connections, based on the movie script, from which you will create a graph-based data structure. To get you started with the dataset, we provide you with the code that loads it:"
"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. \n",
"\n",
"To get you started with the dataset, we provide you with the code that loads it:"
]
]
},
},
{
{
...
@@ -60,7 +69,7 @@
...
@@ -60,7 +69,7 @@
"tags": []
"tags": []
},
},
"source": [
"source": [
"The `data` variable contains the list of characters. You may look at the `users.csv` file to grasp the values of this variable. Here is a sample of the dataset:\n",
"The `data` variable contains the list of characters. You may look at the `users.csv` file to grasp the values of this variable. Here is a sample:\n",
"\n",
"\n",
"```\n",
"```\n",
"[('Tony_Stark',\n",
"[('Tony_Stark',\n",
...
@@ -82,7 +91,7 @@
...
@@ -82,7 +91,7 @@
"id": "70e93e78-f4dd-435f-b0f7-d56d928d7051",
"id": "70e93e78-f4dd-435f-b0f7-d56d928d7051",
"metadata": {},
"metadata": {},
"source": [
"source": [
"**Question 1 -** How many characters are in the dataset?"
"**Question 1 -** How many characters are there in the dataset?"
]
]
},
},
{
{
...
@@ -114,7 +123,7 @@
...
@@ -114,7 +123,7 @@
"id": "0a1a4c6c-f95c-4dc3-8bb3-863d1048ae79",
"id": "0a1a4c6c-f95c-4dc3-8bb3-863d1048ae79",
"metadata": {},
"metadata": {},
"source": [
"source": [
"**Question 2 -** Write a function that turns the `data` variable into a dictionnary data structure like the one below below. You may be able to plot it with the `plot_character_connections` function provided in the next cell:\n",
"**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:\n",
"**Question 6 (BONUS) -** Among the community of characters, is there one fully connected? (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)."
Due date: **December 6th, 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.com
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).
## 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).**
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
# YOUR CODE HERE
raiseNotImplementedError()
```
## Grading
## Grading
-30% on the results to the questions
-20% for the results to the questions
-50% on the code quality
-60% for the code quality
- 20% on 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 on each row. Each character has connections, based on the movie script, from which you will create a graph-based data structure. To get you started with the dataset, we provide you with the code that loads it:
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:
The `data` variable contains the list of characters. You may look at the `users.csv` file to grasp the values of this variable. Here is a sample of the dataset:
The `data` variable contains the list of characters. You may look at the `users.csv` file to grasp the values of this variable. Here is a sample:
**Question 2 -** Write a function that turns the `data` variable into a dictionnary data structure like the one below below. You may 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 one fully connected? (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).