Skip to content

Commit

Permalink
added intro analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
sevashasla committed Dec 19, 2024
1 parent 875077f commit b1f8a1e
Showing 1 changed file with 3 additions and 69 deletions.
72 changes: 3 additions & 69 deletions src/notebooks/intro_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"archetype_data = pd.read_csv('../../data/enriched/persona_identification/archetype_predictions_joined.csv')\n",
"\n",
"character_data = pd.read_csv('../../data/MovieSummaries/alex_character_processed.csv')\n",
"character_data = pd.read_csv('../../data/MovieSummaries/character_processed.csv')\n",
"\n",
"character_data = character_data.rename(columns={\n",
" 'Wikipedia movie ID': \"wikipedia_movie_id\",\n",
Expand Down Expand Up @@ -196212,7 +196212,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's look on how the average number of как бля короче распределены эти ебаные архетипы по ебаным фильмам нахуй"
"Every movie on average contains a lot of different characters with a lot of different archetypes. The distribution of the how many unique archetypes every movie has"
]
},
{
Expand Down Expand Up @@ -220782,72 +220782,6 @@
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# should do on unique!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from plotly.subplots import make_subplots\n",
"fig = make_subplots(\n",
" rows=4, cols=1, \n",
" specs=[\n",
" [{\"type\": \"pie\"}], [{\"type\": \"pie\"}],\n",
" [{\"type\": \"pie\"}], [{\"type\": \"pie\"}]\n",
" ])\n",
"\n",
"fig.add_trace(\n",
" go.Pie(\n",
" labels=data.archetype.value_counts().index, \n",
" values=data.archetype.value_counts(),\n",
" legendgroup=\"1\",\n",
" ),\n",
" row=1, col=1\n",
")\n",
"\n",
"fig.add_trace(\n",
" go.Pie(\n",
" labels=data.actor_gender.value_counts().index, \n",
" values=data.actor_gender.value_counts(),\n",
" legendgroup=\"2\",\n",
" ),\n",
" row=2, col=1\n",
")\n",
"\n",
"fig.add_trace(\n",
" go.Pie(\n",
" labels=data.race.value_counts().index, \n",
" values=data.race.value_counts(),\n",
" legendgroup=\"3\",\n",
" ),\n",
" row=3, col=1\n",
")\n",
"\n",
"fig.update_layout(\n",
" height=1000,\n",
" autosize=False,\n",
" legend_tracegroupgap = 180,\n",
" margin=dict(t=0, b=0, l=0, r=0),\n",
")\n",
"\n",
"\n",
"fig.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit b1f8a1e

Please sign in to comment.