diff --git "a/survey_analytics.ipynb" "b/survey_analytics.ipynb" new file mode 100644--- /dev/null +++ "b/survey_analytics.ipynb" @@ -0,0 +1 @@ +{"cells":[{"cell_type":"code","execution_count":1,"metadata":{},"outputs":[{"data":{"text/plain":["'0.11.0'"]},"execution_count":1,"metadata":{},"output_type":"execute_result"}],"source":["import bertopic\n","bertopic.__version__"]},{"cell_type":"code","execution_count":2,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":["c:\\Users\\Russ\\anaconda3\\lib\\site-packages\\outdated\\utils.py:14: OutdatedPackageWarning: The package pingouin is out of date. Your version is 0.5.1, the latest is 0.5.2.\n","Set the environment variable OUTDATED_IGNORE=1 to disable these warnings.\n"," return warn(\n"]},{"data":{"text/plain":[""]},"execution_count":2,"metadata":{},"output_type":"execute_result"}],"source":["# imports\n","import pandas as pd\n","import numpy as np\n","import matplotlib.pyplot as plt\n","import seaborn as sns\n","import plotly.express as px\n","\n","# factor analysis\n","from factor_analyzer import FactorAnalyzer\n","from factor_analyzer.factor_analyzer import calculate_bartlett_sphericity\n","from factor_analyzer.factor_analyzer import calculate_kmo\n","import pingouin as pg\n","from scipy.stats import zscore\n","\n","# clustering\n","from sklearn.preprocessing import StandardScaler\n","from sklearn.decomposition import PCA\n","from sklearn.cluster import KMeans\n","\n","# nlp\n","from bertopic import BERTopic\n","from umap import UMAP\n","from sklearn.feature_extraction.text import CountVectorizer\n","from transformers import pipeline\n","from nltk.tokenize import sent_tokenize\n","\n","# custom\n","import survey_analytics_library as LIB\n","import importlib\n","importlib.reload(LIB)"]},{"cell_type":"code","execution_count":2,"metadata":{},"outputs":[],"source":["# read data\n","data = pd.read_excel('data/bfi_data.xlsx', sheet_name='bfi')\n","data_dict = pd.read_excel('data/bfi_data.xlsx', sheet_name='questions_clean')\n","\n","# drop demographics data for factor analysis\n","df_factor_analysis = data.drop(['gender', 'education', 'age'], axis=1)\n","# drop null data\n","df_factor_analysis = df_factor_analysis.dropna()\n","# convert data from float to int\n","for col in df_factor_analysis:\n"," df_factor_analysis[col] = df_factor_analysis[col].apply(int)\n","\n","# generate column names\n","bfi_questions = []\n","for i in range(1,26):\n"," bfi_questions.append('Q'+str(i))\n","# rename columns\n","df_factor_analysis.columns = bfi_questions"]},{"cell_type":"code","execution_count":6,"metadata":{},"outputs":[],"source":["def read_survey_data():\n"," data_survey = pd.read_csv(r'data\\bfi_sample_answers.csv')\n"," data_questions = pd.read_csv(r'data\\bfi_sample_questions.csv')\n"," return data_survey, data_questions\n","data_survey, data_questions = read_survey_data()\n","\n","# copy daya\n","df_factor_analysis = data_survey.copy()"]},{"cell_type":"code","execution_count":7,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
questiondescription
0Q1Am indifferent to the feelings of others.
1Q2Inquire about others' well-being.
2Q3Know how to comfort others.
3Q4Love children.
4Q5Make people feel at ease.
5Q6Am exacting in my work.
6Q7Continue until everything is perfect.
7Q8Do things according to a plan.
8Q9Do things in a half-way manner.
9Q10Waste my time.
10Q11Don't talk a lot.
11Q12Find it difficult to approach others.
12Q13Know how to captivate people.
13Q14Make friends easily.
14Q15Take charge.
15Q16Get angry easily.
16Q17Get irritated easily.
17Q18Have frequent mood swings.
18Q19Often feel blue.
19Q20Panic easily.
20Q21Am full of ideas.
21Q22Avoid difficult reading material.
22Q23Carry the conversation to a higher level.
23Q24Spend time reflecting on things.
24Q25Will not probe deeply into a subject.
\n","
"],"text/plain":[" question description\n","0 Q1 Am indifferent to the feelings of others. \n","1 Q2 Inquire about others' well-being. \n","2 Q3 Know how to comfort others. \n","3 Q4 Love children. \n","4 Q5 Make people feel at ease. \n","5 Q6 Am exacting in my work. \n","6 Q7 Continue until everything is perfect. \n","7 Q8 Do things according to a plan. \n","8 Q9 Do things in a half-way manner. \n","9 Q10 Waste my time. \n","10 Q11 Don't talk a lot. \n","11 Q12 Find it difficult to approach others. \n","12 Q13 Know how to captivate people. \n","13 Q14 Make friends easily. \n","14 Q15 Take charge. \n","15 Q16 Get angry easily. \n","16 Q17 Get irritated easily. \n","17 Q18 Have frequent mood swings. \n","18 Q19 Often feel blue. \n","19 Q20 Panic easily. \n","20 Q21 Am full of ideas. \n","21 Q22 Avoid difficult reading material.\n","22 Q23 Carry the conversation to a higher level. \n","23 Q24 Spend time reflecting on things. \n","24 Q25 Will not probe deeply into a subject. "]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
Q1Q2Q3Q4Q5Q6Q7Q8Q9Q10...Q16Q17Q18Q19Q20Q21Q22Q23Q24Q25
02434423344...3422336343
12452554434...3335542433
25454445425...4542342552
34465544355...2524133435
42334544532...2344333433
..................................................................
24313431354534...5655661452
24325555354235...4535261562
24332352555511...3433151643
24345224455526...5564152551
24352314255333...1221131351
\n","

2436 rows × 25 columns

\n","
"],"text/plain":[" Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 ... Q16 Q17 Q18 Q19 Q20 \\\n","0 2 4 3 4 4 2 3 3 4 4 ... 3 4 2 2 3 \n","1 2 4 5 2 5 5 4 4 3 4 ... 3 3 3 5 5 \n","2 5 4 5 4 4 4 5 4 2 5 ... 4 5 4 2 3 \n","3 4 4 6 5 5 4 4 3 5 5 ... 2 5 2 4 1 \n","4 2 3 3 4 5 4 4 5 3 2 ... 2 3 4 4 3 \n","... .. .. .. .. .. .. .. .. .. ... ... ... ... ... ... ... \n","2431 3 4 3 1 3 5 4 5 3 4 ... 5 6 5 5 6 \n","2432 5 5 5 5 3 5 4 2 3 5 ... 4 5 3 5 2 \n","2433 2 3 5 2 5 5 5 5 1 1 ... 3 4 3 3 1 \n","2434 5 2 2 4 4 5 5 5 2 6 ... 5 5 6 4 1 \n","2435 2 3 1 4 2 5 5 3 3 3 ... 1 2 2 1 1 \n","\n"," Q21 Q22 Q23 Q24 Q25 \n","0 3 6 3 4 3 \n","1 4 2 4 3 3 \n","2 4 2 5 5 2 \n","3 3 3 4 3 5 \n","4 3 3 4 3 3 \n","... ... ... ... ... ... \n","2431 6 1 4 5 2 \n","2432 6 1 5 6 2 \n","2433 5 1 6 4 3 \n","2434 5 2 5 5 1 \n","2435 3 1 3 5 1 \n","\n","[2436 rows x 25 columns]"]},"metadata":{},"output_type":"display_data"}],"source":["display(data_questions.iloc[:25])\n","display(df_factor_analysis)"]},{"cell_type":"markdown","metadata":{},"source":[" # Factor Analysis"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[],"source":["# define factor analyser model\n","fa = FactorAnalyzer()\n","# fit data\n","fa.fit(X=df_factor_analysis)\n","\n","# get eigenvalues\n","eigenvalues, _ = fa.get_eigenvalues()\n","# get number of eigenvalues more than or equal to 1\n","optimal_factors = len([value for value in eigenvalues if value >= 1])\n","# store eigenvalues and number of clusters into a df for plotly\n","scree_df = pd.DataFrame({'Eigenvalues':eigenvalues, 'Number of Clusters':list(range(1, len(eigenvalues)+1))}) "]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"hovertemplate":"Number of Clusters=%{x}
Eigenvalues=%{y}","legendgroup":"","line":{"color":"#1F77B4","dash":"solid"},"marker":{"symbol":"circle"},"mode":"markers+lines","name":"","orientation":"v","showlegend":false,"type":"scatter","x":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],"xaxis":"x","y":[5.134311177207269,2.7518866679964162,2.1427019540111067,1.8523276117202563,1.548162848621095,1.0735824724970977,0.8395389301503126,0.7992061813306282,0.7189891876453967,0.6880887877430053,0.6763733606270609,0.651799840452446,0.6232529533674183,0.5965628399371606,0.5630908263197334,0.5433053308623307,0.5145175197269455,0.4945031451960979,0.48263951503599906,0.4489209993150913,0.4233661082201498,0.40067145062518233,0.38780447907442217,0.3818567941343317,0.26253901818304437],"yaxis":"y"}],"layout":{"height":500,"legend":{"tracegroupgap":0},"margin":{"t":60},"shapes":[{"line":{"color":"darkgreen","width":3},"type":"line","x0":0,"x1":1,"xref":"x domain","y0":1,"y1":1,"yref":"y"}],"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"width":800,"xaxis":{"anchor":"y","domain":[0,1],"title":{"text":"Number of Clusters"}},"yaxis":{"anchor":"x","domain":[0,1],"title":{"text":"Eigenvalues"}}}}},"metadata":{},"output_type":"display_data"}],"source":["# plot scree plot\n","fig = px.line(\n"," scree_df,\n"," x='Number of Clusters', \n"," y='Eigenvalues',\n"," markers=True,\n"," template='simple_white',\n"," width=800,\n"," height=500,\n"," )\n","fig.add_hline(y=1, line_width=3, line_color='darkgreen')\n","fig.show()"]},{"cell_type":"code","execution_count":10,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["bartlett sphericity stat p value (above 0.05 is considered inadequate): 0.0\n","kmo total (lower than 0.6 is considered inadequate): 0.848539722194922\n"]}],"source":["# Test with the null hypothesis that the correlation matrix is an identity matrix\n","bartlett_sphericity_stat, p_value = calculate_bartlett_sphericity(x=df_factor_analysis)\n","print('bartlett sphericity stat p value (above 0.05 is considered inadequate): ', p_value)\n","# Test how predictable of a variable by others\n","kmo_per_variable, kmo_total = calculate_kmo(x=df_factor_analysis)\n","print('kmo total (lower than 0.6 is considered inadequate): ', kmo_total)"]},{"cell_type":"code","execution_count":11,"metadata":{},"outputs":[],"source":["# define factor analyser model\n","fa = FactorAnalyzer(n_factors=optimal_factors, rotation='varimax')\n","# fit data\n","fa.fit(df_factor_analysis)\n","# generate factor loadings\n","loads_df = pd.DataFrame(fa.loadings_, index=df_factor_analysis.columns)"]},{"cell_type":"code","execution_count":12,"metadata":{},"outputs":[],"source":["# Communality is the proportion of the variable’s variance explained by the factors\n","communalities_df = pd.DataFrame(fa.get_communalities(), index=df_factor_analysis.columns, columns=['communality'])\n","\n","# display(loads_df.style.highlight_max(axis=1, props='color:yellow; font-weight:bold;'))\n","communalities_df['factor_group'] = loads_df.apply(lambda s: s.argmax(), axis=1)\n","\n","# compute cronbach alpha measuring internal consistency [-inf, 1]. Above 0.6 are considered sufficient\n","factor_alpha_df = []\n","for f_i in loads_df.columns:\n"," factor_cols = communalities_df[communalities_df['factor_group'] == f_i].index.tolist()\n"," factor_df = df_factor_analysis[factor_cols]\n","# display(factor_df.shape)\n"," factor_alpha = pg.cronbach_alpha(factor_df)[0]\n"," factor_alpha_df.append([f_i, factor_alpha])\n","\n","factor_alpha_df = pd.DataFrame(factor_alpha_df, columns=['factor', 'alpha'])\n","# display(factor_alpha_df)\n"]},{"cell_type":"code","execution_count":13,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["(2436, 6)\n"]},{"data":{"text/html":["\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
 factor_0factor_1factor_2factor_3factor_4factor_5cluster
0-0.3505060.033583-1.300285-0.512135-1.429475-0.6932751
10.0818290.570999-0.612138-0.201342-0.243352-0.0169111
20.5646840.3272770.083021-0.8243450.210169-0.2361720
3-0.2323250.071300-0.963956-0.268270-1.1872860.8340965
4-0.3374980.364706-0.137084-0.798106-0.675213-0.1903571
50.2707101.1564271.365775-0.2966900.260791-0.0402172
6-1.237221-0.057878-0.0470640.0994520.8306300.0289694
70.449962-1.351683-0.753653-1.596243-0.249111-0.9788590
80.9893770.7837741.0821020.2786190.163224-0.5747482
9-0.1926770.342784-0.226034-0.208836-0.354228-0.0031161
10-1.166783-0.6346560.126300-0.1756360.006115-0.3503612
11-1.5868980.8238490.214158-0.174414-0.9511440.4538481
12-0.404578-0.0374980.754077-1.602443-0.283708-0.2659552
131.0092161.427275-0.010465-0.819611-0.1830550.8704711
140.7813250.897433-0.7087720.2134860.3745000.4651481
151.4146551.2401220.295146-0.654532-0.5434940.4143650
161.2949470.774642-0.529596-0.813496-0.566887-0.6213190
170.4057132.064708-2.683799-0.551945-0.058905-0.8953001
18-0.9309040.297259-0.217468-2.252106-0.4677580.7272505
190.693155-0.080961-0.2517470.8990531.279152-0.5636704
\n"],"text/plain":[""]},"metadata":{},"output_type":"display_data"}],"source":["transformed_df = fa.fit_transform(df_factor_analysis)\n","transformed_df = pd.DataFrame(transformed_df)\n","transformed_df.columns = ['factor_'+str(col) for col in list(transformed_df)]\n","print(transformed_df.shape)\n","\n","responder_factors = transformed_df.copy()\n","\n","responder_factors['cluster'] = responder_factors.apply(lambda s: s.argmax(), axis=1)\n","# display(loads_df.style.highlight_max(axis=1, props='color:white; font-weight:bold; background-color:darkblue;'))\n","communalities_df['factor_group'] = loads_df.apply(lambda s: s.argmax(), axis=1)\n","# list of factor columns\n","list_of_factor_cols = [col for col in responder_factors.columns if 'factor_' in col]\n","# highlight factor with max loadings\n","display(responder_factors.iloc[:20].style.highlight_max(axis=1, subset=list_of_factor_cols, props='color:white; font-weight:bold; background-color:green;'))"]},{"cell_type":"code","execution_count":14,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
clusterQ1Q2Q3Q4Q5Q6Q7Q8Q9...Q16Q17Q18Q19Q20Q21Q22Q23Q24Q25
002.6206904.6430024.2434084.3306293.9736314.2718054.2129824.0973633.066937...4.8803255.1582154.8336714.5192704.2332664.5253553.0872214.1643005.1460452.671400
112.5246644.8878924.9192834.8228704.9484304.3161434.0269064.1502242.544843...2.9439463.4035872.7376682.1345292.3385654.9282512.8161434.6188344.2421522.560538
222.6119054.8000004.3880955.1738104.4666675.2452385.3452385.1214291.388095...2.4809523.1642862.6880952.5976192.7047624.7809522.5738104.1595244.6523812.635714
331.3657895.5473685.3315795.2368425.0763164.1921054.0078954.3131582.373684...2.0078952.8026322.6973683.0000002.9947374.3947372.7605264.0921055.0210532.423684
442.2020204.5277784.1237373.9393944.1641414.6313134.1767683.9545452.411616...2.3939393.2575762.8661623.3333332.2247475.4166671.5353545.2601015.5580811.409091
553.1760804.3189374.6976744.6843854.8106314.5249174.5049834.1461793.734219...2.3222592.7375423.1960133.5548173.1661134.8903653.4019934.4584725.0033223.219269
\n","

6 rows × 26 columns

\n","
"],"text/plain":[" cluster Q1 Q2 Q3 Q4 Q5 Q6 \\\n","0 0 2.620690 4.643002 4.243408 4.330629 3.973631 4.271805 \n","1 1 2.524664 4.887892 4.919283 4.822870 4.948430 4.316143 \n","2 2 2.611905 4.800000 4.388095 5.173810 4.466667 5.245238 \n","3 3 1.365789 5.547368 5.331579 5.236842 5.076316 4.192105 \n","4 4 2.202020 4.527778 4.123737 3.939394 4.164141 4.631313 \n","5 5 3.176080 4.318937 4.697674 4.684385 4.810631 4.524917 \n","\n"," Q7 Q8 Q9 ... Q16 Q17 Q18 Q19 \\\n","0 4.212982 4.097363 3.066937 ... 4.880325 5.158215 4.833671 4.519270 \n","1 4.026906 4.150224 2.544843 ... 2.943946 3.403587 2.737668 2.134529 \n","2 5.345238 5.121429 1.388095 ... 2.480952 3.164286 2.688095 2.597619 \n","3 4.007895 4.313158 2.373684 ... 2.007895 2.802632 2.697368 3.000000 \n","4 4.176768 3.954545 2.411616 ... 2.393939 3.257576 2.866162 3.333333 \n","5 4.504983 4.146179 3.734219 ... 2.322259 2.737542 3.196013 3.554817 \n","\n"," Q20 Q21 Q22 Q23 Q24 Q25 \n","0 4.233266 4.525355 3.087221 4.164300 5.146045 2.671400 \n","1 2.338565 4.928251 2.816143 4.618834 4.242152 2.560538 \n","2 2.704762 4.780952 2.573810 4.159524 4.652381 2.635714 \n","3 2.994737 4.394737 2.760526 4.092105 5.021053 2.423684 \n","4 2.224747 5.416667 1.535354 5.260101 5.558081 1.409091 \n","5 3.166113 4.890365 3.401993 4.458472 5.003322 3.219269 \n","\n","[6 rows x 26 columns]"]},"execution_count":14,"metadata":{},"output_type":"execute_result"}],"source":["fa_clusters = df_factor_analysis.copy().reset_index(drop=True)\n","fa_clusters['cluster'] = responder_factors['cluster']\n","fa_clusters.groupby('cluster').mean().reset_index()"]},{"cell_type":"code","execution_count":15,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
clusterQ1Q2Q3Q4Q5Q6Q7Q8Q9...Q16Q17Q18Q19Q20Q21Q22Q23Q24Q25
000.15-0.13-0.27-0.24-0.45-0.21-0.12-0.160.38...1.231.071.010.840.78-0.260.26-0.240.190.15
110.080.080.240.090.32-0.17-0.26-0.12-0.00...0.00-0.07-0.31-0.68-0.390.100.080.14-0.570.07
220.150.00-0.160.33-0.060.580.740.64-0.84...-0.29-0.23-0.34-0.39-0.16-0.03-0.07-0.24-0.230.13
33-0.740.640.560.370.42-0.27-0.280.01-0.13...-0.59-0.47-0.33-0.130.01-0.370.05-0.300.08-0.03
44-0.15-0.23-0.36-0.50-0.300.09-0.15-0.27-0.10...-0.35-0.17-0.220.08-0.460.54-0.740.670.53-0.80
550.55-0.410.08-0.000.21-0.000.10-0.120.86...-0.39-0.51-0.020.220.120.070.460.010.070.57
\n","

6 rows × 26 columns

\n","
"],"text/plain":[" cluster Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ... Q16 \\\n","0 0 0.15 -0.13 -0.27 -0.24 -0.45 -0.21 -0.12 -0.16 0.38 ... 1.23 \n","1 1 0.08 0.08 0.24 0.09 0.32 -0.17 -0.26 -0.12 -0.00 ... 0.00 \n","2 2 0.15 0.00 -0.16 0.33 -0.06 0.58 0.74 0.64 -0.84 ... -0.29 \n","3 3 -0.74 0.64 0.56 0.37 0.42 -0.27 -0.28 0.01 -0.13 ... -0.59 \n","4 4 -0.15 -0.23 -0.36 -0.50 -0.30 0.09 -0.15 -0.27 -0.10 ... -0.35 \n","5 5 0.55 -0.41 0.08 -0.00 0.21 -0.00 0.10 -0.12 0.86 ... -0.39 \n","\n"," Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 Q25 \n","0 1.07 1.01 0.84 0.78 -0.26 0.26 -0.24 0.19 0.15 \n","1 -0.07 -0.31 -0.68 -0.39 0.10 0.08 0.14 -0.57 0.07 \n","2 -0.23 -0.34 -0.39 -0.16 -0.03 -0.07 -0.24 -0.23 0.13 \n","3 -0.47 -0.33 -0.13 0.01 -0.37 0.05 -0.30 0.08 -0.03 \n","4 -0.17 -0.22 0.08 -0.46 0.54 -0.74 0.67 0.53 -0.80 \n","5 -0.51 -0.02 0.22 0.12 0.07 0.46 0.01 0.07 0.57 \n","\n","[6 rows x 26 columns]"]},"execution_count":15,"metadata":{},"output_type":"execute_result"}],"source":["fa_z_scores = df_factor_analysis.copy().reset_index(drop=True)\n","fa_z_scores = fa_z_scores.apply(zscore)\n","fa_z_scores['cluster'] = responder_factors['cluster']\n","fa_z_scores = fa_z_scores.groupby('cluster').mean().reset_index()\n","fa_z_scores = fa_z_scores.apply(lambda x: round(x, 2))\n","fa_z_scores"]},{"cell_type":"code","execution_count":16,"metadata":{},"outputs":[{"data":{"text/html":["\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
 clusterQ1Q2Q3Q4Q5Q6Q7Q8Q9Q10Q11Q12Q13Q14Q15Q16Q17Q18Q19Q20Q21Q22Q23Q24Q25
000.15-0.13-0.27-0.24-0.45-0.21-0.12-0.160.380.550.080.49-0.27-0.37-0.151.231.071.010.840.78-0.260.26-0.240.190.15
110.080.080.240.090.32-0.17-0.26-0.12-0.00-0.22-0.82-0.900.520.730.460.00-0.07-0.31-0.68-0.390.100.080.14-0.570.07
220.150.00-0.160.33-0.060.580.740.64-0.84-0.880.29-0.06-0.190.000.26-0.29-0.23-0.34-0.39-0.16-0.03-0.07-0.24-0.230.13
33-0.740.640.560.370.42-0.27-0.280.01-0.130.000.00-0.01-0.180.13-0.36-0.59-0.47-0.33-0.130.01-0.370.05-0.300.08-0.03
44-0.15-0.23-0.36-0.50-0.300.09-0.15-0.27-0.100.190.070.12-0.02-0.550.01-0.35-0.17-0.220.08-0.460.54-0.740.670.53-0.80
550.55-0.410.08-0.000.21-0.000.10-0.120.860.390.570.470.170.09-0.35-0.39-0.51-0.020.220.120.070.460.010.070.57
\n"],"text/plain":[""]},"execution_count":16,"metadata":{},"output_type":"execute_result"}],"source":["cm = sns.light_palette('green', as_cmap=True)\n","list_of_question_cols = list(fa_z_scores.iloc[:,1:])\n","fa_z_scores.style.background_gradient(cmap=cm, subset=list_of_question_cols).format(precision=2)"]},{"cell_type":"code","execution_count":17,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"domain":{"x":[0,1],"y":[0,1]},"hole":0.35,"hovertemplate":"Cluster=%{label}
Count=%{value}","labels":[0,1,2,4,3,5],"legendgroup":"","name":"","showlegend":true,"type":"pie","values":[493,446,420,396,380,301]}],"layout":{"height":600,"legend":{"tracegroupgap":0},"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"title":{"text":"Percentage of Responders in Each Cluster"},"width":1000}}},"metadata":{},"output_type":"display_data"}],"source":["cluster_counts = fa_clusters['cluster'].value_counts().reset_index()\n","cluster_counts = cluster_counts.rename(columns={'index':'Cluster', 'cluster':'Count'})\n","cluster_counts\n","\n","fig = px.pie(\n"," cluster_counts,\n"," values='Count', \n"," names='Cluster', \n"," hole=0.35,\n"," title='Percentage of Responders in Each Cluster',\n"," template='simple_white',\n"," width=1000,\n"," height=600,\n"," )\n","fig.show()"]},{"cell_type":"markdown","metadata":{},"source":[" # Demographic Clustering"]},{"cell_type":"code","execution_count":18,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
AgeIncome
04119
147100
23357
32919
447253
.........
8452726
8462834
8472518
8483228
8495264
\n","

850 rows × 2 columns

\n","
"],"text/plain":[" Age Income\n","0 41 19\n","1 47 100\n","2 33 57\n","3 29 19\n","4 47 253\n",".. ... ...\n","845 27 26\n","846 28 34\n","847 25 18\n","848 32 28\n","849 52 64\n","\n","[850 rows x 2 columns]"]},"execution_count":18,"metadata":{},"output_type":"execute_result"}],"source":["cus_data = pd.read_csv('data/cus_data.csv')\n","cus_data = cus_data[['Age', 'Income']]\n","cus_data"]},{"cell_type":"code","execution_count":19,"metadata":{},"outputs":[],"source":["scaler = StandardScaler()\n","cus_data_scaled = scaler.fit_transform(cus_data)"]},{"cell_type":"code","execution_count":20,"metadata":{},"outputs":[],"source":["# inertia = LIB.create_elbow_plot_kmeans(cus_data_scaled, 15)\n","# silhouette_scores = LIB.silhouette_score_plot_kmeans(cus_data_scaled, 15)"]},{"cell_type":"code","execution_count":21,"metadata":{},"outputs":[],"source":["# define optimal number of clusters\n","optimal_clusters = 5\n","\n","# define kmeans model\n","kmeans = KMeans(optimal_clusters, random_state=42)\n","\n","# fit and predict model\n","clusters = kmeans.fit_predict(cus_data_scaled)\n","\n","cus_data['cluster'] = clusters\n"]},{"cell_type":"code","execution_count":22,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"hovertemplate":"color=0
Income=%{x}
Age=%{y}","legendgroup":"0","marker":{"color":"#1F77B4","symbol":"circle"},"mode":"markers","name":"0","orientation":"v","showlegend":true,"type":"scatter","x":[19,57,56,40,32,43,38,59,45,28,37,37,18,33,70,25,64,60,34,67,44,79,23,61,75,98,18,21,68,65,42,75,33,27,27,34,28,60,32,54,53,32,46,63,26,32,53,42,47,36,57,29,35,41,68,58,37,31,65,37,59,39,82,47,32,54,55,46,40,15,24,41,75,31,73,30,26,21,21,26,48,57,68,45,29,35,28,51,39,54,45,31,21,39,23,54,63,28,24,40,47,25,55,24,77,58,23,39,64,24,62,45,40,41,56,45,27,40,23,30,56,48,59,47,24,39,56,32,75,33,42,30,20,54,25,42,32,36,25,19,57,39,41,44,38,23,97,60,22,65,24,25,53,63,30,38,52,25,27,46,44,26,55,49,54,42,29,21,30,28,29,83,60,36,46,27,33,78,25,32,40,35,28,72,47,32,35,34,53,22,20,17,45,29,21,43,38,45,49,23,52,48,67,41,48,60,37,46,44,27,45,32,64,36,35,51,75,57,29,53,43,42,22,22,32,28,30,16,56,28,28,50,77,32,53,81,33,33,44,44,21,36,28,27,20,39,73,20,20,73,28,68,34,49,32,35,44,31,39,75,43,61,55,39,47,33,40,42,18,58,69,64,40,33,44,62,33,43,39,38,44,32,27,39,57,67,84,25,23,19,52,20,49,22,36,27,35,40,24,38,26,37,52,43,25,36,45,43,28],"xaxis":"x","y":[41,33,38,34,36,36,37,38,34,40,33,35,37,36,29,34,40,39,34,36,31,34,38,30,40,30,33,35,33,30,38,37,35,34,37,38,32,36,41,33,36,39,33,32,33,33,39,32,32,35,35,35,40,36,34,37,33,38,34,35,31,36,35,31,36,31,40,39,33,41,37,37,37,37,40,35,41,38,39,33,34,37,39,36,37,39,34,32,36,37,35,39,34,39,40,32,38,40,35,35,39,41,40,35,35,38,33,34,38,33,37,40,35,38,30,39,36,38,38,41,34,39,34,41,35,39,37,34,39,34,35,36,37,36,36,35,33,34,37,38,32,39,31,31,39,34,31,36,39,38,37,36,34,38,35,35,39,34,34,40,41,36,40,36,38,33,33,34,36,34,37,37,31,41,39,33,37,34,41,32,35,38,40,33,37,39,33,35,39,33,35,36,31,35,38,40,38,38,36,37,39,34,39,31,34,39,38,39,38,34,31,40,35,41,35,34,32,39,37,31,32,39,35,38,37,36,35,36,39,40,35,37,35,32,32,36,34,32,37,41,33,40,40,39,36,35,32,34,38,39,33,30,35,41,35,33,33,37,35,34,41,39,33,34,34,40,34,35,38,33,39,38,36,39,36,35,34,36,35,39,39,33,33,39,40,34,29,38,36,41,34,34,31,33,40,36,35,36,37,32,41,33,33,36,38,32,32,41,32],"yaxis":"y"},{"hovertemplate":"color=2
Income=%{x}
Age=%{y}","legendgroup":"2","marker":{"color":"#FF7F0E","symbol":"circle"},"mode":"markers","name":"2","orientation":"v","showlegend":true,"type":"scatter","x":[100,81,115,88,123,100,126,113,177,84,145,157,126,82,113,101,89,129,113,95,116,102,83,169,150,120,100,101,91,91,94,105,113,136,102,186,126,120,144,132,86,166,176,91,96,100,89,108,107,120,93,116,89,99,159,86,83,140,110,190,138,116,114,121,94,98,118,135,148,139,129,100,101,116],"xaxis":"x","y":[47,40,47,44,37,40,39,48,37,45,41,40,38,42,39,44,39,47,47,40,40,50,41,47,50,41,48,39,41,41,45,35,44,47,40,42,46,51,46,45,41,51,41,45,41,41,40,37,47,54,41,39,43,46,51,44,43,45,47,42,40,40,54,42,50,35,54,41,48,52,44,40,48,32],"yaxis":"y"},{"hovertemplate":"color=1
Income=%{x}
Age=%{y}","legendgroup":"1","marker":{"color":"#2CA02C","symbol":"circle"},"mode":"markers","name":"1","orientation":"v","showlegend":true,"type":"scatter","x":[19,18,18,20,16,17,25,47,21,42,45,18,14,34,14,21,19,61,19,20,26,20,27,14,42,33,15,25,16,31,32,21,20,20,33,22,27,32,39,16,23,18,21,37,25,21,16,25,23,25,19,21,40,23,30,42,26,24,20,22,27,24,20,28,45,27,22,36,21,45,27,16,25,23,25,16,64,21,30,23,21,23,31,56,15,18,15,34,28,31,32,26,30,37,41,19,13,26,92,50,40,24,17,28,27,28,26,14,31,33,34,22,20,30,34,17,22,16,17,15,17,27,23,16,18,18,21,17,16,75,21,27,33,27,22,18,21,29,16,20,33,16,30,18,14,20,17,21,22,23,24,19,19,18,25,40,44,35,21,19,15,18,24,42,26,17,22,16,35,23,23,32,21,52,17,16,25,22,25,18,18,37,29,26,44,29,22,38,22,38,15,35,18,28,18,24,31,28,23,40,20,25,42,20,21,22,27,23,20,21,29,21,26,26,41,26,32,28,23,16,18,14,26,29,28,38,27,26,20,36,30,42,34,27,17,25,16,22,33,19,30,22,34,16,28,20,30,46,26,57,24,24,15,28,43,31,17,45,24,18,16,22,46,65,23,15,33,20,16,22,26,50,23,48,19,32,14,40,26,36,28,24,25,18,29,17,16,70,17,25,24,46,30,17,24,35,35,24,22,14,38,54,19,25,17,26,25,18,30,36,41,24,22,25,22,63,26,34,18],"xaxis":"x","y":[29,26,24,28,24,29,29,28,24,23,28,22,20,28,22,30,28,29,24,32,27,24,26,24,25,29,26,22,29,28,23,31,29,22,30,27,25,25,30,24,32,30,29,28,28,26,27,31,32,29,24,23,26,30,28,24,25,28,24,28,30,26,31,31,27,31,26,29,24,26,30,21,22,27,31,25,26,21,31,23,31,31,29,27,23,29,24,23,31,25,26,28,28,26,28,23,23,21,26,29,30,24,28,24,29,26,27,26,23,30,27,30,27,29,25,23,31,31,30,29,26,31,24,22,25,29,23,23,28,27,24,26,31,29,32,21,24,24,28,25,27,32,29,32,25,25,20,30,25,29,24,30,30,27,31,29,29,22,27,28,32,22,31,27,21,23,29,28,25,32,22,29,24,27,22,21,23,25,29,25,24,29,28,31,28,29,31,28,23,28,24,27,28,31,29,29,31,31,28,27,22,30,28,29,26,30,25,25,26,23,28,29,29,24,28,32,29,28,29,24,25,29,27,31,28,27,31,31,32,29,27,29,31,30,29,26,27,26,30,24,28,29,27,24,26,30,26,24,28,29,31,28,30,26,27,27,29,27,21,23,21,26,29,29,27,25,25,21,23,28,28,27,31,23,25,31,22,26,27,29,29,22,27,24,26,30,24,27,24,21,26,29,29,30,25,26,25,29,28,26,30,25,22,32,21,30,27,27,30,28,21,23,23,26,31,29,27,28,25],"yaxis":"y"},{"hovertemplate":"color=3
Income=%{x}
Age=%{y}","legendgroup":"3","marker":{"color":"#D62728","symbol":"circle"},"mode":"markers","name":"3","orientation":"v","showlegend":true,"type":"scatter","x":[253,221,242,249,446,266,254,220,234,324],"xaxis":"x","y":[47,47,43,51,43,47,43,40,52,53],"yaxis":"y"},{"hovertemplate":"color=4
Income=%{x}
Age=%{y}","legendgroup":"4","marker":{"color":"#9467BD","symbol":"circle"},"mode":"markers","name":"4","orientation":"v","showlegend":true,"type":"scatter","x":[64,30,26,61,77,66,55,27,81,66,36,74,45,55,51,49,48,50,72,86,31,43,41,21,45,27,89,24,73,30,64,27,44,78,24,60,52,40,26,69,82,64,40,38,43,73,22,31,24,70,44,20,41,33,73,68,72,27,30,23,79,52,33,51,29,35,51,70,35,29,28,32,71,78,37,43,60,39,19,59,60,54,63,68,31,63,60,38,48,39,51,21,15,46,56,78,31,50,44,37,75,66,26,66,52,80,79,76,71,70,61,47,52,69,29,59,21,41,78,25,66,20,80,50,26,73,76,37,62,41,30,76,62,20,50,26,22,64],"xaxis":"x","y":[42,46,43,44,45,43,42,48,47,56,50,44,43,46,49,47,44,47,46,48,44,46,46,47,48,53,52,48,46,47,52,45,51,44,42,48,46,44,43,43,51,43,55,43,44,42,44,46,52,48,53,49,42,44,46,41,43,53,42,50,43,47,47,45,45,46,42,48,45,43,54,43,41,55,43,47,46,45,48,48,50,43,49,41,46,41,43,48,42,49,47,50,46,45,41,44,42,53,48,45,41,42,51,48,45,50,49,52,50,52,53,50,41,45,45,56,46,42,53,42,48,46,45,45,47,52,43,43,43,47,48,41,45,45,48,50,45,52],"yaxis":"y"}],"layout":{"height":600,"legend":{"title":{"text":"color"},"tracegroupgap":0},"margin":{"t":60},"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"width":1200,"xaxis":{"anchor":"y","domain":[0,1],"title":{"text":"Income"}},"yaxis":{"anchor":"x","domain":[0,1],"title":{"text":"Age"}}}}},"metadata":{},"output_type":"display_data"}],"source":["# plot with clusters as categories\n","fig = px.scatter(\n"," cus_data, \n"," x='Income', \n"," y='Age',\n"," color=cus_data['cluster'].astype(str),\n"," template='simple_white',\n"," width=1200,\n"," height=600\n"," )\n","fig.update_traces(mode='markers')\n","fig.show()\n"]},{"cell_type":"code","execution_count":23,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
AgeEduYears EmployedIncome
0412619
147126100
23321057
3292419
447131253
...............
845271526
846282734
847254018
8483211228
8495211664
\n","

850 rows × 4 columns

\n","
"],"text/plain":[" Age Edu Years Employed Income\n","0 41 2 6 19\n","1 47 1 26 100\n","2 33 2 10 57\n","3 29 2 4 19\n","4 47 1 31 253\n",".. ... ... ... ...\n","845 27 1 5 26\n","846 28 2 7 34\n","847 25 4 0 18\n","848 32 1 12 28\n","849 52 1 16 64\n","\n","[850 rows x 4 columns]"]},"execution_count":23,"metadata":{},"output_type":"execute_result"}],"source":["cus_data = pd.read_csv('data/cus_data.csv')\n","cus_data = cus_data[['Age', 'Edu', 'Years Employed', 'Income']]\n","cus_data"]},{"cell_type":"code","execution_count":24,"metadata":{},"outputs":[],"source":["scaler = StandardScaler()\n","cus_data_scaled = scaler.fit_transform(cus_data)\n"]},{"cell_type":"code","execution_count":26,"metadata":{},"outputs":[],"source":["# inertia = LIB.create_elbow_plot_kmeans(cus_data_scaled, 15)\n","# silhouette_scores = LIB.silhouette_score_plot_kmeans(cus_data_scaled, 15)\n"]},{"cell_type":"code","execution_count":27,"metadata":{},"outputs":[],"source":["# define optimal number of clusters\n","optimal_clusters = 7\n","\n","# define kmeans model\n","kmeans = KMeans(optimal_clusters, random_state=42)\n","\n","# fit and predict model\n","clusters = kmeans.fit_predict(cus_data_scaled)\n","\n","cus_data['cluster'] = clusters\n"]},{"cell_type":"code","execution_count":28,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["Total Variance: 0.9317066077075122\n","Variance per Component: [0.52689815 0.27380438 0.13100408]\n","Cumulative Variance: [0.52689815 0.80070253 0.93170661]\n"]}],"source":["# define pca model\n","pca = PCA(n_components=3, random_state=42).fit(cus_data_scaled)\n","# print total variance\n","print(f'Total Variance: {pca.explained_variance_ratio_.sum()}')\n","print(f'Variance per Component: {pca.explained_variance_ratio_}')\n","print(f'Cumulative Variance: {pca.explained_variance_ratio_.cumsum()}')\n","\n","# fit and transform data\n","pca = pca.transform(cus_data_scaled)\n","# store components as dataframe\n","pca = pd.DataFrame(pca)\n"]},{"cell_type":"code","execution_count":29,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"hovertemplate":"color=1
0=%{x}
1=%{y}","legendgroup":"1","marker":{"color":"#1F77B4","symbol":"circle"},"mode":"markers","name":"1","orientation":"v","showlegend":true,"type":"scatter","x":[-0.22367708432480332,-0.04674912493968003,0.2419802097440349,0.8452624085911358,-1.0847537847937105,0.06863807279923723,0.6098036907045115,1.0477204154532473,-0.6759529299622884,0.43983400865732525,-0.565601679144706,1.2483827427631007,0.7281776079957971,-0.5073818321046504,0.2886841079017078,0.018382995811042302,0.10068276584707689,1.141128211768593,0.6499924105142276,-0.1387583370654777,0.4963908964507629,-0.0903909468840815,0.145856425063772,-0.3059308507335676,0.02333275883111241,1.1050194209035387,-0.8458766083822045,-0.9284759298622176,-0.19628207007594992,0.3048389083427151,1.1486617756250455,-0.38717759165130317,0.46776412915069965,0.1034339305989028,-0.20026445510188018,0.9788589247161976,0.13131804746500692,-0.53911614646815,0.7438898422239293,-0.5518984920115457,0.6872864180261161,-0.22135765854549094,0.5206030069752768,0.1520255155633745,0.41116123772999175,-0.13924743968272837,-0.3688355529595183,-0.5758002238517196,-0.9408265364331,-0.4107224084027611,0.2570819810667431,0.8267535387610121,-0.014392987653289613,0.26527147867878464,0.4153223466888326,-0.6588312843042465,0.675603638005395,-0.38485816587199073,0.23335897315947995,-0.7141677790639411,-0.6480688130961842,-0.2927167662176582,0.22167566036165354,0.24675124883119454,-0.7109275116948646,1.0238186836130734,-0.9058519547005239,-0.6942949686540734,1.3360526547742522,-0.15495914113375536,1.023997407545984,0.24351098146211797,0.5381563916058323,-0.5026107930174908,-0.03121561464445821,-0.3888870873022967,-0.23194140582064277,0.03305302816123701,0.4417216954641241,-0.35220300991872694,0.5219555875375546,0.529092056031297,0.7972059298711851,1.1176695789183995,-0.8151091392357394,-0.43743266863949803,-0.5295740682938306,0.034583799879320004,1.0246073376743028,-0.6560801195524206,1.2455742143665378,0.37973783482793777,0.32288139559052137,1.121519776415795,-0.016591585921533925,1.2878179848984963,-0.4914914067207127,0.8976695474431993,0.03305302816123701,0.8090214301975464,-0.0557272766129509,-0.736791754225635,-0.2552905711772348,0.8589655957242958,0.463125277592075,-0.022151279069922925,0.9489662935322266,1.0699586552696978,-0.15215061273719238,-0.07791951280213115,-0.4210531406383098,1.8055715063579527,-0.5446758396165389,-0.3353917429450253,0.08868907436491036,-0.5687097589852477,-0.018911011700846303,-0.35868354465688024,0.9650349100719694,0.31534783173406905,0.23120637851850592,-0.35049351426773356,0.14164877970055556,-0.48658818010501825,0.07340911188639687,0.33893865211279744,-0.3682256228311995,0.5838934445464707,-0.1509302197034496,-0.1575894783745133,-0.6307798035226987,0.4583542385049153,-0.7244985112994898,-0.707687244325788,-0.3885301722135809,-0.4449548724784837,-0.20289479234263802,-0.6409783482297123,-0.24232950170092846,-0.2945470893797199,1.2988908347908985,0.013790680656793175,-0.11503532915821443,0.18450248036083305],"xaxis":"x","y":[0.16265620083884652,0.49219296557497133,-0.8163702082922518,-0.6722543456262956,-0.6082614063926695,-0.743376025427694,-0.6618238084102658,-0.9882011507696628,-0.6916861264732573,-0.7696956256752407,-0.4994907107106895,0.1249804891238441,0.2709641093951136,-0.7302269025840746,-0.6509209931528305,-0.8009581687599866,0.15311742385305224,-0.6573027204908201,-1.0095006892219378,0.3077071286719209,-0.7823843341220703,-0.7737420628243579,-0.6744668391912896,0.4926604981585304,-0.7624126471913231,-1.146413065090972,0.4845219461944904,0.41335933418513265,-0.8911597752618965,-0.8993297685182036,-0.9093289599007877,-0.7161694104077578,0.45318702960951807,-0.838137279328086,-0.7470006076590577,-0.6890327961591249,-0.8993345139760498,-0.7071005387344458,-0.7148344406994607,-0.6395577634986055,-0.9573746989762091,0.23654451666256313,0.2201974119631796,0.46634327063990677,-0.818204151876375,-0.6849116127808582,-0.7084598315482404,-0.7225196964534804,-0.5842409095838819,0.3757174364913203,-0.8100246677043754,-1.0081319054924505,0.250604381567803,0.2587358153450737,-0.8893643911568097,0.2714607105420166,-0.8893572729700404,-0.6422810945840411,-0.8199876723368463,-0.6712878391669104,-0.7528833611212211,-0.6400252960821646,0.2768806768784672,-0.8508236150459925,-0.6699238008952694,-1.0711630837245378,-0.6060032351618698,-0.6993957053327746,-0.7212232862242197,-0.7279639858954287,-0.9981641554021335,-0.8521876533176335,0.11820122997359878,-0.7646803093378152,-0.5666045128420071,-0.7533508937047804,1.333887516648205,0.2705303908327446,0.3693357091533307,-0.7379317359857457,-0.9174698845937508,0.4060449144089479,0.2999637357912135,-1.0317258019256386,-0.7501600300357856,-0.7737515537400503,-0.776007352241927,0.23471294580736304,-0.9614573228754395,-0.7197939926391216,-0.9415265681526517,-0.9043088981055158,-0.008707209055005313,-0.9936549311273035,-0.7791958431819986,-0.8508550563382595,-0.6141756011471001,0.15989905573222066,0.2705303908327446,-0.9791346518252738,-0.6862732783235761,0.348074730180092,-0.7701293442376097,-0.8123213984142116,0.30541039796208486,-0.8544481972773562,-0.8109549874136475,0.3416591888209123,0.3385430713810671,-0.7320537279814284,0.33491848914970335,-0.8884969540320717,-0.7823528928298034,-0.6944047121008468,0.3303659599379906,-0.6830847873835044,-0.8530841590057152,-0.7406598125290276,0.4069461655548759,0.24331903035496222,-0.5657080071539253,-0.7007502526887232,-0.8585355666344329,-0.8308590463020145,-0.7778294321814346,0.43551207338860687,-0.6717529990215464,-0.927905167267627,-0.6168941867746894,-0.6926211916403755,-0.49041946630845434,0.3398638047158255,-0.7120867865085274,-0.6685597626236284,0.4214978861491726,0.25195655619482843,-0.7116578134040046,-0.7134484520512452,-0.7646731911510459,0.2787051295468979,-0.9555793148711222,-0.6935058336838418,0.3176701333043917,-0.7311572222933466],"yaxis":"y"},{"hovertemplate":"color=3
0=%{x}
1=%{y}","legendgroup":"3","marker":{"color":"#FF7F0E","symbol":"circle"},"mode":"markers","name":"3","orientation":"v","showlegend":true,"type":"scatter","x":[3.133346637219425,2.102610633387672,3.180107899021835,1.6327927631370982,2.0311306982044366,2.4932481734602194,2.6176135228724076,1.8716699395486043,3.0035141346904943,1.721573067911286,1.7602196559854522,2.591438368880192,2.4291577218103297,2.7666108289870515,1.5795221463400075,2.6912806963064204,3.8361716120487754,1.3180209947668076,2.7551924240233996,3.4179608665715695,2.22574422974865,1.6264909523318556,1.457131200412988,2.289523769937095,1.403946767517162,4.440242464957106,2.227718100456714,4.446855187223794,2.053668489464866,2.8486002203387457,2.1139082108402554,1.4418507051573692,2.3220467383618235,2.7255126276050374,2.9252942935991206,1.8577999212771057,1.9435816137043531,4.118466415621608,1.5793899588114726,1.3566675828409738,3.3984449712504174,2.1719498667245056,3.418795524260069,1.9244974573557145,3.0808646744835637,1.327873984402572,1.547563104416327,1.3511192497100515,2.7304163869978373,1.3974662327790086,1.4779248524126203,4.534582462879683,2.5074291031931635,2.0443907863476163,1.805881885042293,2.5462538824231356,1.6944776051064112,1.6413278158203886,3.369904387851619,1.6640953385280841,3.826019603746138,1.5118924086541674,2.2978806314645803,1.8106415641119855,2.7817699639544964,3.722540446365228,1.5079496711251261,1.5578938366518758,1.5231439824794806,1.7625850853920348,2.0346813442578533,1.6140189854727995,1.8936839845819793,2.401452328877136,2.6424355635252406,1.9194734032289518,2.299636130742844,2.060292571749021,3.1173705607113282,2.709490014692565,3.244808280800044,1.8250868689019994,3.52775955090557,4.322369010300537,4.682446092638953,1.9765476811190623,2.613976160140621,2.273069950829214,2.301253086362191,1.3494449304459668,1.3146025362419256,1.4902754589835026,1.9189377642073255,3.5700316089169513,1.6280217240499384,2.0488628067679024],"xaxis":"x","y":[-1.09619101920067,-1.055360630566786,1.1270199563963852,-1.0340249053643977,-0.9760185343854286,-1.073496001184487,-1.1305987482886048,0.05875844722276219,0.42496823046439103,-0.07722123620807703,-1.1627625425192787,-0.0033691071344736923,-0.8087810533276898,-0.9950937156280941,0.26410773128679554,-0.9538224902450718,-1.019615559041631,0.19068694804663805,-1.2915363664242732,-1.0495140638547358,-0.9307079900400586,-0.9637540535852755,-1.0349190383235565,-1.086191827818086,-1.2030963300062596,-0.7657939355265765,-1.2579865835453838,-0.9452958973844683,-0.5290711753985347,-0.9606379361454304,0.19699392915547803,-1.114263507233837,-0.9996124308186166,0.19878931326056493,-1.3658945875604718,-0.12934248099595957,-1.08572666796345,-1.0468269195194133,0.44633776968796945,-0.8948543582645636,0.15344258216508144,-1.1355921142494558,0.34427158692708515,-0.9479130409484875,0.3116473782996215,0.012549024460387082,-1.0698447231187025,-0.19642484183501005,-1.0467450551034945,-1.2058244065495416,-1.1355511820414963,0.2662620877251016,-0.994626183044535,-0.824624438693401,0.031122859098303313,-0.9783176378241879,0.09368175928898503,0.4359024870140932,-0.07729598243722657,0.007991749790828173,-0.9874155780608439,0.38152069826648793,-0.7181142869711439,-0.7770124181803486,1.069013585417416,0.5083638819816347,-1.195859029188148,-1.0290457757770854,0.34979536805602923,0.19520566323716054,-0.055034682983412686,0.023408534780939738,-0.9973109546509342,-0.6745848903573218,-0.09131016967666084,0.2246823131325119,0.6031470862586014,0.06510873326848476,-0.7747833155128927,0.26496805022476416,0.8990118410662822,-1.0626026768427441,1.1637362798387718,0.06771875864573451,-1.1379564730016722,-1.2906084194439242,0.4435782518524205,-0.9837209950581767,-0.8989802871006767,-0.7520592289333659,-0.9125269417565518,-0.13795093827248184,-1.023165395043845,-1.2408129739292217,-0.9995714986106572,-1.0050157880526054],"yaxis":"y"},{"hovertemplate":"color=6
0=%{x}
1=%{y}","legendgroup":"6","marker":{"color":"#2CA02C","symbol":"circle"},"mode":"markers","name":"6","orientation":"v","showlegend":true,"type":"scatter","x":[0.15600790058930478,-0.12059502230660343,0.47091185648813033,0.8948144826422606,0.7931770084408791,-0.04508616569306216,0.9181522879813859,-0.23327705892096512,-0.05725858110813922,0.044557617026152796,1.1873078309221063,0.5408610199532826,1.1760562570967936,-0.3962884636302142,1.0438583251612799,0.7465077538930098,0.45615564023667104,0.7898045535432676,0.10820496968606244,1.24692626215171,0.11070258662118003,0.6114666499511293,-0.36363330767695046,0.477081479764838,0.3547825410923594,1.0358583787225102,-0.18149121021468712,0.462900550031894,0.7800377478087673,0.3845083411379919,0.5245740319837403,1.1085587069394887,0.16458313354658952,0.2569492607611029,0.4780023213546023,1.0235537757788982,-0.08610954319127795,-0.4565633613925123,-0.21156256533156875,1.0036349617417601,0.1641513945740759,0.15364247118272206,1.0284109987673224,-0.31214701041465115,-0.41834851229085956,0.04595620121570092,0.29883611620434586,0.9321084901541491,0.09708558338928447,-0.22386716827518066,0.488333053590151,1.0481516216486555,1.1350442396160445,0.21886659918798512,-0.1719491320403678,0.08185162453804132,1.121830155100135,0.9937819721059953,0.3514962700960124,1.1373636653953567,0.41795215115248513,0.4316439782681784,1.282603314044251,1.1826689793634817,0.8301141008640518,-0.24806791878222795,1.2549375686079463,-0.019089735633756766,0.6418023801250807,-0.3483993488257073,0.891442027744649,0.7300935822820179,0.1773654790899854,0.17588071099917268,0.6935882288313587,-0.0005695057861666887,-0.6656687341311155,-0.24036752378743706,0.5831507941125117,-0.3139886935941796,0.8151910534742541,0.8277946750847394,-0.2031943437866167,0.9782024581835032,-0.3169180495018108,0.7293514646251642,1.1802173660556343,0.3287401074057837,0.15180078800319358,-0.3976870478197623,0.46337829263167796,1.1524654367180651,-0.5161817926221159,-0.4494728965260403,0.36498108579937305,0.43501643316579,1.2522215802430292,0.21159794316570787,0.41930473171476285,0.6931451298413784,0.3669549565074365,0.6304299787886998,1.2581778359770228,-0.3730431983227348,0.9890222930363025,-0.23944668219767284,-0.5496256026366091,0.7341225037123239,0.9806540714913504,0.15215770309190937,-0.4551647772029642,0.5757034141573238,-0.44159377759833895,-0.04233500094123623,1.3638902352359807,0.6832574965958101,0.5344270216195052,0.9655523001686421,-0.11631308583669447,0.5751394876562754,0.18292517223837432,0.3561351216546371,0.44771259480792125,1.0537113147970445,-0.5798291452820257,-0.12952717035260392,-0.12187277898508346,-0.2824325703864852,-0.11924244174432566,0.01912511346789597,-0.3659527334562628,-0.1876608334913949,0.6406171634782467,-0.33250892344176963,0.07291947649204082,1.0343162469869605,-0.34515908145663066,-0.6387054588547757,-0.1805703686249229,0.9384568373637675,-0.14082474780518706,0.36738669547995007,0.3357845686449854,-0.2864149554124156,0.6398285094170174,0.9120173083144818,0.2934546142117621,-0.18534140771208252,1.069733927709517,-0.1304940155696385,0.9834512398704467,0.2886375714973321,-0.3890658112352073,0.3476920762258874,1.2774867198858422,-0.026312388028763734,0.45664474285392176,-0.13801621940862405,-0.021541348941604102,0.5019040531947762,1.0765248411320103,-0.08750812738082603,0.7743458671318435,-0.20215267468578432,-0.173347716229916,-0.14419720270279862,0.28784891743610275,1.1551764211958968,0.3028185012302761,0.08106297047681199,-0.27021415134413784,-0.21633360441872834],"xaxis":"x","y":[0.322184103037068,0.24241777920903415,-1.0847577887751416,-1.161836968267853,0.1888939366704743,0.27414548214841594,0.1684980220930505,-0.7973478229021614,0.3783950899109503,-0.8993368867049729,-0.9660193430028445,-1.1282824399311173,-0.934294012792386,-0.6835546926959866,-0.7711029688837643,0.5338427409388644,-0.6899364200339763,0.3697599368000072,-0.8725906860818264,-1.0503429415004373,0.30314748127343893,-0.8798712918368211,-0.7792053340976911,-0.9727986021530899,0.29633440810200345,0.03566827012324658,-0.7755831245952504,-1.051668420293042,-0.9184120679476384,0.09008861834988824,-0.6976436261645704,-0.9991110842138674,-0.9582783228510602,0.4010562939059431,-1.0453228797051655,0.3221479162869547,-0.7719632878217328,-0.8911668934486658,-0.970504244172177,-0.9338241074799037,0.10686469615379454,-1.0357841027193713,-1.1786154188006823,0.12547234481290087,-0.9115651807550127,-0.7529242933291806,-0.6831209741336176,-1.1097109780221244,-1.0230953942725416,-0.6840245980084688,-1.0045239323635486,-1.0244932465653727,-1.2067209122376235,0.23922454281111621,-0.8444899381027317,-0.8472108964592442,-0.07403511799692847,-0.7556861838936527,-0.9891095201023602,-1.1328325964139068,0.10414373779728192,-0.8096051855155452,0.5039104221045694,-1.113795974650278,-0.9338288529377499,-0.9129244735688076,-1.0834323099825371,-0.9260830873281194,-1.0494102490622423,-0.9550898319109885,-0.9809709681383201,-1.0852253213587006,-1.0258210980869005,0.29407623687120377,-1.0276455507553313,0.1834763430629468,-0.9061161458552183,-0.8367827319721374,0.24646896181599756,0.27052089991705214,-0.8671754652032222,-1.0077171687614666,0.17125516719967634,-0.9809685954093971,0.1599257515666415,-0.939702115484221,-1.0054542520728207,0.21248308764581605,-0.89073554761522,-0.8299672860717788,-0.832731549365174,-1.1264870558260305,-0.8068432949510731,-0.8517319843786899,0.5193633938447942,-0.990471185645078,-0.6106305106027321,-0.9020602177904087,-1.0335235587596485,-0.7361844022753876,0.19208480033946912,-0.06177300992569848,-1.082068271710896,-0.8925285589913836,0.05244909338499909,-0.9093070095242131,-0.8208984143984668,-0.9741555222379615,-1.0893103179868542,0.28411323223873297,-0.7447543000728736,-0.9678147271079314,-0.7025913144596156,-0.7171092210327222,-1.0376494875957616,-1.068444498096948,-0.8757815497508213,-1.0956558585747307,-0.7846543689974855,0.2795583302980972,-0.9505687439915429,-0.8413328884549269,0.40829596745297825,-0.9492408924700152,-0.8335894955742196,0.34803142524320946,-0.8599067230928431,-0.8544553154641255,-0.8952495173478963,-0.9464813746344662,-0.8530936499214077,-0.887542311217302,-0.6124258947078189,-0.839038530474014,-0.741597250425069,-0.702196155376283,-0.9537257936393476,-0.8947891029511065,-0.848107402147326,-0.9247528630776686,-0.9043231344790545,-0.8730582186653857,-1.0321618932169305,-0.7102961478612867,-0.7221316555569172,0.5669368548788103,0.34347652330257367,-0.8136539953935854,-1.0154196294342144,-0.8635241871374376,-0.7964851312352696,-0.9061499598764085,-0.8263498220271844,0.25689949903202747,0.13719691952926832,-0.7832879579969214,0.3026823214188029,0.1621839227974412,-0.8177413647506622,-0.9623609467502907,-0.09307173976055755,-0.9183758811975252,-0.8114343836418222,-0.8571810192784844,-0.9909025314785238,-0.7234571343495216,-1.0158557207255066,0.6326480592594506,-0.8272801417364565,-0.9569166573083424,0.3253749667060628,-0.9360508374184363],"yaxis":"y"},{"hovertemplate":"color=5
0=%{x}
1=%{y}","legendgroup":"5","marker":{"color":"#D62728","symbol":"circle"},"mode":"markers","name":"5","orientation":"v","showlegend":true,"type":"scatter","x":[-1.2212801896035088,-1.3959000832267867,-1.3561544624070507,-1.9161052179940903,-1.5589114879360357,-0.9540871573533849,-1.5757227549097377,-1.6376146082913834,-0.5874835366495461,-2.022738458842812,-1.9551087211569724,-0.9748808093530172,-1.8182719376628338,-1.1652124044273218,-1.420543932723814,-1.6942174997120911,-1.0077141564620862,-1.3083509987267032,-1.548270377016147,-1.3482753434793495,-1.7697263563256325,-1.0593218140125589,-0.6109535295172064,-0.9169713409973017,-1.0454399029464883,-1.8826614079795974,-1.443167907885508,-0.7553125168503305,-0.5110538384462405,-1.3616676191510642,-1.513606173967911,-0.7918178703009895,-0.7191175420840115,-1.3128116591295225,-1.06352892659867,-2.0043964201510276,-0.7332984718169555,-1.2105177183954468,-0.6195747661017614,-1.014494242644218,-0.9295754953848925,-0.6814666194834071,-1.1107967512573915,-1.6154683757294732,-1.7991412449098196,-0.8172503738592465,-0.7317677000988724,-1.605926297555154,-1.9547518060682567,-0.7562333584400949,-0.7818440531541568,-1.480905014387377,-1.2126589530189538,-1.4790633312078485,-1.8556981327032573,-1.067810863068579,-0.8638334445058514,-0.8470221775321495,-1.1589105936220794,-0.8762588749605313,-1.310849148438926,-0.8573069061404278,-0.7214369678633238,-2.1670974461759367,-1.6711044219331468,-2.091588589562395,-0.47686791077489377,-0.9202116083663783,-0.8017168635640247,-1.34748668941812,-1.558169370279182,-1.5438097166133276,-1.976944042257437,-1.4935551724022376,-0.991081613421295,-1.4445778520925228,-0.7430192739241853,-0.8129684373893376,-0.9372758903796832,-1.0457508144079337,-1.7626358914591602,-1.8532465193954097,-1.705469073537404,-1.0001345889783635,-1.1772526323138641,-1.5390386775261677,-1.604038610748355,-0.789855359610393,-1.2906194229403425,-1.2066675208980513,-1.8977631793023055,-1.0001345889783635,-1.2282498269589126,-0.9839911485548228,-1.2829184951684462,-0.9550079989431492,-1.4149842395754253,-1.6078888082457505,-0.6562588434853311,-1.6162570297907026,-1.0912343195318637,-1.2582746456714187,-1.260594071450731,-0.5819238435011571,-0.2409314502884856,-1.4904930961889664,-1.369978477051279,-1.8524578653341808,-1.316794044155453,-1.545519212264321,-1.7880683950174174,-1.9057744857585417,-1.0597995566123428,-1.9547518060682567,-1.9694218384184512,-1.5998775017895146,-1.7523051592236119,-0.6220263794096086,-0.7389903524938792,-2.0911568505898814,-1.399140350595863,-1.5541404488488761,-1.787279740956188,-1.2349833767366687,-1.1038844775467247,-1.047459777281822,-0.6137046942690323,-1.384291594312758,-1.8353362196761387,-1.0809501237006907,-1.1226582552110231,-0.7533034697553582,-0.5298849797552762,-1.4039113896830226,-1.5140379129404244,-0.8613352947936284,-1.5761544938822512,-1.5485807557004871,-1.7689377022644033,-0.9480957252324824,-1.8117453992974104,-0.7524291645699696,-1.332252730566877,-1.2530145039670084,-0.7885776029319129,-1.3163623051829394,-1.2447036460667935,-0.9293967714519819,-2.0151588913590897,-0.785826438180087,-0.9536554183808715,-1.377558044535002,-0.942714756017004,-1.086463280444704,-1.6640139570666745,-0.7257302643506994,-2.0378402301655205,-0.5548283806962823,-2.0788062440189994,-1.7603164656798478,-1.3156201875260858,-1.3955431681380708,-1.6409008792877302,-1.885901675348674,-0.9494483057947603,-1.4918456767512442,-1.1553134111642869,-0.882560685765774,-1.3351360828472378,-1.2582746456714187,-0.979962227124517,-1.6747764282747366,-0.826182521905247,-1.754624585002924,-1.5239369062034596,-1.5438097166133276,-1.1883254822062665,-0.5577690966213802,-1.4058739003736194,-2.038271969138034,-0.983858961026288,-1.7037595778864105,-0.577809270946692,-1.37413958601012,-1.4771008205172518,-1.4539877427383074,-1.909014753127618,-1.057048391860517,-1.2038589925014882,-1.6342421533937717,-0.5997019556918936,-1.1132483645652387,-1.5495015972902513,-1.2917184556859118,-1.9161052179940903,-1.1111536663461072,-1.5159255997472232,-1.1963367886625027,-0.7180185093384419,-0.6530185761162546,-1.3966422008836403,-0.5230940663327828,-0.5652913004603657,-0.927123882077045,-1.3394753829618837,-1.1186293337807172,-1.5589114879360357,-1.0253140774970175,-1.7991412449098196,-1.2472017957790165,-1.0950845170292594,-1.6516633504957923,-1.476743905428536,-1.5291396842631326,-0.6443973395316994,-1.2023282207834052,-1.533478984377779,-1.0838334759810517,-1.1098872696850939,-1.3148315334648564,-0.4708304750267208,-1.2132688831472727,-1.643784231568091,-0.8616462062550737,-0.6897026534998242,-1.3823290836221613,-0.5665690571388458,-1.9117659178794442,-0.7833748248722399,-2.1213603932352982,-1.6003666044067653,-0.6795041087928104,-0.35001630444505477,-1.5625834942776258,-1.8627885975697294,-1.2835289580738705,-1.930107956571229,-1.8962324075842223,-1.2598054173895017,-0.8454914058140666,-1.2265403313079193,-0.7891988930776985,-0.978299267877899,-1.3704215760412592,-0.4039428549977347,-1.8023815122788962,-0.7115379746002887,-2.1288825970742837,-1.030085116584177,-0.9970730455421974,-1.6672542244357513,-1.1792151430044606,-1.7976104731917366,-1.4063630029908702,-1.5787842983459037,-1.9618422709347287,-1.282965031572822,-1.6322796427031752,-1.5276089125450498,-0.3720763531057002,-0.4736276434058172,-1.5787842983459037,-1.0083246193675104,-1.1650342132715166,-0.8351606735785179,-1.1986562144418151,-1.8977631793023055,-1.7427630810492925,-2.063704472696291,-0.7300582044478788,-0.6799818513925945,-1.2237318029113562,-0.9223063065855099,-0.8523571431203574,-1.020053935792607,-1.121259671021475,-1.6445728856293202,-1.364165768863287,-0.8487316731831431,-0.7285274327297959,-1.2066675208980513,-0.7982984050391428],"xaxis":"x","y":[0.32677281899889393,-0.7025575004384256,-0.758773232770154,-0.5565738801671559,-0.5887643702322507,0.2932159179332352,-0.6322913941171495,0.6622237784894494,0.3743486527618331,-0.5284683867302149,-0.6458813537099073,0.39384806165117503,-0.6612957659710957,-0.6785346309007149,-0.6399962275188207,-0.6091674029964438,-0.6123511484786692,-0.5928493668604042,0.37165439023974134,-0.6096325628510798,-0.6408951059358257,0.46773400474596855,-0.7737562991978966,-0.756507943352585,0.4006658802804568,-0.5425187607197623,0.3793663418281817,0.26736622299817064,0.33355207814913923,-0.5787966201419337,-0.5697277484686216,0.3249459936015401,-0.7098333607355739,0.3612238530237114,-0.7451856459063194,-0.5207588078706975,-0.7887031788755259,-0.6975712526643439,-0.7773737632424911,0.2678337555817297,0.4128846834148041,0.5171414093641078,0.3367381963602878,-0.576075661785421,-0.5438804262624801,0.27780150567204676,-0.8245206239009074,-0.6449824752929023,0.5289674261440458,0.3398905005502463,-0.809103838910796,0.6187015000623967,0.33039028304348833,0.47365294495824534,-0.5311917178156506,0.2818865023002003,-0.8435596183934596,-0.8000325945085608,-0.7488054826798369,0.39883193669633354,-0.7397366110065249,0.443248348082545,-0.7837216765592905,0.5126541354658524,-0.6359112308906671,0.5443818384052341,0.20208399172205319,-0.757871981624226,-0.7809959727449317,-0.4999268020019816,-0.7342875761067305,-0.5824188296443743,0.48318697648619335,0.504014236897063,-0.6418230529161745,-0.5407281220725217,-0.7927952936904488,-0.749270642534473,0.336742941818134,0.5098969903592265,-0.6014601968658496,-0.6395334403931078,-0.5774420727859852,0.4197025020440859,-0.7565150615393543,-0.616872236398115,0.4940488595356691,-0.7760144704286963,0.4070043026815638,-0.6595003818660089,-0.5488643013076386,0.4197025020440859,-0.6685739989971671,-0.6023881438461985,-0.5457048789309109,0.36574019548531084,-0.5647438734234631,0.4559779887373341,-0.7927929209615256,-0.6857814226345194,-0.6109894829359515,-0.6082661518505157,-0.6821544676742324,0.4496010068571907,0.4105903254338912,-0.596471576362845,0.3372057289438469,-0.5298276795440096,0.5053830206265503,-0.619600312941397,-0.648604684795343,-0.515774932825539,0.24879713381810065,0.5289674261440458,-0.5425211334486855,0.42288862025523444,-0.5606612495242327,-0.6690320406650339,-0.6817254945697097,-0.5207611805996206,-0.7039215387100665,-0.6232177769859912,-0.5388989239462447,0.4668398717868098,-0.725676746101285,-0.5561354161469407,0.2174984039832416,0.4405659492050688,0.43331915747126437,-0.8254195023179125,0.3317566940440524,-0.5783652743084878,-0.6667762421631572,-0.6694681319563258,0.49541527053623324,-0.696672374247339,0.43285162488770523,-0.5479654228906337,-0.5311893450867274,-0.696674746976262,0.625512200504909,-0.9061185185841414,-0.6758112998152791,0.3498991828485227,0.3263100318731811,-0.5597599983783046,-0.5661031662372578,0.4858836117372083,0.5035852637925403,-0.6649446713079571,-0.7719271010716195,-0.6948479215789082,-0.6944213212033086,-0.6454428896896921,-0.5964763218206911,-0.530331398877682,-0.5348139273180912,0.2786980113601286,0.4768390631693939,-0.527571881042133,-0.7052832042527843,0.4722912794155275,-0.6232201497149144,-0.5438827989914032,0.4409925495806684,0.5411957201940856,0.42740733544575693,0.4691027884754557,0.49767344176703293,-0.6082661518505157,-0.49131834472545927,0.42786774984254666,0.38341515170622203,-0.6345495653479493,-0.6105266958102387,-0.5824188296443743,-0.6517908030064915,-0.6055790075151933,0.43149233207391047,0.5303290916867636,-0.7846181822473723,-0.5402605894889626,0.12321180085317804,0.4083659682242816,-0.6273075190719911,-0.6540513469662144,-0.51713897109718,-0.7424575693630375,0.40700667541048685,0.48135777835991633,-0.8054816294083553,0.445079918937745,-0.47544114533855797,-0.6223212712979095,-0.5565738801671559,-0.8381105834936652,-0.6436160642923383,-0.6187014345243919,0.3194922132438993,-0.7914288826898846,-0.5570342945639457,0.25557164751049977,0.4201291024196855,0.30454296083734694,-0.5330161704840812,0.4428264931647916,-0.5887643702322507,-0.7655839332126664,-0.5438804262624801,-0.7129904103833785,-0.6490603537342865,0.40112392194832347,0.547541260781962,0.48906972994835685,-0.7878114186452903,0.3711892303851053,-0.5416198823027574,0.3480652392643996,-0.509467951716699,-0.5955774434036862,0.4962732167452787,0.2936834505167943,0.5502645918673976,-0.5874412641685691,-0.8068480404089193,-0.6603945148251676,-0.6821953998821918,0.4741157320839582,-0.7732863938854144,-0.5334522617753733,-0.5697301211975447,-0.5838190546661285,0.5470375414482895,0.47501461050096316,-0.5706266268856266,0.4464392117515398,0.4664061532244408,-0.5846817463330203,-0.5724487068251343,-0.8358500395339423,-0.6313925157001447,-0.4840786711784243,-0.7093658281520148,0.6286668774237905,0.524383455640066,-0.545244464534121,0.32222028978718126,0.49225584815950546,-0.7311305264589258,0.3480676119933227,-0.5978403600923321,0.34444540249088207,-0.5796978712878618,-0.5611264093788687,-0.5606565040663865,0.4895325170740697,-0.8009338456544889,-0.61960268567032,0.45325228492297526,0.31902705338926335,0.20344802999369416,-0.5606565040663865,0.37979294220378135,0.42331522063083404,-0.7950510921923254,-0.6925897503481084,-0.5488643013076386,-0.6295680630317139,0.4831846037572703,-0.787339140603885,-0.8027559255939964,0.4351145415763511,0.5253185208071843,0.4817938696512085,0.19258140148637215,0.4781692874198447,0.4405588310182994,-0.7256838642880543,-0.8372140778055832,-0.8231565856292664,-0.6595003818660089,0.3222179170582582],"yaxis":"y"},{"hovertemplate":"color=0
0=%{x}
1=%{y}","legendgroup":"0","marker":{"color":"#9467BD","symbol":"circle"},"mode":"markers","name":"0","orientation":"v","showlegend":true,"type":"scatter","x":[5.885373660378473,2.2812652717945316,2.8939975415614114,4.1628572441303495,4.915833395898783,3.246466236159576,6.141194291292216,3.161058386283,7.506218778281603,4.842436953652221,5.008763449614345,2.6976235068518477,2.5548066512542738,4.478952772806391,7.54469217908705],"xaxis":"x","y":[-0.3043986707378795,4.119509196190614,1.6265584654836438,2.050352764786488,-0.12848035890339193,2.9129012721050125,0.6496816673330058,1.7752316028191588,4.4475894019328965,2.3359020912409245,-0.016518799552416863,2.4919234623738142,4.270910410069411,3.2120453036100525,0.028261329624860165],"yaxis":"y"},{"hovertemplate":"color=2
0=%{x}
1=%{y}","legendgroup":"2","marker":{"color":"#8C564B","symbol":"circle"},"mode":"markers","name":"2","orientation":"v","showlegend":true,"type":"scatter","x":[0.037127953218813126,1.242736865713447,0.19239242652889585,1.5115066733089244,2.0331965761670405,2.1808418344965115,2.6885755351818648,1.3390393743266205,0.5504208142754502,1.8901039854949295,1.4567454650677447,0.25853792890102845,0.3968589477088743,0.4681324042568823,1.1073100264263236,1.2738147135442521,2.017185323272035,2.1865337151734354,2.74758403628315,2.33738459726218,1.0727206472618853,0.029248834291111886,1.1016929696331974,0.822948812113782,1.52424301522505,1.1368922789259543,0.549154417614437,0.42553171863620776,0.7998822707392133,2.656587673001657,0.9926194754940949,0.8078470407910738,1.6636635995555706,1.3604429564545715,1.0450152543286917,0.041421249706188976,1.0414640754981697,1.6507604265011064,0.4659338059886381,1.0034279503294274,2.0964473662413456,1.4459483502498793,1.709015449928071,2.0982425130164986,0.8962704304765458,1.691651616470787,1.4050175127833093,0.945305114430998,2.4535945598950244,1.4851652209554753,0.2925451326394647,1.8966707041343474,0.29578540000854125,0.45634519140994306,0.3222709326850972],"xaxis":"x","y":[1.6656800798862066,1.5160380633623831,1.2205162413597836,2.730743607204065,1.2648626519746915,1.509184057982988,1.321512102868789,1.4471336225838247,2.5821114020765097,2.6346278059477246,1.314303870614021,1.3941496861290505,1.0876888621189025,2.401717679988382,2.451546939524275,1.200975900262482,2.1047232594638023,1.4022063736771717,1.2004816718445022,1.1374937985492979,1.15293727937383,1.5165394099671323,0.31853282497128343,1.2667280368510818,1.3791209420355024,1.6538493176484224,2.253468770299544,1.136197388320037,1.548700831468883,3.5116313372548214,1.228661911510593,1.2603824962632053,1.073134768795683,1.383208311392579,1.287133442344198,1.4122898022045978,1.3950005141513269,2.0965894529576086,1.3719174552385804,1.4883977297800777,1.8382989678013595,1.8282499228694473,1.3474003572828899,1.4380214459736302,1.042337385565573,3.324928261328931,2.3214500095555994,2.0553567870536225,1.5508795110126867,2.5009543441424142,1.1896826713795603,1.17104595415711,1.1910467096512014,1.1855953020224839,0.9834368816274452],"yaxis":"y"},{"hovertemplate":"color=4
0=%{x}
1=%{y}","legendgroup":"4","marker":{"color":"#E377C2","symbol":"circle"},"mode":"markers","name":"4","orientation":"v","showlegend":true,"type":"scatter","x":[-1.4086250651254453,-0.33747561392379527,-0.6477124307845739,-0.20191658710813662,-0.4080926039391087,-0.32024450077215194,-1.3864328289362648,-0.12286844445864548,-0.7687909764233098,-1.8776548140918954,-1.7035240230858681,-0.4509463045993862,-1.9957178199217354,-1.5666872395917295,-0.22471928620274106,-0.824772577698232,-0.574643827461413,-1.2576073518983628,-0.3817392587910875,0.0036376067999444595,-0.1077553131184704,-0.3367448562844082,-0.4645173042040114,-1.011207971647871,-0.594694829027086,-0.5138050031980664,-0.6051577487911698,-1.831917761151257,-1.3891839936880908,-0.9267209633610591,-1.8394399649902424,-0.3920699910266362,-0.048758172034652325,0.19673172664354194,-1.3637514901298342,-1.2887317361335435,-0.5038713663252281,-0.7988623315401913,-1.4481924947893758,-0.381572427652749,-1.4854865023012647,-0.7559972708624472,-0.7515831468640032,-1.6804109453069236,-2.1778599173839988,0.4434766619652827,-0.2164084283025261,-2.0259213625671517,-0.8799308813021214,-1.9735255837325552,-1.9504125059536106,-0.642273565147253,-0.7813089469096358,-1.2708214364142723,-1.1622256848749535,-0.8171930102145095,-1.0179875250528978,-0.9984256261044752,-1.1537252758014667,-1.4067373783186465,-1.048933718132273,-0.4966833575400246,-1.0332680203085165,-0.6143894482811487,-1.1131910009205015,-1.7427057174045553,-2.003729126377972,-0.5112960262454821,-0.28512637149357406,-1.2005727215051414,0.06356694949099358,-0.7111810595115728,-0.21206912818788004,-1.1551352200084817,-0.8559831458346775,-1.2774801623082308,0.06776270205963797,-0.5606410888842743,-1.6875014101733956,-1.0121288132376354,-1.5355628553565488,-0.39189126709372585,-0.6367604084032397,-1.7469990138919314,-0.24937449571723536,-1.7781120381096451],"xaxis":"x","y":[1.4227470352550484,2.3913185840646194,1.4508163419418765,1.2735796695015535,1.369225565445412,1.624871641628897,1.4685274849129009,1.4526093533180402,1.7645120940412133,2.5826394445156797,2.6193510225002203,1.2418472211043254,1.5406204166315307,2.603936610239032,2.219943310526152,1.3035096156069255,2.364567637983627,1.4862024411338122,1.3438457758228295,1.3963959937152348,2.232636764430828,1.4721135076652283,1.1996842354910677,1.553277683786093,1.2908256526179422,1.3248067813302775,1.432256743677499,1.536533047274454,2.4597821880940396,2.7634716306240223,2.5622411572093333,1.3030468284812124,1.3379244628816296,2.2512058536108976,2.5069266760235327,1.5460356375101352,2.9411467670845606,1.5695909744642866,2.580812619118326,1.672013756829467,2.528686628872597,2.4706511893302845,1.2613490027225907,2.592607194605997,1.53699820712909,2.7194480055922208,1.3039409614403712,1.527929335455778,1.4626109174295472,1.5864008662893831,1.5596570383951598,2.481980604963319,1.4675947924747057,2.6188882353745075,1.4898222779073296,2.3355632661296806,1.4046116646373474,1.4857349085502531,2.4493516508780093,2.56177837008362,2.56629471254522,2.287953618345551,1.325267195727067,2.4207833703153554,2.502841679395379,1.42819369742592,1.5737097851136304,3.2742268192104538,2.1945611481746465,1.6924506036148506,1.2028412851388721,1.497069069641134,2.334630573691485,1.5292571869773057,2.8296527403171448,1.5143103072996764,1.642079065266249,1.3415876045920299,2.553172285536021,1.625801961338169,2.5441034138627088,1.3760457568036166,2.302003992335099,1.6815839751075286,1.5088227129208454,2.515099042008763],"yaxis":"y"}],"layout":{"height":600,"legend":{"title":{"text":"color"},"tracegroupgap":0},"margin":{"t":60},"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"width":1200,"xaxis":{"anchor":"y","domain":[0,1],"title":{"text":"0"}},"yaxis":{"anchor":"x","domain":[0,1],"title":{"text":"1"}}}}},"metadata":{},"output_type":"display_data"}],"source":["# plot with clusters as categories\n","fig = px.scatter(\n"," pca, \n"," x=0, \n"," y=1,\n"," color=cus_data['cluster'].astype(str),\n"," template='simple_white',\n"," width=1200,\n"," height=600\n"," )\n","fig.update_traces(mode='markers')\n","fig.show()\n"]},{"cell_type":"code","execution_count":30,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"hovertemplate":"color=1
0=%{x}
1=%{y}
2=%{z}","legendgroup":"1","marker":{"color":"#1F77B4","symbol":"circle"},"mode":"markers","name":"1","scene":"scene","showlegend":true,"type":"scatter3d","x":[-0.22367708432480332,-0.04674912493968003,0.2419802097440349,0.8452624085911358,-1.0847537847937105,0.06863807279923723,0.6098036907045115,1.0477204154532473,-0.6759529299622884,0.43983400865732525,-0.565601679144706,1.2483827427631007,0.7281776079957971,-0.5073818321046504,0.2886841079017078,0.018382995811042302,0.10068276584707689,1.141128211768593,0.6499924105142276,-0.1387583370654777,0.4963908964507629,-0.0903909468840815,0.145856425063772,-0.3059308507335676,0.02333275883111241,1.1050194209035387,-0.8458766083822045,-0.9284759298622176,-0.19628207007594992,0.3048389083427151,1.1486617756250455,-0.38717759165130317,0.46776412915069965,0.1034339305989028,-0.20026445510188018,0.9788589247161976,0.13131804746500692,-0.53911614646815,0.7438898422239293,-0.5518984920115457,0.6872864180261161,-0.22135765854549094,0.5206030069752768,0.1520255155633745,0.41116123772999175,-0.13924743968272837,-0.3688355529595183,-0.5758002238517196,-0.9408265364331,-0.4107224084027611,0.2570819810667431,0.8267535387610121,-0.014392987653289613,0.26527147867878464,0.4153223466888326,-0.6588312843042465,0.675603638005395,-0.38485816587199073,0.23335897315947995,-0.7141677790639411,-0.6480688130961842,-0.2927167662176582,0.22167566036165354,0.24675124883119454,-0.7109275116948646,1.0238186836130734,-0.9058519547005239,-0.6942949686540734,1.3360526547742522,-0.15495914113375536,1.023997407545984,0.24351098146211797,0.5381563916058323,-0.5026107930174908,-0.03121561464445821,-0.3888870873022967,-0.23194140582064277,0.03305302816123701,0.4417216954641241,-0.35220300991872694,0.5219555875375546,0.529092056031297,0.7972059298711851,1.1176695789183995,-0.8151091392357394,-0.43743266863949803,-0.5295740682938306,0.034583799879320004,1.0246073376743028,-0.6560801195524206,1.2455742143665378,0.37973783482793777,0.32288139559052137,1.121519776415795,-0.016591585921533925,1.2878179848984963,-0.4914914067207127,0.8976695474431993,0.03305302816123701,0.8090214301975464,-0.0557272766129509,-0.736791754225635,-0.2552905711772348,0.8589655957242958,0.463125277592075,-0.022151279069922925,0.9489662935322266,1.0699586552696978,-0.15215061273719238,-0.07791951280213115,-0.4210531406383098,1.8055715063579527,-0.5446758396165389,-0.3353917429450253,0.08868907436491036,-0.5687097589852477,-0.018911011700846303,-0.35868354465688024,0.9650349100719694,0.31534783173406905,0.23120637851850592,-0.35049351426773356,0.14164877970055556,-0.48658818010501825,0.07340911188639687,0.33893865211279744,-0.3682256228311995,0.5838934445464707,-0.1509302197034496,-0.1575894783745133,-0.6307798035226987,0.4583542385049153,-0.7244985112994898,-0.707687244325788,-0.3885301722135809,-0.4449548724784837,-0.20289479234263802,-0.6409783482297123,-0.24232950170092846,-0.2945470893797199,1.2988908347908985,0.013790680656793175,-0.11503532915821443,0.18450248036083305],"y":[0.16265620083884652,0.49219296557497133,-0.8163702082922518,-0.6722543456262956,-0.6082614063926695,-0.743376025427694,-0.6618238084102658,-0.9882011507696628,-0.6916861264732573,-0.7696956256752407,-0.4994907107106895,0.1249804891238441,0.2709641093951136,-0.7302269025840746,-0.6509209931528305,-0.8009581687599866,0.15311742385305224,-0.6573027204908201,-1.0095006892219378,0.3077071286719209,-0.7823843341220703,-0.7737420628243579,-0.6744668391912896,0.4926604981585304,-0.7624126471913231,-1.146413065090972,0.4845219461944904,0.41335933418513265,-0.8911597752618965,-0.8993297685182036,-0.9093289599007877,-0.7161694104077578,0.45318702960951807,-0.838137279328086,-0.7470006076590577,-0.6890327961591249,-0.8993345139760498,-0.7071005387344458,-0.7148344406994607,-0.6395577634986055,-0.9573746989762091,0.23654451666256313,0.2201974119631796,0.46634327063990677,-0.818204151876375,-0.6849116127808582,-0.7084598315482404,-0.7225196964534804,-0.5842409095838819,0.3757174364913203,-0.8100246677043754,-1.0081319054924505,0.250604381567803,0.2587358153450737,-0.8893643911568097,0.2714607105420166,-0.8893572729700404,-0.6422810945840411,-0.8199876723368463,-0.6712878391669104,-0.7528833611212211,-0.6400252960821646,0.2768806768784672,-0.8508236150459925,-0.6699238008952694,-1.0711630837245378,-0.6060032351618698,-0.6993957053327746,-0.7212232862242197,-0.7279639858954287,-0.9981641554021335,-0.8521876533176335,0.11820122997359878,-0.7646803093378152,-0.5666045128420071,-0.7533508937047804,1.333887516648205,0.2705303908327446,0.3693357091533307,-0.7379317359857457,-0.9174698845937508,0.4060449144089479,0.2999637357912135,-1.0317258019256386,-0.7501600300357856,-0.7737515537400503,-0.776007352241927,0.23471294580736304,-0.9614573228754395,-0.7197939926391216,-0.9415265681526517,-0.9043088981055158,-0.008707209055005313,-0.9936549311273035,-0.7791958431819986,-0.8508550563382595,-0.6141756011471001,0.15989905573222066,0.2705303908327446,-0.9791346518252738,-0.6862732783235761,0.348074730180092,-0.7701293442376097,-0.8123213984142116,0.30541039796208486,-0.8544481972773562,-0.8109549874136475,0.3416591888209123,0.3385430713810671,-0.7320537279814284,0.33491848914970335,-0.8884969540320717,-0.7823528928298034,-0.6944047121008468,0.3303659599379906,-0.6830847873835044,-0.8530841590057152,-0.7406598125290276,0.4069461655548759,0.24331903035496222,-0.5657080071539253,-0.7007502526887232,-0.8585355666344329,-0.8308590463020145,-0.7778294321814346,0.43551207338860687,-0.6717529990215464,-0.927905167267627,-0.6168941867746894,-0.6926211916403755,-0.49041946630845434,0.3398638047158255,-0.7120867865085274,-0.6685597626236284,0.4214978861491726,0.25195655619482843,-0.7116578134040046,-0.7134484520512452,-0.7646731911510459,0.2787051295468979,-0.9555793148711222,-0.6935058336838418,0.3176701333043917,-0.7311572222933466],"z":[-1.0967083335245118,-0.42064847455708476,-1.3620323138963522,-0.47835160790793607,-0.8551119732864125,-1.7354233595295698,-0.1966467151799538,-1.4764234916731052,-0.763425820381177,-0.782076556250326,-0.6164300795551212,-1.2981202719562874,-1.2945533642847389,-0.5238115135587289,-0.9791128958364198,-0.7825639375811464,-0.5996376751845998,-0.7105846555532405,-0.8813839058294782,-0.8406717764290254,-1.1819869782606565,-1.7074841887304792,-2.3781513366200997,-0.7344705490035496,-1.7725272433415782,-1.068199397394474,-0.8036916145340407,-1.0295181656638421,-0.6703198730539643,-1.20899373596859,-1.5236245015891883,-1.1596456128029358,-0.24238659275716343,-0.4531706536062605,-1.1930588670263722,-0.3972499624375959,-0.4586447370306066,-0.967719697227391,-2.289668431972616,-0.9498776525323755,-0.6926612385116852,-1.066498327558827,-1.0183225549811028,-0.15629824519329763,-0.3876402176643415,-0.40880923253413204,-1.4326731738488203,-0.42166457513562183,-0.8954191053561722,-1.1366518061804747,-1.3496643526256826,-1.9171284270840157,-2.0775069262720254,-0.8827623623345593,-0.9886412682631346,-0.7637481418780776,-2.1141647666701093,-1.1294356068372509,-1.9451913198001298,-0.6365429594167311,-0.7688999038055231,-0.6360555780859107,-1.6244340295904451,-1.2282555750855826,-0.9219384817332852,-0.9482104142763512,-0.736906444004064,-0.49039825933529235,-0.8956166932824619,-1.1559549832143639,-2.0719504588475517,-0.9428600527690287,-0.902387860865349,-0.39003477474795956,-0.292023497673761,-0.4550778293590582,-2.1850866102025823,-0.8864529919231312,-0.8681235658972953,-1.0011329514508276,-1.2176710676506874,-0.5085202759567247,-0.6619225132982837,-1.1593981689688888,-0.5893419495006479,-0.20678619085451244,-0.7001662196058525,-0.46728073079580784,-1.3371726694379897,-0.6172811202997384,-0.896467734027079,-1.8819317190248053,-1.5249215857477294,-0.7100159018758804,-0.9410765989332545,-1.697708372469717,-0.9004058074496978,-1.3705445857445298,-0.8864529919231312,-0.9093230766285687,-0.49858820968656953,-0.9291546810765091,-0.3739761838887182,-0.8117991808851904,-0.30280660468853327,-0.6858910825823854,-1.4723692026707365,-0.7549047387084727,-1.5576075211435723,-0.6749429157336932,-1.0152430286403749,-1.80484201298635,-0.712534180876522,-1.6933327736240356,-0.9707578856512227,-0.2576778303591675,-0.9712866048989395,-0.43034190681771933,-1.2304427227647974,-0.7118817397117818,-0.26359694554385016,-1.705700734894705,-0.5800535145707064,-0.6932723417595292,-1.6016466207188003,-0.18971149941673415,-0.697895384439258,-0.7490269614406864,-1.8303127606925567,-0.13578167148824732,-0.7996786634485682,-0.43658334349930256,-0.5151341818766313,-1.2073340040498395,-0.9602971001333509,-0.4870299512436211,-0.17288555530025565,-0.6049131590290688,-1.5155582731549346,-1.0981281279464892,-1.0109826337208554,-2.040080720963117,-0.24514480925457827,-0.6465163636037825]},{"hovertemplate":"color=3
0=%{x}
1=%{y}
2=%{z}","legendgroup":"3","marker":{"color":"#FF7F0E","symbol":"circle"},"mode":"markers","name":"3","scene":"scene","showlegend":true,"type":"scatter3d","x":[3.133346637219425,2.102610633387672,3.180107899021835,1.6327927631370982,2.0311306982044366,2.4932481734602194,2.6176135228724076,1.8716699395486043,3.0035141346904943,1.721573067911286,1.7602196559854522,2.591438368880192,2.4291577218103297,2.7666108289870515,1.5795221463400075,2.6912806963064204,3.8361716120487754,1.3180209947668076,2.7551924240233996,3.4179608665715695,2.22574422974865,1.6264909523318556,1.457131200412988,2.289523769937095,1.403946767517162,4.440242464957106,2.227718100456714,4.446855187223794,2.053668489464866,2.8486002203387457,2.1139082108402554,1.4418507051573692,2.3220467383618235,2.7255126276050374,2.9252942935991206,1.8577999212771057,1.9435816137043531,4.118466415621608,1.5793899588114726,1.3566675828409738,3.3984449712504174,2.1719498667245056,3.418795524260069,1.9244974573557145,3.0808646744835637,1.327873984402572,1.547563104416327,1.3511192497100515,2.7304163869978373,1.3974662327790086,1.4779248524126203,4.534582462879683,2.5074291031931635,2.0443907863476163,1.805881885042293,2.5462538824231356,1.6944776051064112,1.6413278158203886,3.369904387851619,1.6640953385280841,3.826019603746138,1.5118924086541674,2.2978806314645803,1.8106415641119855,2.7817699639544964,3.722540446365228,1.5079496711251261,1.5578938366518758,1.5231439824794806,1.7625850853920348,2.0346813442578533,1.6140189854727995,1.8936839845819793,2.401452328877136,2.6424355635252406,1.9194734032289518,2.299636130742844,2.060292571749021,3.1173705607113282,2.709490014692565,3.244808280800044,1.8250868689019994,3.52775955090557,4.322369010300537,4.682446092638953,1.9765476811190623,2.613976160140621,2.273069950829214,2.301253086362191,1.3494449304459668,1.3146025362419256,1.4902754589835026,1.9189377642073255,3.5700316089169513,1.6280217240499384,2.0488628067679024],"y":[-1.09619101920067,-1.055360630566786,1.1270199563963852,-1.0340249053643977,-0.9760185343854286,-1.073496001184487,-1.1305987482886048,0.05875844722276219,0.42496823046439103,-0.07722123620807703,-1.1627625425192787,-0.0033691071344736923,-0.8087810533276898,-0.9950937156280941,0.26410773128679554,-0.9538224902450718,-1.019615559041631,0.19068694804663805,-1.2915363664242732,-1.0495140638547358,-0.9307079900400586,-0.9637540535852755,-1.0349190383235565,-1.086191827818086,-1.2030963300062596,-0.7657939355265765,-1.2579865835453838,-0.9452958973844683,-0.5290711753985347,-0.9606379361454304,0.19699392915547803,-1.114263507233837,-0.9996124308186166,0.19878931326056493,-1.3658945875604718,-0.12934248099595957,-1.08572666796345,-1.0468269195194133,0.44633776968796945,-0.8948543582645636,0.15344258216508144,-1.1355921142494558,0.34427158692708515,-0.9479130409484875,0.3116473782996215,0.012549024460387082,-1.0698447231187025,-0.19642484183501005,-1.0467450551034945,-1.2058244065495416,-1.1355511820414963,0.2662620877251016,-0.994626183044535,-0.824624438693401,0.031122859098303313,-0.9783176378241879,0.09368175928898503,0.4359024870140932,-0.07729598243722657,0.007991749790828173,-0.9874155780608439,0.38152069826648793,-0.7181142869711439,-0.7770124181803486,1.069013585417416,0.5083638819816347,-1.195859029188148,-1.0290457757770854,0.34979536805602923,0.19520566323716054,-0.055034682983412686,0.023408534780939738,-0.9973109546509342,-0.6745848903573218,-0.09131016967666084,0.2246823131325119,0.6031470862586014,0.06510873326848476,-0.7747833155128927,0.26496805022476416,0.8990118410662822,-1.0626026768427441,1.1637362798387718,0.06771875864573451,-1.1379564730016722,-1.2906084194439242,0.4435782518524205,-0.9837209950581767,-0.8989802871006767,-0.7520592289333659,-0.9125269417565518,-0.13795093827248184,-1.023165395043845,-1.2408129739292217,-0.9995714986106572,-1.0050157880526054],"z":[0.28153326979403587,0.6295772896380707,0.11633312834642051,-0.24635849775940477,-0.10662029419346913,-0.12944904098201038,-1.3662841908250103,-0.19493813900703305,1.1216212114548134,-0.6342232799959665,-0.6448491253477582,-0.32311707247643284,1.0835012270642679,0.5123465230173632,0.41332044885188024,-0.6732333279071849,0.7721974316184448,0.06928836843973046,-0.7624435513822625,0.48631452797107017,0.758730985769111,-0.7993074976974976,-0.6499595493583074,0.5961640354146341,-0.46208792278513133,1.2669158824452225,0.20087665608403243,0.7694815646915135,0.657798747504418,0.003395284737601867,0.7377270307332404,0.46141253394222403,0.651109963921658,0.41940563552407023,-0.10365698343249113,-1.5732949462517427,0.6575164604371609,0.9467686838297942,0.3399637219724808,0.058662523087938845,-0.16504944288466128,0.21182482293272456,0.6425163197269403,0.12240950519408378,0.5522499612436824,-0.7135414716305324,0.5479882628369102,-0.7794355669862483,-1.1157217171538703,0.1087031218479767,-0.8194203775591076,0.6238655838577917,0.19852444857089813,0.5369587236416783,-1.1129645123100427,0.8064193770160146,-1.017711451733259,0.8086078281824819,0.3027436225807227,0.081292670296603,-0.23013383541265608,0.1265051321133488,1.0326095875596129,0.11409583292578312,-0.023405075219515292,0.1853077616964518,0.32905558955343206,0.42657948529681033,-0.3105091737089899,-0.06947507246456452,0.29986168416628417,-0.08958795232617459,-0.6371042067568176,-0.034764734082586846,-0.4678419781358944,-1.2513642938005405,0.8732058510332441,-0.9329191766743472,-0.6123259346449946,0.7226432025356399,-0.36183935029029557,0.5887827762374904,-0.6495870801199838,0.8396763812300577,0.5611333988429309,-0.26456420186821716,0.4413019692214546,-0.9591162315545594,0.8205707921224582,-0.17868094856791483,-0.2638368830406235,-0.9535194378667774,0.37759502154495284,0.36774533927492503,-0.38013523657017406,-1.114425644648916]},{"hovertemplate":"color=6
0=%{x}
1=%{y}
2=%{z}","legendgroup":"6","marker":{"color":"#2CA02C","symbol":"circle"},"mode":"markers","name":"6","scene":"scene","showlegend":true,"type":"scatter3d","x":[0.15600790058930478,-0.12059502230660343,0.47091185648813033,0.8948144826422606,0.7931770084408791,-0.04508616569306216,0.9181522879813859,-0.23327705892096512,-0.05725858110813922,0.044557617026152796,1.1873078309221063,0.5408610199532826,1.1760562570967936,-0.3962884636302142,1.0438583251612799,0.7465077538930098,0.45615564023667104,0.7898045535432676,0.10820496968606244,1.24692626215171,0.11070258662118003,0.6114666499511293,-0.36363330767695046,0.477081479764838,0.3547825410923594,1.0358583787225102,-0.18149121021468712,0.462900550031894,0.7800377478087673,0.3845083411379919,0.5245740319837403,1.1085587069394887,0.16458313354658952,0.2569492607611029,0.4780023213546023,1.0235537757788982,-0.08610954319127795,-0.4565633613925123,-0.21156256533156875,1.0036349617417601,0.1641513945740759,0.15364247118272206,1.0284109987673224,-0.31214701041465115,-0.41834851229085956,0.04595620121570092,0.29883611620434586,0.9321084901541491,0.09708558338928447,-0.22386716827518066,0.488333053590151,1.0481516216486555,1.1350442396160445,0.21886659918798512,-0.1719491320403678,0.08185162453804132,1.121830155100135,0.9937819721059953,0.3514962700960124,1.1373636653953567,0.41795215115248513,0.4316439782681784,1.282603314044251,1.1826689793634817,0.8301141008640518,-0.24806791878222795,1.2549375686079463,-0.019089735633756766,0.6418023801250807,-0.3483993488257073,0.891442027744649,0.7300935822820179,0.1773654790899854,0.17588071099917268,0.6935882288313587,-0.0005695057861666887,-0.6656687341311155,-0.24036752378743706,0.5831507941125117,-0.3139886935941796,0.8151910534742541,0.8277946750847394,-0.2031943437866167,0.9782024581835032,-0.3169180495018108,0.7293514646251642,1.1802173660556343,0.3287401074057837,0.15180078800319358,-0.3976870478197623,0.46337829263167796,1.1524654367180651,-0.5161817926221159,-0.4494728965260403,0.36498108579937305,0.43501643316579,1.2522215802430292,0.21159794316570787,0.41930473171476285,0.6931451298413784,0.3669549565074365,0.6304299787886998,1.2581778359770228,-0.3730431983227348,0.9890222930363025,-0.23944668219767284,-0.5496256026366091,0.7341225037123239,0.9806540714913504,0.15215770309190937,-0.4551647772029642,0.5757034141573238,-0.44159377759833895,-0.04233500094123623,1.3638902352359807,0.6832574965958101,0.5344270216195052,0.9655523001686421,-0.11631308583669447,0.5751394876562754,0.18292517223837432,0.3561351216546371,0.44771259480792125,1.0537113147970445,-0.5798291452820257,-0.12952717035260392,-0.12187277898508346,-0.2824325703864852,-0.11924244174432566,0.01912511346789597,-0.3659527334562628,-0.1876608334913949,0.6406171634782467,-0.33250892344176963,0.07291947649204082,1.0343162469869605,-0.34515908145663066,-0.6387054588547757,-0.1805703686249229,0.9384568373637675,-0.14082474780518706,0.36738669547995007,0.3357845686449854,-0.2864149554124156,0.6398285094170174,0.9120173083144818,0.2934546142117621,-0.18534140771208252,1.069733927709517,-0.1304940155696385,0.9834512398704467,0.2886375714973321,-0.3890658112352073,0.3476920762258874,1.2774867198858422,-0.026312388028763734,0.45664474285392176,-0.13801621940862405,-0.021541348941604102,0.5019040531947762,1.0765248411320103,-0.08750812738082603,0.7743458671318435,-0.20215267468578432,-0.173347716229916,-0.14419720270279862,0.28784891743610275,1.1551764211958968,0.3028185012302761,0.08106297047681199,-0.27021415134413784,-0.21633360441872834],"y":[0.322184103037068,0.24241777920903415,-1.0847577887751416,-1.161836968267853,0.1888939366704743,0.27414548214841594,0.1684980220930505,-0.7973478229021614,0.3783950899109503,-0.8993368867049729,-0.9660193430028445,-1.1282824399311173,-0.934294012792386,-0.6835546926959866,-0.7711029688837643,0.5338427409388644,-0.6899364200339763,0.3697599368000072,-0.8725906860818264,-1.0503429415004373,0.30314748127343893,-0.8798712918368211,-0.7792053340976911,-0.9727986021530899,0.29633440810200345,0.03566827012324658,-0.7755831245952504,-1.051668420293042,-0.9184120679476384,0.09008861834988824,-0.6976436261645704,-0.9991110842138674,-0.9582783228510602,0.4010562939059431,-1.0453228797051655,0.3221479162869547,-0.7719632878217328,-0.8911668934486658,-0.970504244172177,-0.9338241074799037,0.10686469615379454,-1.0357841027193713,-1.1786154188006823,0.12547234481290087,-0.9115651807550127,-0.7529242933291806,-0.6831209741336176,-1.1097109780221244,-1.0230953942725416,-0.6840245980084688,-1.0045239323635486,-1.0244932465653727,-1.2067209122376235,0.23922454281111621,-0.8444899381027317,-0.8472108964592442,-0.07403511799692847,-0.7556861838936527,-0.9891095201023602,-1.1328325964139068,0.10414373779728192,-0.8096051855155452,0.5039104221045694,-1.113795974650278,-0.9338288529377499,-0.9129244735688076,-1.0834323099825371,-0.9260830873281194,-1.0494102490622423,-0.9550898319109885,-0.9809709681383201,-1.0852253213587006,-1.0258210980869005,0.29407623687120377,-1.0276455507553313,0.1834763430629468,-0.9061161458552183,-0.8367827319721374,0.24646896181599756,0.27052089991705214,-0.8671754652032222,-1.0077171687614666,0.17125516719967634,-0.9809685954093971,0.1599257515666415,-0.939702115484221,-1.0054542520728207,0.21248308764581605,-0.89073554761522,-0.8299672860717788,-0.832731549365174,-1.1264870558260305,-0.8068432949510731,-0.8517319843786899,0.5193633938447942,-0.990471185645078,-0.6106305106027321,-0.9020602177904087,-1.0335235587596485,-0.7361844022753876,0.19208480033946912,-0.06177300992569848,-1.082068271710896,-0.8925285589913836,0.05244909338499909,-0.9093070095242131,-0.8208984143984668,-0.9741555222379615,-1.0893103179868542,0.28411323223873297,-0.7447543000728736,-0.9678147271079314,-0.7025913144596156,-0.7171092210327222,-1.0376494875957616,-1.068444498096948,-0.8757815497508213,-1.0956558585747307,-0.7846543689974855,0.2795583302980972,-0.9505687439915429,-0.8413328884549269,0.40829596745297825,-0.9492408924700152,-0.8335894955742196,0.34803142524320946,-0.8599067230928431,-0.8544553154641255,-0.8952495173478963,-0.9464813746344662,-0.8530936499214077,-0.887542311217302,-0.6124258947078189,-0.839038530474014,-0.741597250425069,-0.702196155376283,-0.9537257936393476,-0.8947891029511065,-0.848107402147326,-0.9247528630776686,-0.9043231344790545,-0.8730582186653857,-1.0321618932169305,-0.7102961478612867,-0.7221316555569172,0.5669368548788103,0.34347652330257367,-0.8136539953935854,-1.0154196294342144,-0.8635241871374376,-0.7964851312352696,-0.9061499598764085,-0.8263498220271844,0.25689949903202747,0.13719691952926832,-0.7832879579969214,0.3026823214188029,0.1621839227974412,-0.8177413647506622,-0.9623609467502907,-0.09307173976055755,-0.9183758811975252,-0.8114343836418222,-0.8571810192784844,-0.9909025314785238,-0.7234571343495216,-1.0158557207255066,0.6326480592594506,-0.8272801417364565,-0.9569166573083424,0.3253749667060628,-0.9360508374184363],"z":[0.3664407487791101,0.01004070709629086,0.12415060945937416,0.22820472363527888,0.012435264179908923,0.07188051344963806,-0.4896220962535286,0.9261185667296064,0.8245003475542161,-0.08347023756161491,0.2080104714271291,0.4411759321635906,0.6450247772494679,0.43131874355628896,0.9097386660270519,1.2679634994625417,0.6998469838394683,0.22447405961706357,-0.3193939147954913,0.6464445716714453,0.32933686496710174,0.29588227282676904,0.5596213989427122,0.6037428825180674,0.6307909781428972,-0.03192615689221964,0.39243140590850645,0.27576939296515895,0.5354965796492173,-0.005894161845926935,0.5977000454163612,0.43156618739033603,0.40443570776537907,0.31923973886302687,0.2881373542358284,0.6473369503329588,0.6004159123432924,0.4552036253530106,0.44105221024656704,-0.043971796665988494,0.28817869215272474,-0.20893330410408353,0.30930636910561893,-0.016966050611642636,0.3283207643885646,0.26234529668630907,0.02321837119468123,0.416927390953072,0.19097711790624708,1.1203153174717455,0.16672857669572858,0.38209434230765826,0.080276569718066,0.5194793267068722,0.659984883530045,0.1052524297561782,-0.018138401199572857,0.7388580434042743,0.3710224535419427,0.11048657568375092,-0.26655376162114214,0.49328227182665974,0.8878022979000243,0.14759045949575925,0.7063772022719949,-0.13663271223286458,0.4948257881656606,0.15245343967226144,0.3939749222475073,0.6453460870927811,0.44024351907243353,0.43797268390583904,0.3865936630703635,0.5125854488605488,-0.13971223857359252,0.49794665242328484,0.3122621735293234,0.7621318219531521,0.18509934063846079,0.6142450059528355,-0.4297308035698754,0.67616719630631,-0.2157858440335106,0.06506901960344186,-0.1507427894224119,-0.37016183238312284,0.04402372665067489,0.005054005002765177,0.42227775246039456,0.085503209308365,0.937190455495322,0.12285453695442036,0.016769525108694366,0.6191903701294649,0.43602547372339784,0.28124347638950503,0.2445456015617774,-0.2630281918664901,-0.46590227429072684,0.8373143522388095,-0.12182885596168075,-0.33565110523460956,0.20943026584910646,0.36542464820057297,-0.4882023018315513,0.4465262936709131,0.2774291248839096,-0.23638509357235352,0.16863575244852624,-0.08294151831389825,0.8010191596009346,0.5263318666362993,0.3942148597442806,0.21834753502797732,0.2960059947437925,-0.018303461033492716,-0.18512979465390156,0.1562677911778568,0.5756799898019535,0.3367181241442455,0.1314081467194944,0.4314424654733125,0.7352087517325987,0.1269088259567891,0.25269320234257064,0.47726501888431466,0.8308655061528226,0.4396324158245896,-0.18930780557329382,0.02557057870781554,0.5294113929770272,-0.08716086715018678,0.5628669967709474,0.26875179320181203,0.572476741544202,0.6421851884055134,0.359950564776227,0.6223936183872164,0.07682587762626746,-0.22722038055943564,0.36911527778914494,-0.005571840349026379,-0.3761232971382893,-0.08310657814781806,0.9518292519325859,0.6692332840303432,0.8969246613424584,-0.05695086118450185,-0.17632874105478052,0.24770650024904506,0.8602668209443741,0.2179838756141805,0.6686622152121426,0.46680423336644294,0.1659612234384914,-0.08489003198359225,0.26798443994457494,-0.0325372601400635,0.04888670682717705,-0.2400757231609254,-0.05524228501158119,0.25460037809536845,0.717325369120687,0.6352489609887062,0.31416934928212104,0.5811540732262995,0.6069461307758189,1.2862929254883775,0.5459573651670889,0.4942146849178166,0.23217662863752042,0.3072754714357977]},{"hovertemplate":"color=5
0=%{x}
1=%{y}
2=%{z}","legendgroup":"5","marker":{"color":"#D62728","symbol":"circle"},"mode":"markers","name":"5","scene":"scene","showlegend":true,"type":"scatter3d","x":[-1.2212801896035088,-1.3959000832267867,-1.3561544624070507,-1.9161052179940903,-1.5589114879360357,-0.9540871573533849,-1.5757227549097377,-1.6376146082913834,-0.5874835366495461,-2.022738458842812,-1.9551087211569724,-0.9748808093530172,-1.8182719376628338,-1.1652124044273218,-1.420543932723814,-1.6942174997120911,-1.0077141564620862,-1.3083509987267032,-1.548270377016147,-1.3482753434793495,-1.7697263563256325,-1.0593218140125589,-0.6109535295172064,-0.9169713409973017,-1.0454399029464883,-1.8826614079795974,-1.443167907885508,-0.7553125168503305,-0.5110538384462405,-1.3616676191510642,-1.513606173967911,-0.7918178703009895,-0.7191175420840115,-1.3128116591295225,-1.06352892659867,-2.0043964201510276,-0.7332984718169555,-1.2105177183954468,-0.6195747661017614,-1.014494242644218,-0.9295754953848925,-0.6814666194834071,-1.1107967512573915,-1.6154683757294732,-1.7991412449098196,-0.8172503738592465,-0.7317677000988724,-1.605926297555154,-1.9547518060682567,-0.7562333584400949,-0.7818440531541568,-1.480905014387377,-1.2126589530189538,-1.4790633312078485,-1.8556981327032573,-1.067810863068579,-0.8638334445058514,-0.8470221775321495,-1.1589105936220794,-0.8762588749605313,-1.310849148438926,-0.8573069061404278,-0.7214369678633238,-2.1670974461759367,-1.6711044219331468,-2.091588589562395,-0.47686791077489377,-0.9202116083663783,-0.8017168635640247,-1.34748668941812,-1.558169370279182,-1.5438097166133276,-1.976944042257437,-1.4935551724022376,-0.991081613421295,-1.4445778520925228,-0.7430192739241853,-0.8129684373893376,-0.9372758903796832,-1.0457508144079337,-1.7626358914591602,-1.8532465193954097,-1.705469073537404,-1.0001345889783635,-1.1772526323138641,-1.5390386775261677,-1.604038610748355,-0.789855359610393,-1.2906194229403425,-1.2066675208980513,-1.8977631793023055,-1.0001345889783635,-1.2282498269589126,-0.9839911485548228,-1.2829184951684462,-0.9550079989431492,-1.4149842395754253,-1.6078888082457505,-0.6562588434853311,-1.6162570297907026,-1.0912343195318637,-1.2582746456714187,-1.260594071450731,-0.5819238435011571,-0.2409314502884856,-1.4904930961889664,-1.369978477051279,-1.8524578653341808,-1.316794044155453,-1.545519212264321,-1.7880683950174174,-1.9057744857585417,-1.0597995566123428,-1.9547518060682567,-1.9694218384184512,-1.5998775017895146,-1.7523051592236119,-0.6220263794096086,-0.7389903524938792,-2.0911568505898814,-1.399140350595863,-1.5541404488488761,-1.787279740956188,-1.2349833767366687,-1.1038844775467247,-1.047459777281822,-0.6137046942690323,-1.384291594312758,-1.8353362196761387,-1.0809501237006907,-1.1226582552110231,-0.7533034697553582,-0.5298849797552762,-1.4039113896830226,-1.5140379129404244,-0.8613352947936284,-1.5761544938822512,-1.5485807557004871,-1.7689377022644033,-0.9480957252324824,-1.8117453992974104,-0.7524291645699696,-1.332252730566877,-1.2530145039670084,-0.7885776029319129,-1.3163623051829394,-1.2447036460667935,-0.9293967714519819,-2.0151588913590897,-0.785826438180087,-0.9536554183808715,-1.377558044535002,-0.942714756017004,-1.086463280444704,-1.6640139570666745,-0.7257302643506994,-2.0378402301655205,-0.5548283806962823,-2.0788062440189994,-1.7603164656798478,-1.3156201875260858,-1.3955431681380708,-1.6409008792877302,-1.885901675348674,-0.9494483057947603,-1.4918456767512442,-1.1553134111642869,-0.882560685765774,-1.3351360828472378,-1.2582746456714187,-0.979962227124517,-1.6747764282747366,-0.826182521905247,-1.754624585002924,-1.5239369062034596,-1.5438097166133276,-1.1883254822062665,-0.5577690966213802,-1.4058739003736194,-2.038271969138034,-0.983858961026288,-1.7037595778864105,-0.577809270946692,-1.37413958601012,-1.4771008205172518,-1.4539877427383074,-1.909014753127618,-1.057048391860517,-1.2038589925014882,-1.6342421533937717,-0.5997019556918936,-1.1132483645652387,-1.5495015972902513,-1.2917184556859118,-1.9161052179940903,-1.1111536663461072,-1.5159255997472232,-1.1963367886625027,-0.7180185093384419,-0.6530185761162546,-1.3966422008836403,-0.5230940663327828,-0.5652913004603657,-0.927123882077045,-1.3394753829618837,-1.1186293337807172,-1.5589114879360357,-1.0253140774970175,-1.7991412449098196,-1.2472017957790165,-1.0950845170292594,-1.6516633504957923,-1.476743905428536,-1.5291396842631326,-0.6443973395316994,-1.2023282207834052,-1.533478984377779,-1.0838334759810517,-1.1098872696850939,-1.3148315334648564,-0.4708304750267208,-1.2132688831472727,-1.643784231568091,-0.8616462062550737,-0.6897026534998242,-1.3823290836221613,-0.5665690571388458,-1.9117659178794442,-0.7833748248722399,-2.1213603932352982,-1.6003666044067653,-0.6795041087928104,-0.35001630444505477,-1.5625834942776258,-1.8627885975697294,-1.2835289580738705,-1.930107956571229,-1.8962324075842223,-1.2598054173895017,-0.8454914058140666,-1.2265403313079193,-0.7891988930776985,-0.978299267877899,-1.3704215760412592,-0.4039428549977347,-1.8023815122788962,-0.7115379746002887,-2.1288825970742837,-1.030085116584177,-0.9970730455421974,-1.6672542244357513,-1.1792151430044606,-1.7976104731917366,-1.4063630029908702,-1.5787842983459037,-1.9618422709347287,-1.282965031572822,-1.6322796427031752,-1.5276089125450498,-0.3720763531057002,-0.4736276434058172,-1.5787842983459037,-1.0083246193675104,-1.1650342132715166,-0.8351606735785179,-1.1986562144418151,-1.8977631793023055,-1.7427630810492925,-2.063704472696291,-0.7300582044478788,-0.6799818513925945,-1.2237318029113562,-0.9223063065855099,-0.8523571431203574,-1.020053935792607,-1.121259671021475,-1.6445728856293202,-1.364165768863287,-0.8487316731831431,-0.7285274327297959,-1.2066675208980513,-0.7982984050391428],"y":[0.32677281899889393,-0.7025575004384256,-0.758773232770154,-0.5565738801671559,-0.5887643702322507,0.2932159179332352,-0.6322913941171495,0.6622237784894494,0.3743486527618331,-0.5284683867302149,-0.6458813537099073,0.39384806165117503,-0.6612957659710957,-0.6785346309007149,-0.6399962275188207,-0.6091674029964438,-0.6123511484786692,-0.5928493668604042,0.37165439023974134,-0.6096325628510798,-0.6408951059358257,0.46773400474596855,-0.7737562991978966,-0.756507943352585,0.4006658802804568,-0.5425187607197623,0.3793663418281817,0.26736622299817064,0.33355207814913923,-0.5787966201419337,-0.5697277484686216,0.3249459936015401,-0.7098333607355739,0.3612238530237114,-0.7451856459063194,-0.5207588078706975,-0.7887031788755259,-0.6975712526643439,-0.7773737632424911,0.2678337555817297,0.4128846834148041,0.5171414093641078,0.3367381963602878,-0.576075661785421,-0.5438804262624801,0.27780150567204676,-0.8245206239009074,-0.6449824752929023,0.5289674261440458,0.3398905005502463,-0.809103838910796,0.6187015000623967,0.33039028304348833,0.47365294495824534,-0.5311917178156506,0.2818865023002003,-0.8435596183934596,-0.8000325945085608,-0.7488054826798369,0.39883193669633354,-0.7397366110065249,0.443248348082545,-0.7837216765592905,0.5126541354658524,-0.6359112308906671,0.5443818384052341,0.20208399172205319,-0.757871981624226,-0.7809959727449317,-0.4999268020019816,-0.7342875761067305,-0.5824188296443743,0.48318697648619335,0.504014236897063,-0.6418230529161745,-0.5407281220725217,-0.7927952936904488,-0.749270642534473,0.336742941818134,0.5098969903592265,-0.6014601968658496,-0.6395334403931078,-0.5774420727859852,0.4197025020440859,-0.7565150615393543,-0.616872236398115,0.4940488595356691,-0.7760144704286963,0.4070043026815638,-0.6595003818660089,-0.5488643013076386,0.4197025020440859,-0.6685739989971671,-0.6023881438461985,-0.5457048789309109,0.36574019548531084,-0.5647438734234631,0.4559779887373341,-0.7927929209615256,-0.6857814226345194,-0.6109894829359515,-0.6082661518505157,-0.6821544676742324,0.4496010068571907,0.4105903254338912,-0.596471576362845,0.3372057289438469,-0.5298276795440096,0.5053830206265503,-0.619600312941397,-0.648604684795343,-0.515774932825539,0.24879713381810065,0.5289674261440458,-0.5425211334486855,0.42288862025523444,-0.5606612495242327,-0.6690320406650339,-0.6817254945697097,-0.5207611805996206,-0.7039215387100665,-0.6232177769859912,-0.5388989239462447,0.4668398717868098,-0.725676746101285,-0.5561354161469407,0.2174984039832416,0.4405659492050688,0.43331915747126437,-0.8254195023179125,0.3317566940440524,-0.5783652743084878,-0.6667762421631572,-0.6694681319563258,0.49541527053623324,-0.696672374247339,0.43285162488770523,-0.5479654228906337,-0.5311893450867274,-0.696674746976262,0.625512200504909,-0.9061185185841414,-0.6758112998152791,0.3498991828485227,0.3263100318731811,-0.5597599983783046,-0.5661031662372578,0.4858836117372083,0.5035852637925403,-0.6649446713079571,-0.7719271010716195,-0.6948479215789082,-0.6944213212033086,-0.6454428896896921,-0.5964763218206911,-0.530331398877682,-0.5348139273180912,0.2786980113601286,0.4768390631693939,-0.527571881042133,-0.7052832042527843,0.4722912794155275,-0.6232201497149144,-0.5438827989914032,0.4409925495806684,0.5411957201940856,0.42740733544575693,0.4691027884754557,0.49767344176703293,-0.6082661518505157,-0.49131834472545927,0.42786774984254666,0.38341515170622203,-0.6345495653479493,-0.6105266958102387,-0.5824188296443743,-0.6517908030064915,-0.6055790075151933,0.43149233207391047,0.5303290916867636,-0.7846181822473723,-0.5402605894889626,0.12321180085317804,0.4083659682242816,-0.6273075190719911,-0.6540513469662144,-0.51713897109718,-0.7424575693630375,0.40700667541048685,0.48135777835991633,-0.8054816294083553,0.445079918937745,-0.47544114533855797,-0.6223212712979095,-0.5565738801671559,-0.8381105834936652,-0.6436160642923383,-0.6187014345243919,0.3194922132438993,-0.7914288826898846,-0.5570342945639457,0.25557164751049977,0.4201291024196855,0.30454296083734694,-0.5330161704840812,0.4428264931647916,-0.5887643702322507,-0.7655839332126664,-0.5438804262624801,-0.7129904103833785,-0.6490603537342865,0.40112392194832347,0.547541260781962,0.48906972994835685,-0.7878114186452903,0.3711892303851053,-0.5416198823027574,0.3480652392643996,-0.509467951716699,-0.5955774434036862,0.4962732167452787,0.2936834505167943,0.5502645918673976,-0.5874412641685691,-0.8068480404089193,-0.6603945148251676,-0.6821953998821918,0.4741157320839582,-0.7732863938854144,-0.5334522617753733,-0.5697301211975447,-0.5838190546661285,0.5470375414482895,0.47501461050096316,-0.5706266268856266,0.4464392117515398,0.4664061532244408,-0.5846817463330203,-0.5724487068251343,-0.8358500395339423,-0.6313925157001447,-0.4840786711784243,-0.7093658281520148,0.6286668774237905,0.524383455640066,-0.545244464534121,0.32222028978718126,0.49225584815950546,-0.7311305264589258,0.3480676119933227,-0.5978403600923321,0.34444540249088207,-0.5796978712878618,-0.5611264093788687,-0.5606565040663865,0.4895325170740697,-0.8009338456544889,-0.61960268567032,0.45325228492297526,0.31902705338926335,0.20344802999369416,-0.5606565040663865,0.37979294220378135,0.42331522063083404,-0.7950510921923254,-0.6925897503481084,-0.5488643013076386,-0.6295680630317139,0.4831846037572703,-0.787339140603885,-0.8027559255939964,0.4351145415763511,0.5253185208071843,0.4817938696512085,0.19258140148637215,0.4781692874198447,0.4405588310182994,-0.7256838642880543,-0.8372140778055832,-0.8231565856292664,-0.6595003818660089,0.3222179170582582],"z":[0.041059404236109265,0.48849315765942364,0.7807825578223011,0.4920600653309718,-0.006306665513893861,0.20326269517678924,0.6858931566593143,0.7624130973668217,-0.10090728492593726,0.7210898647185249,1.0079051814570563,0.3727235233775896,0.8036113046108422,0.07301152612067202,0.20857171876721553,0.6171594724596436,-0.3740999058057417,-0.27564359697120666,0.5641620576223139,0.555807047437117,0.5553196661062965,0.7781080288122662,0.5435628080834708,-0.2265354113023257,-0.6790795887361892,0.23140046555575677,-0.08404000289256253,0.46761292454057635,-0.35467300685482905,-0.16112869727743018,0.030797218298114437,-0.11007199793885519,0.3534203463437004,0.2824571648943316,0.8339450324935506,0.4480623036726401,0.025446856790791977,0.03590764230866367,-0.039596197820306794,0.15379085009411153,0.409827407189598,0.03692374288720075,0.2614118719415646,0.3936037564964369,0.14162148840331895,-0.001031181669424841,0.44461911791811526,0.6611572341179753,0.5026859106827635,0.7832184528228154,0.2737384952953377,0.7042639206020463,0.6242184101398867,0.07305286403756833,0.5415319104136496,0.268305749787888,0.7826897335750989,0.09048991140189061,0.6259605260587648,0.29531250749582144,0.8178864416343095,0.7570627358594993,0.32321034037801544,0.6451399811756302,0.4779086502245282,0.7069797875289775,0.19280190965891753,0.05886011101422839,0.12759379521389896,0.16684479227547833,0.801827850775068,0.006061295756775553,0.32633120463563975,0.7954626921764614,0.05744031659225107,0.6634280692845699,0.8816334237404544,0.5646081010362379,-0.4889371269964187,0.37130372895561226,0.7193064108827507,0.645098643258734,1.0541737782819827,-0.641975704924181,0.8989880871046493,0.13983803456754496,0.575110224471006,0.4253572788011225,0.4588118709414554,0.48528990940167194,0.2190325042850873,-0.641975704924181,1.043712992764111,0.22142706136870532,-0.38468441324063707,0.5188682234590283,-0.04661379758365375,0.12572795737799752,0.5064589242714626,0.782566011658075,-0.28432092865330416,-0.10476297434842899,-0.13497298031411398,-0.3560928012768064,0.5725180794610983,-0.10845360393700093,-0.05241020250490025,0.25613638809709566,-0.24028182907807624,0.7106290792006531,0.8283472271521811,0.3706512877908719,0.11668696628210318,0.5026859106827635,0.6065749650247483,-0.025890826127787203,0.5978976333426509,-0.14316293066539107,0.2072756462622617,0.823236803141632,0.7738886799759777,0.12747007329687549,0.4393849719905425,0.3745069772133638,-0.19312215707888927,-0.6663893059686193,0.39709578650513155,-0.4537404189372082,0.2558140666001949,0.7913670652571962,-0.03635161164565892,-0.19405457017004618,0.35021709808594886,0.6401119411652083,-0.08545979731453987,-0.3108403050304172,0.5696361410466599,-0.12771544305399377,0.16635741094465784,0.06433419443857444,0.7779843068952427,0.687436672998315,0.2525694804255473,-0.40284877943255304,-0.3954675202554093,-0.1240248134654219,-0.511567274205083,-0.713912637381603,0.4532140656000857,-0.24900049867706997,0.3195197107894436,0.21546559661353892,0.9328887226589061,-0.15054418984253487,0.6418953950009825,0.8508546640974092,0.7087219034478554,0.027395370460485985,0.689137742833962,0.7495164168484356,0.6841097028235399,-0.016726113114869323,0.502644572765867,0.5167959878723107,0.2636827071081592,0.09089490873258382,-0.16465426703208222,-0.25763649244227127,0.0327457319678085,-0.10476297434842899,-0.45293071610948726,0.6470471569284281,0.4661931301185991,0.5676876273769659,0.15220599583821437,0.006061295756775553,0.2122623483557874,0.35569118151029494,0.10468266442523066,0.592464887835201,0.2947837882481047,0.3496059948381051,0.24000291957500075,0.5485908480938928,0.608482140777546,0.46923131854243083,0.6560468101074262,0.2631539878604425,0.08363737147246353,0.550374301929667,0.10654850226113197,0.15784513909648024,0.18789008522824532,0.15589662542678623,0.4920600653309718,0.7666311427158574,0.000587212332429532,0.3638811318615722,0.6563355918583694,0.22106340195490845,-0.31964135862953835,0.4713035541291482,0.07544742112118642,0.5133941400346822,0.015226008769693461,-0.7107093891238515,-0.006306665513893861,0.7070621715291048,0.14162148840331895,0.581962764400433,-0.7337031957463125,0.5077963346933128,0.10326287000325324,-0.09782775858520934,0.8042224078586862,0.5028096325997871,-0.11534748178332435,0.5715433167994577,1.039089950084382,0.2951474476619016,0.5990374558382114,-0.11055937926967557,0.28282082430812855,0.7395430126613842,0.7671185240466778,0.08168885780276958,0.8962722201777181,0.5095797885290868,-0.14543376583198567,0.798500880600293,0.40597171776710633,0.5723530196271784,0.6979811460035669,0.16283184119000588,0.3775451656371953,0.6227986157179095,0.7826073495749717,0.6382047654124107,-0.5239352354757525,0.5096621725292141,0.3391452093202333,-0.03696170323991533,0.03959827189723558,0.9246163883075018,0.07771825628778094,0.4270170107198731,0.08554454722526128,0.5182571202111844,0.5732854327183353,0.1963688173304659,0.9272909173175367,0.3635588103646716,0.5607937495306425,0.5365452083201241,-0.15245136559533265,0.33869916590630916,0.8124123582099632,1.0858035786696447,0.3213445025421143,0.5949831668358426,-0.0925936126576366,-0.15245136559533265,0.6333831231528049,0.69153229991758,0.38825339498911415,0.33367112589588727,0.2190325042850873,0.8654511109641895,0.7015057041046315,-0.2599486655257621,-0.08906804290298453,-0.0625073286089752,-0.5499258926051488,-0.23290056990093236,0.4089763664449806,0.3094639226022651,0.671783079469767,0.9324013413280858,0.7950576948457683,0.15922359560156124,0.48528990940167194,0.460719046694253]},{"hovertemplate":"color=0
0=%{x}
1=%{y}
2=%{z}","legendgroup":"0","marker":{"color":"#9467BD","symbol":"circle"},"mode":"markers","name":"0","scene":"scene","showlegend":true,"type":"scatter3d","x":[5.885373660378473,2.2812652717945316,2.8939975415614114,4.1628572441303495,4.915833395898783,3.246466236159576,6.141194291292216,3.161058386283,7.506218778281603,4.842436953652221,5.008763449614345,2.6976235068518477,2.5548066512542738,4.478952772806391,7.54469217908705],"y":[-0.3043986707378795,4.119509196190614,1.6265584654836438,2.050352764786488,-0.12848035890339193,2.9129012721050125,0.6496816673330058,1.7752316028191588,4.4475894019328965,2.3359020912409245,-0.016518799552416863,2.4919234623738142,4.270910410069411,3.2120453036100525,0.028261329624860165],"z":[2.393820152498118,1.06992117260969,1.1308272623846276,1.1193526914290586,2.402373762263193,1.0438478396465012,1.826397415956682,1.2196738264459082,4.289364116572444,1.6759109486091837,2.5067915358528943,1.3380379208784903,0.5879766920378627,0.5280450730909008,2.74705929549367]},{"hovertemplate":"color=2
0=%{x}
1=%{y}
2=%{z}","legendgroup":"2","marker":{"color":"#8C564B","symbol":"circle"},"mode":"markers","name":"2","scene":"scene","showlegend":true,"type":"scatter3d","x":[0.037127953218813126,1.242736865713447,0.19239242652889585,1.5115066733089244,2.0331965761670405,2.1808418344965115,2.6885755351818648,1.3390393743266205,0.5504208142754502,1.8901039854949295,1.4567454650677447,0.25853792890102845,0.3968589477088743,0.4681324042568823,1.1073100264263236,1.2738147135442521,2.017185323272035,2.1865337151734354,2.74758403628315,2.33738459726218,1.0727206472618853,0.029248834291111886,1.1016929696331974,0.822948812113782,1.52424301522505,1.1368922789259543,0.549154417614437,0.42553171863620776,0.7998822707392133,2.656587673001657,0.9926194754940949,0.8078470407910738,1.6636635995555706,1.3604429564545715,1.0450152543286917,0.041421249706188976,1.0414640754981697,1.6507604265011064,0.4659338059886381,1.0034279503294274,2.0964473662413456,1.4459483502498793,1.709015449928071,2.0982425130164986,0.8962704304765458,1.691651616470787,1.4050175127833093,0.945305114430998,2.4535945598950244,1.4851652209554753,0.2925451326394647,1.8966707041343474,0.29578540000854125,0.45634519140994306,0.3222709326850972],"y":[1.6656800798862066,1.5160380633623831,1.2205162413597836,2.730743607204065,1.2648626519746915,1.509184057982988,1.321512102868789,1.4471336225838247,2.5821114020765097,2.6346278059477246,1.314303870614021,1.3941496861290505,1.0876888621189025,2.401717679988382,2.451546939524275,1.200975900262482,2.1047232594638023,1.4022063736771717,1.2004816718445022,1.1374937985492979,1.15293727937383,1.5165394099671323,0.31853282497128343,1.2667280368510818,1.3791209420355024,1.6538493176484224,2.253468770299544,1.136197388320037,1.548700831468883,3.5116313372548214,1.228661911510593,1.2603824962632053,1.073134768795683,1.383208311392579,1.287133442344198,1.4122898022045978,1.3950005141513269,2.0965894529576086,1.3719174552385804,1.4883977297800777,1.8382989678013595,1.8282499228694473,1.3474003572828899,1.4380214459736302,1.042337385565573,3.324928261328931,2.3214500095555994,2.0553567870536225,1.5508795110126867,2.5009543441424142,1.1896826713795603,1.17104595415711,1.1910467096512014,1.1855953020224839,0.9834368816274452],"z":[-1.015646722483815,-0.5711274355673089,-0.22251466204591414,0.5554121634182031,0.42585346995646955,0.7615718781003185,-0.27453630256801576,-0.6787484574147621,-0.5646796011349096,0.6223623937820995,-0.221052518053453,-1.5519683778853064,-0.13999322215359677,-1.8408894699565126,-1.1143016308982272,0.33509973014239114,-0.36419256945701717,0.5797430886288488,-0.570879991733262,-1.008381678886421,0.040539494812919144,-0.7906712120986309,-0.3109965550398104,-0.07908582889140653,-0.007593928194321087,-0.7310598913413945,-0.8371384085034342,-0.5344295607395813,-1.1369317781068915,-0.2161807280524244,-1.2788170949223983,-0.09145379016207597,-0.03496434531605133,-0.1134314962059999,-1.0777264663339357,-1.5432910462032088,0.2580523736744199,-1.1837626339254916,-0.7044591426177417,-0.738804809932335,-0.030140387915605027,-1.8543484094685725,-1.1949572329546436,0.5357453269705171,0.025900698375655132,-1.785654759698545,-1.9777457351080094,-0.654253484023784,0.6685896526901296,-1.8554859168232927,0.11924658319964115,-0.4202359708891179,-0.16614893911691297,0.22508415121132003,-0.517438556789183]},{"hovertemplate":"color=4
0=%{x}
1=%{y}
2=%{z}","legendgroup":"4","marker":{"color":"#E377C2","symbol":"circle"},"mode":"markers","name":"4","scene":"scene","showlegend":true,"type":"scatter3d","x":[-1.4086250651254453,-0.33747561392379527,-0.6477124307845739,-0.20191658710813662,-0.4080926039391087,-0.32024450077215194,-1.3864328289362648,-0.12286844445864548,-0.7687909764233098,-1.8776548140918954,-1.7035240230858681,-0.4509463045993862,-1.9957178199217354,-1.5666872395917295,-0.22471928620274106,-0.824772577698232,-0.574643827461413,-1.2576073518983628,-0.3817392587910875,0.0036376067999444595,-0.1077553131184704,-0.3367448562844082,-0.4645173042040114,-1.011207971647871,-0.594694829027086,-0.5138050031980664,-0.6051577487911698,-1.831917761151257,-1.3891839936880908,-0.9267209633610591,-1.8394399649902424,-0.3920699910266362,-0.048758172034652325,0.19673172664354194,-1.3637514901298342,-1.2887317361335435,-0.5038713663252281,-0.7988623315401913,-1.4481924947893758,-0.381572427652749,-1.4854865023012647,-0.7559972708624472,-0.7515831468640032,-1.6804109453069236,-2.1778599173839988,0.4434766619652827,-0.2164084283025261,-2.0259213625671517,-0.8799308813021214,-1.9735255837325552,-1.9504125059536106,-0.642273565147253,-0.7813089469096358,-1.2708214364142723,-1.1622256848749535,-0.8171930102145095,-1.0179875250528978,-0.9984256261044752,-1.1537252758014667,-1.4067373783186465,-1.048933718132273,-0.4966833575400246,-1.0332680203085165,-0.6143894482811487,-1.1131910009205015,-1.7427057174045553,-2.003729126377972,-0.5112960262454821,-0.28512637149357406,-1.2005727215051414,0.06356694949099358,-0.7111810595115728,-0.21206912818788004,-1.1551352200084817,-0.8559831458346775,-1.2774801623082308,0.06776270205963797,-0.5606410888842743,-1.6875014101733956,-1.0121288132376354,-1.5355628553565488,-0.39189126709372585,-0.6367604084032397,-1.7469990138919314,-0.24937449571723536,-1.7781120381096451],"y":[1.4227470352550484,2.3913185840646194,1.4508163419418765,1.2735796695015535,1.369225565445412,1.624871641628897,1.4685274849129009,1.4526093533180402,1.7645120940412133,2.5826394445156797,2.6193510225002203,1.2418472211043254,1.5406204166315307,2.603936610239032,2.219943310526152,1.3035096156069255,2.364567637983627,1.4862024411338122,1.3438457758228295,1.3963959937152348,2.232636764430828,1.4721135076652283,1.1996842354910677,1.553277683786093,1.2908256526179422,1.3248067813302775,1.432256743677499,1.536533047274454,2.4597821880940396,2.7634716306240223,2.5622411572093333,1.3030468284812124,1.3379244628816296,2.2512058536108976,2.5069266760235327,1.5460356375101352,2.9411467670845606,1.5695909744642866,2.580812619118326,1.672013756829467,2.528686628872597,2.4706511893302845,1.2613490027225907,2.592607194605997,1.53699820712909,2.7194480055922208,1.3039409614403712,1.527929335455778,1.4626109174295472,1.5864008662893831,1.5596570383951598,2.481980604963319,1.4675947924747057,2.6188882353745075,1.4898222779073296,2.3355632661296806,1.4046116646373474,1.4857349085502531,2.4493516508780093,2.56177837008362,2.56629471254522,2.287953618345551,1.325267195727067,2.4207833703153554,2.502841679395379,1.42819369742592,1.5737097851136304,3.2742268192104538,2.1945611481746465,1.6924506036148506,1.2028412851388721,1.497069069641134,2.334630573691485,1.5292571869773057,2.8296527403171448,1.5143103072996764,1.642079065266249,1.3415876045920299,2.553172285536021,1.625801961338169,2.5441034138627088,1.3760457568036166,2.302003992335099,1.6815839751075286,1.5088227129208454,2.515099042008763],"z":[-0.04178435715310869,-1.6531415653003603,0.4681416437882931,-1.0366106430900424,-0.4145642995384823,0.6064600529322515,0.13457034889401498,0.5249947480481145,0.2224844998641386,0.4355784186558864,0.4200072091274654,-0.34810145050540625,0.4831017500688701,0.21571333228125128,-0.20548232017861953,-0.2812749420585334,-0.6668688891285004,0.08189525555358579,-0.8392106440901517,0.44210964874200037,-0.5559208971062723,0.248276557413658,0.0587028493512477,0.4135593746950661,-1.4315343630068473,-0.5011400284331683,-1.383482312346147,0.588939318080549,-0.011896672684324261,0.5533389161778982,0.3086955576914404,-0.7178018665500518,0.24101902015353782,-0.20499493884779915,-0.12093748895375467,0.37276486129448605,0.8996418317566426,0.2711053042021992,0.28444701648092185,0.8725937361318127,0.09572434916312889,-0.8886411512559331,-0.24964514167087115,0.28075638689235,0.6502917431030758,0.7147335159444448,-0.31420081495114943,0.45836582752753124,0.4644510141997211,0.6594564561159937,0.5202056338808785,-0.9536842058670318,0.3870399983179531,-0.01651971536405311,0.2898797619883717,-0.5491507411769725,-0.8008106877731898,0.3957173300000506,-0.2936015654123064,-0.12783136680007812,0.10857969176461868,-0.5014623499300689,0.31056139552734174,-0.9591582892913779,-0.3902744204110675,0.3173315514566417,0.6347205335746549,-0.9456928550956316,-0.2549541652612973,0.34340589607341804,-0.16983956870548486,-0.41967472354903146,-0.2966810917530344,0.4538665067648261,0.4814019837204759,-0.06424944452785303,0.867607034038287,-0.9574161733725001,0.11676964211589569,0.7291649029773051,-0.07515627345964887,-1.841541911121253,-0.011772950767300783,0.8449758751760353,0.6078798473542287,0.04256187449187909]}],"layout":{"height":600,"legend":{"title":{"text":"color"},"tracegroupgap":0},"margin":{"t":60},"scene":{"domain":{"x":[0,1],"y":[0,1]},"xaxis":{"title":{"text":"0"}},"yaxis":{"title":{"text":"1"}},"zaxis":{"title":{"text":"2"}}},"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"width":1200}}},"metadata":{},"output_type":"display_data"}],"source":["# plot with clusters as categories\n","fig = px.scatter_3d(\n"," pca, \n"," x=0, \n"," y=1,\n"," z=2,\n"," color=cus_data['cluster'].astype(str),\n"," template='simple_white',\n"," width=1200,\n"," height=600\n"," )\n","fig.update_traces(mode='markers')\n","fig.show()\n"]},{"cell_type":"markdown","metadata":{},"source":[" # Text Analysis"]},{"cell_type":"markdown","metadata":{},"source":[" ## Data Cleaning"]},{"cell_type":"code","execution_count":3,"metadata":{},"outputs":[],"source":["tokyo = pd.read_csv('data/tokyo_olympics_tweets.csv')"]},{"cell_type":"code","execution_count":4,"metadata":{},"outputs":[],"source":["# define list of regex patterns for replacement\n","list_of_replacements = [\n"," (r'tokyo', ''), \n"," (r'olympics?', ''),\n"," (r'tokyoolympics', ''),\n"," (r'2020', ''),\n"," (r'2021', ''),\n"," (r'games?', ''),\n"," (r'https?', ''),\n"," ]\n","\n","# clean text, lowercase text, remove special characters, remove numbers\n","tokyo['clean_text'] = tokyo['text'].apply(lambda x: LIB.clean_text(x, list_of_replacements, lowercase=False, ignorecase=True))"]},{"cell_type":"code","execution_count":5,"metadata":{},"outputs":[{"data":{"text/plain":["10000"]},"execution_count":5,"metadata":{},"output_type":"execute_result"}],"source":["docs = list(tokyo['clean_text'])\n","len(docs)"]},{"cell_type":"markdown","metadata":{},"source":[" ## BERTopic"]},{"cell_type":"code","execution_count":17,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":["2022-07-14 19:54:24.827 INFO sentence_transformers.SentenceTransformer: Load pretrained SentenceTransformer: E:\\Github\\huggingface\\all-MiniLM-L6-v2\n","2022-07-14 19:54:25.088 INFO sentence_transformers.SentenceTransformer: Use pytorch device: cpu\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"b9595088f00f4bd8b25f12b65c32f882","version_major":2,"version_minor":0},"text/plain":["Batches: 0%| | 0/313 [00:00\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
TopicCountName
0-13144-1_https_tokyo2020_india_medal
1012210_medal_silver_india_mirabaichanu
216871_olympics_swimming_olympics tokyo2020_tokyo2020
326492_round_sutirtha_vikas_mukherjee
433983_banda_zambia_barbra_barbra banda
............
62611761_2020 india_start tokyo_asked happier_happie...
63621762_ausvswe_aussies_aus_ausvswe tokyo2020
64631563_handball_esp_tokyo2020 handball_27
65641564_hend_hend zaza_zaza_youngest
66651565_india strikes_strikes medal_medal 49_strikes
\n","

67 rows × 3 columns

\n",""],"text/plain":[" Topic Count Name\n","0 -1 3144 -1_https_tokyo2020_india_medal\n","1 0 1221 0_medal_silver_india_mirabaichanu\n","2 1 687 1_olympics_swimming_olympics tokyo2020_tokyo2020\n","3 2 649 2_round_sutirtha_vikas_mukherjee\n","4 3 398 3_banda_zambia_barbra_barbra banda\n",".. ... ... ...\n","62 61 17 61_2020 india_start tokyo_asked happier_happie...\n","63 62 17 62_ausvswe_aussies_aus_ausvswe tokyo2020\n","64 63 15 63_handball_esp_tokyo2020 handball_27\n","65 64 15 64_hend_hend zaza_zaza_youngest\n","66 65 15 65_india strikes_strikes medal_medal 49_strikes\n","\n","[67 rows x 3 columns]"]},"metadata":{},"output_type":"display_data"},{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"marker":{"color":"#D55E00"},"orientation":"h","type":"bar","x":[0.02493384807468144,0.025977475503433926,0.026431610272171224,0.02963825625165004,0.031974077316997127],"xaxis":"x","y":["winning ","mirabaichanu ","india ","silver ","medal "],"yaxis":"y"},{"marker":{"color":"#0072B2"},"orientation":"h","type":"bar","x":[0.015562198714356533,0.01654787742941714,0.017284388082438977,0.024485062405682417,0.025802434604230862],"xaxis":"x2","y":["tokyo2020 olympics ","tokyo2020 ","olympics tokyo2020 ","swimming ","olympics "],"yaxis":"y2"},{"marker":{"color":"#CC79A7"},"orientation":"h","type":"bar","x":[0.026779453007956394,0.02705543473018141,0.027125627381823756,0.02855963826183949,0.032263331391707395],"xaxis":"x3","y":["tennis ","mukherjee ","vikas ","sutirtha ","round "],"yaxis":"y3"},{"marker":{"color":"#E69F00"},"orientation":"h","type":"bar","x":[0.04358338548516198,0.044601984865099364,0.04619004754136498,0.06969501218156057,0.07777197450818649],"xaxis":"x4","y":["china ","barbra banda ","barbra ","zambia ","banda "],"yaxis":"y4"},{"marker":{"color":"#56B4E9"},"orientation":"h","type":"bar","x":[0.017306996655535947,0.029406304681505544,0.038620019245554665,0.04132428538829165,0.052317107126751486],"xaxis":"x5","y":["swe ","hockey ","sweden ","swevaus tokyo2020 ","swevaus "],"yaxis":"y5"},{"marker":{"color":"#009E73"},"orientation":"h","type":"bar","x":[0.10280592661131402,0.10372673039136406,0.10859393646196176,0.10913238696236863,0.11140792806020794],"xaxis":"x6","y":["hearty ","hearty congratulations ","mirabai_chanu lifting ","lifting women ","mirabai_chanu hearty "],"yaxis":"y6"},{"marker":{"color":"#F0E442"},"orientation":"h","type":"bar","x":[0.012174497283654532,0.016266045060452983,0.01926432141680915,0.03227542057669254,0.04282198073513871],"xaxis":"x7","y":["tokyoolympics ","congratulations tokyo2020 ","https ","tokyo2020 ","tokyo2020 https "],"yaxis":"y7"},{"marker":{"color":"#D55E00"},"orientation":"h","type":"bar","x":[0.036807165738008324,0.044225721929860115,0.04590716640097704,0.04788923352395669,0.0568434235811134],"xaxis":"x8","y":["cyclingroad ","carapaz ","road race ","road ","race "],"yaxis":"y8"}],"layout":{"annotations":[{"font":{"size":16},"showarrow":false,"text":"Mirabai Chanu (Indian Weightlifter)","x":0.0875,"xanchor":"center","xref":"paper","y":1,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Hockey","x":0.36250000000000004,"xanchor":"center","xref":"paper","y":1,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Barbra Banda (Zambian Football Player)","x":0.6375000000000001,"xanchor":"center","xref":"paper","y":1,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Sutirtha Mukherjee (Indian Table Tennis Player)","x":0.9125,"xanchor":"center","xref":"paper","y":1,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Vikas Krishan (Indian Boxer)","x":0.0875,"xanchor":"center","xref":"paper","y":0.4,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Road Race","x":0.36250000000000004,"xanchor":"center","xref":"paper","y":0.4,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Brendon Smith (Australian Swimmer)","x":0.6375000000000001,"xanchor":"center","xref":"paper","y":0.4,"yanchor":"bottom","yref":"paper"},{"font":{"size":16},"showarrow":false,"text":"Sam Kerr (Australian Footballer)","x":0.9125,"xanchor":"center","xref":"paper","y":0.4,"yanchor":"bottom","yref":"paper"}],"height":600,"hoverlabel":{"bgcolor":"white","font":{"family":"Rockwell","size":16}},"showlegend":false,"template":{"data":{"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"#C8D4E3","linecolor":"#C8D4E3","minorgridcolor":"#C8D4E3","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"#C8D4E3","linecolor":"#C8D4E3","minorgridcolor":"#C8D4E3","startlinecolor":"#2a3f5f"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"heatmapgl"}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]],"sequential":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]],"sequentialminus":[[0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1,"#f0f921"]]},"colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"#C8D4E3"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"#EBF0F8","linecolor":"#EBF0F8","ticks":""},"bgcolor":"white","radialaxis":{"gridcolor":"#EBF0F8","linecolor":"#EBF0F8","ticks":""}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"#DFE8F3","gridwidth":2,"linecolor":"#EBF0F8","showbackground":true,"ticks":"","zerolinecolor":"#EBF0F8"},"yaxis":{"backgroundcolor":"white","gridcolor":"#DFE8F3","gridwidth":2,"linecolor":"#EBF0F8","showbackground":true,"ticks":"","zerolinecolor":"#EBF0F8"},"zaxis":{"backgroundcolor":"white","gridcolor":"#DFE8F3","gridwidth":2,"linecolor":"#EBF0F8","showbackground":true,"ticks":"","zerolinecolor":"#EBF0F8"}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"ternary":{"aaxis":{"gridcolor":"#DFE8F3","linecolor":"#A2B1C6","ticks":""},"baxis":{"gridcolor":"#DFE8F3","linecolor":"#A2B1C6","ticks":""},"bgcolor":"white","caxis":{"gridcolor":"#DFE8F3","linecolor":"#A2B1C6","ticks":""}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"#EBF0F8","linecolor":"#EBF0F8","ticks":"","title":{"standoff":15},"zerolinecolor":"#EBF0F8","zerolinewidth":2},"yaxis":{"automargin":true,"gridcolor":"#EBF0F8","linecolor":"#EBF0F8","ticks":"","title":{"standoff":15},"zerolinecolor":"#EBF0F8","zerolinewidth":2}}},"title":{"font":{"color":"Black","size":22},"text":"Topic Word Scores","x":0.5,"xanchor":"center","yanchor":"top"},"width":1000,"xaxis":{"anchor":"y","domain":[0,0.175],"showgrid":true},"xaxis2":{"anchor":"y2","domain":[0.275,0.45],"showgrid":true},"xaxis3":{"anchor":"y3","domain":[0.55,0.7250000000000001],"showgrid":true},"xaxis4":{"anchor":"y4","domain":[0.825,1],"showgrid":true},"xaxis5":{"anchor":"y5","domain":[0,0.175],"showgrid":true},"xaxis6":{"anchor":"y6","domain":[0.275,0.45],"showgrid":true},"xaxis7":{"anchor":"y7","domain":[0.55,0.7250000000000001],"showgrid":true},"xaxis8":{"anchor":"y8","domain":[0.825,1],"showgrid":true},"yaxis":{"anchor":"x","domain":[0.6000000000000001,1],"showgrid":true},"yaxis2":{"anchor":"x2","domain":[0.6000000000000001,1],"showgrid":true},"yaxis3":{"anchor":"x3","domain":[0.6000000000000001,1],"showgrid":true},"yaxis4":{"anchor":"x4","domain":[0.6000000000000001,1],"showgrid":true},"yaxis5":{"anchor":"x5","domain":[0,0.4],"showgrid":true},"yaxis6":{"anchor":"x6","domain":[0,0.4],"showgrid":true},"yaxis7":{"anchor":"x7","domain":[0,0.4],"showgrid":true},"yaxis8":{"anchor":"x8","domain":[0,0.4],"showgrid":true}}}},"metadata":{},"output_type":"display_data"}],"source":["display(topic_model.get_topic_info())\n","\n","# topic_model.visualize_barchart(\n","# n_words=5,\n","# top_n_topics=8,\n","# width=300, \n","# height=300\n","# )\n","\n","LIB.visualize_barchart_titles(\n"," topic_model=topic_model,\n"," subplot_titles=labelled_topics,\n"," n_words=5,\n"," top_n_topics=8,\n"," height=300\n",")"]},{"cell_type":"code","execution_count":43,"metadata":{},"outputs":[{"data":{"text/plain":["['tennis', 'round', 'murray', 'singles', 'nagal']"]},"execution_count":43,"metadata":{},"output_type":"execute_result"}],"source":["topic_model.get_topic(8)[:5]\n","[i[0] for i in topic_model.get_topic(8)[:5]]"]},{"cell_type":"code","execution_count":44,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
TweetTopic
11Gymnastics ❤️ #Tokyo20208
39Gymnastics on the TV and I’m happy\\r\\n\\r\\n#Tok...8
62@channel7 Please do not switch from Aussie swi...8
260With no official fans here at the #Tokyo2020 ...8
266*watches the men's gymnastics for two minutes*...8
.........
9901Gymnastics impossible to watch, can’t hear the...8
9905@BBCSport #Tokyo2020 Gymnastics. Why can we no...8
9917Nyjah Huston and skateboarding hit the Olympic...8
9937Cor what a wonderful morning watching the gymn...8
9980Hashimoto just did Magic #gymnastics ##Tokyo20208
\n","

163 rows × 2 columns

\n","
"],"text/plain":[" Tweet Topic\n","11 Gymnastics ❤️ #Tokyo2020 8\n","39 Gymnastics on the TV and I’m happy\\r\\n\\r\\n#Tok... 8\n","62 @channel7 Please do not switch from Aussie swi... 8\n","260 With no official fans here at the #Tokyo2020 ... 8\n","266 *watches the men's gymnastics for two minutes*... 8\n","... ... ...\n","9901 Gymnastics impossible to watch, can’t hear the... 8\n","9905 @BBCSport #Tokyo2020 Gymnastics. Why can we no... 8\n","9917 Nyjah Huston and skateboarding hit the Olympic... 8\n","9937 Cor what a wonderful morning watching the gymn... 8\n","9980 Hashimoto just did Magic #gymnastics ##Tokyo2020 8\n","\n","[163 rows x 2 columns]"]},"execution_count":44,"metadata":{},"output_type":"execute_result"}],"source":["# results = pd.DataFrame({'Tweet':tokyo['text']}).copy()\n","# results['Topic'] = topics\n","results = pd.read_csv(r'data/topic_results.csv')\n","# results.to_csv('test.csv', index=False)\n","results.loc[(results['Topic'] == 8)]"]},{"cell_type":"code","execution_count":15,"metadata":{},"outputs":[],"source":["def _plotly_topic_visualization(df: pd.DataFrame,\n"," topic_list: List[str],\n"," width: int,\n"," height: int):\n"," \"\"\" Create plotly-based visualization of topics with a slider for topic selection \"\"\"\n","\n"," def get_color(topic_selected):\n"," if topic_selected == -1:\n"," marker_color = [\"#B0BEC5\" for _ in topic_list]\n"," else:\n"," marker_color = [\"red\" if topic == topic_selected else \"#B0BEC5\" for topic in topic_list]\n"," return [{'marker.color': [marker_color]}]\n","\n"," # Prepare figure range\n"," x_range = (df.x.min() - abs((df.x.min()) * .15), df.x.max() + abs((df.x.max()) * .15))\n"," y_range = (df.y.min() - abs((df.y.min()) * .15), df.y.max() + abs((df.y.max()) * .15))\n","\n"," # Plot topics\n"," fig = px.scatter(df, x=\"x\", y=\"y\", size=\"Size\", size_max=40, template=\"simple_white\", labels={\"x\": \"\", \"y\": \"\"},\n"," hover_data={\"Topic\": True, \"Words\": True, \"Size\": True, \"x\": False, \"y\": False})\n"," fig.update_traces(marker=dict(color=\"#B0BEC5\", line=dict(width=2, color='DarkSlateGrey')))\n","\n"," # Update hover order\n"," fig.update_traces(hovertemplate=\"
\".join([\"Topic %{customdata[0]}\",\n"," \"Words: %{customdata[1]}\",\n"," \"Size: %{customdata[2]}\"]))\n","\n"," # Create a slider for topic selection\n"," steps = [dict(label=f\"Topic {topic}\", method=\"update\", args=get_color(topic)) for topic in topic_list]\n"," sliders = [dict(active=0, pad={\"t\": 50}, steps=steps)]\n","\n"," # Stylize layout\n"," fig.update_layout(\n"," title={\n"," 'text': \"Intertopic Distance Map\",\n"," 'y': .95,\n"," 'x': 0.5,\n"," 'xanchor': 'center',\n"," 'yanchor': 'top',\n"," 'font': dict(\n"," size=22,\n"," color=\"Black\")\n"," },\n"," width=width,\n"," height=height,\n"," hoverlabel=dict(\n"," bgcolor=\"white\",\n"," font_size=16,\n"," font_family=\"Rockwell\"\n"," ),\n"," xaxis={\"visible\": False},\n"," yaxis={\"visible\": False},\n"," sliders=sliders\n"," )\n","\n"," # Update axes ranges\n"," fig.update_xaxes(range=x_range)\n"," fig.update_yaxes(range=y_range)\n","\n"," # Add grid in a 'plus' shape\n"," fig.add_shape(type=\"line\",\n"," x0=sum(x_range) / 2, y0=y_range[0], x1=sum(x_range) / 2, y1=y_range[1],\n"," line=dict(color=\"#CFD8DC\", width=2))\n"," fig.add_shape(type=\"line\",\n"," x0=x_range[0], y0=sum(y_range) / 2, x1=x_range[1], y1=sum(y_range) / 2,\n"," line=dict(color=\"#9E9E9E\", width=2))\n"," fig.add_annotation(x=x_range[0], y=sum(y_range) / 2, text=\"D1\", showarrow=False, yshift=10)\n"," fig.add_annotation(y=y_range[1], x=sum(x_range) / 2, text=\"D2\", showarrow=False, xshift=10)\n"," fig.data = fig.data[::-1]\n","\n"," return fig"]},{"cell_type":"code","execution_count":14,"metadata":{},"outputs":[],"source":["from typing import List\n","import plotly.graph_objects as go\n","from sklearn.preprocessing import MinMaxScaler\n","def visualize_topics_modified(topic_model,\n"," topics: List[int] = None,\n"," top_n_topics: int = None,\n"," width: int = 650,\n"," height: int = 650) -> go.Figure:\n"," \"\"\" Visualize topics, their sizes, and their corresponding words\n","\n"," This visualization is highly inspired by LDAvis, a great visualization\n"," technique typically reserved for LDA.\n","\n"," Arguments:\n"," topic_model: A fitted BERTopic instance.\n"," topics: A selection of topics to visualize\n"," top_n_topics: Only select the top n most frequent topics\n"," width: The width of the figure.\n"," height: The height of the figure.\n","\n"," Usage:\n","\n"," To visualize the topics simply run:\n","\n"," ```python\n"," topic_model.visualize_topics()\n"," ```\n","\n"," Or if you want to save the resulting figure:\n","\n"," ```python\n"," fig = topic_model.visualize_topics()\n"," fig.write_html(\"path/to/file.html\")\n"," ```\n"," \n"," \"\"\"\n"," # Select topics based on top_n and topics args\n"," freq_df = topic_model.get_topic_freq()\n"," freq_df = freq_df.loc[freq_df.Topic != -1, :]\n"," if topics is not None:\n"," topics = list(topics)\n"," elif top_n_topics is not None:\n"," topics = sorted(freq_df.Topic.to_list()[:top_n_topics])\n"," else:\n"," topics = sorted(freq_df.Topic.to_list())\n","\n"," # Extract topic words and their frequencies\n"," topic_list = sorted(topics)\n"," frequencies = [topic_model.topic_sizes[topic] for topic in topic_list]\n"," words = [\" | \".join([word[0] for word in topic_model.get_topic(topic)[:5]]) for topic in topic_list]\n","\n"," # Embed c-TF-IDF into 2D\n"," all_topics = sorted(list(topic_model.get_topics().keys()))\n"," indices = np.array([all_topics.index(topic) for topic in topics])\n"," embeddings = topic_model.c_tf_idf.toarray()[indices]\n"," embeddings = MinMaxScaler().fit_transform(embeddings)\n"," embeddings = UMAP(n_neighbors=2, n_components=2, metric='hellinger').fit_transform(embeddings)\n","\n"," # Visualize with plotly\n"," df = pd.DataFrame({\"x\": embeddings[:, 0], \"y\": embeddings[:, 1],\n"," \"Topic\": topic_list, \"Words\": words, \"Size\": frequencies})\n"," return _plotly_topic_visualization(df, topic_list, width, height)"]},{"cell_type":"code","execution_count":45,"metadata":{},"outputs":[{"data":{"application/vnd.plotly.v1+json":{"config":{"plotlyServerURL":"https://plot.ly"},"data":[{"customdata":[[1,"japan | swevaus | hockey | sweden | judo",897],[2,"swimming | bbc | live | coverage | display weightlifting",501],[3,"banda | zambia | barbra | china | barbra banda",428],[4,"race | road | road race | carapaz | cyclingroad",248],[5,"kerr | sam | sam kerr | swevaus | matildas",195],[6,"vikas | boxing | krishan | vikas krishan | okazawa",183],[7,"gymnastics | max | men gymnastics | teamgb | whitlock",163],[8,"tennis | round | murray | singles | nagal",148],[9,"badminton | daddies | daddies badminton | ina | malaysia",128],[10,"basketball | 3x3 | 3x3 basketball | usa | france",84],[11,"butterfly | 100m | heat | 100m butterfly | women 100m",80],[12,"kosovo | distria | krasniqi | distria krasniqi | gold",78],[13,"yulo | carlos | carlos yulo | rings | caloy",75],[14,"ceremony | opening ceremony | opening | drones | pictograms",71],[15,"teamgb | come | gb | team gb | teamgb second",64],[16,"rule | remedy | remedy rule | butterfly | 100m butterfly",59],[17,"media_sai | iosindiaoff | railminindia iosindiaoff | indiasports railminindia | iosindiaoff virenrasquinha",51],[18,"chile | canada | beckie | janine | janine beckie",51],[19,"dressage | equestrian | horse | equestrian dressage | fry",49],[20,"clareburt | lewis | lewis clareburt | kalisz | fastest",49],[21,"penalty | penalty china | ref | referee | foul",47],[22,"chirag | chirag shetty | shetty | rankireddy | satwiksairaj",44],[23,"saturday | sleep | watch | hours | morning",41],[24,"sweaus | swe | aus | football | sweaus football",40],[25,"pistol | 10m | air | air pistol | saurabh",40],[26,"flying start | flying | start huge | huge congratulations | huge",37],[27,"archery | mixed | mixed team | korea | archery mixed",36],[28,"pakistan | uae | athletes | afghanistan | afghan",35],[29,"covid | covid 19 | paralympics | test | 19",35],[30,"athletes | best | olympians | proud athletes | congratulations joebrier99",35],[31,"asked | asked happier | india elated | happier start | stupendous",34],[32,"smith | brendon | swim | brendon smith | brendan smith",34],[33,"400m | men 400m | heat | swimming | men",31],[34,"boxing | boxers | delante | welterweights | officialvkyadav",31],[35,"mcgrail | peter mcgrail | peter | butdee | chatchai",30],[36,"malaysia | malaysiaboleh | malaysia malaysia | malaysiaboleh congrats | fighting malaysia",30],[37,"spain | waterpolo | water polo | polo | water",29],[38,"daddies | daddies daddies | daddies victory | mantap daddies | mantap",29],[39,"pen | pen swevaus | swevaus pen | swevaus | pen pen",28],[40,"potential | term quick | term | check roadmap | realgoldeninu got",27],[41,"qian | yang qian | yang | china | gold",27],[42,"grande | carapaz | hispanos | grande carapaz | los",26],[43,"etsy friday | weekend summer | selflove selfie | selflove | summer gift",25],[44,"thematildas | goaustralia | thematildas good | goaustralia thematildas | thematildas samkerr1",24],[45,"weightlifting let | let cheer | cheer india | cheer | let",23],[46,"kyereminator daterush | daterush | hisbella4 raymond_cupid | hisbella4 | watch hisbella4",23],[47,"ghana | nigeria | team | kenya | joseph",22],[48,"seto | daiya | daiya seto | shock | swimming",21],[49,"handball | portugal | egypt | esp | 27",21],[50,"giochiolimpici | forzaazzurri | forzaazzurri italianteam | giannimoscon | giannimoscon trattoredellavaldinon",21],[51,"peaty | adam | adam peaty | adam_peaty | pool",20],[52,"dreams | hardwork sacrifice | patience courage | years hardwork | sacrifice",20],[53,"taekwondo | kurt | kurt barbosa | jin | barbosa",19],[54,"fencing | samele | samele fencing | 12 | 2nd round",18]],"hovertemplate":"Topic %{customdata[0]}
Words: %{customdata[1]}
Size: %{customdata[2]}","legendgroup":"","marker":{"color":"#B0BEC5","line":{"color":"DarkSlateGrey","width":2},"size":[897,501,428,248,195,183,163,148,128,84,80,78,75,71,64,59,51,51,49,49,47,44,41,40,40,37,36,35,35,35,34,34,31,31,30,30,29,29,28,27,27,26,25,24,23,23,22,21,21,21,20,20,19,18],"sizemode":"area","sizeref":0.560625,"symbol":"circle"},"mode":"markers","name":"","orientation":"v","showlegend":false,"type":"scatter","x":[-13.534070014953613,-13.43475341796875,-13.780017852783203,2.4970903396606445,-13.658846855163574,0.9440622329711914,2.4113519191741943,9.545876502990723,9.834653854370117,-0.15922284126281738,4.1740312576293945,3.7046923637390137,4.136480331420898,1.8639707565307617,6.113151550292969,4.243809223175049,17.08327865600586,-0.38384220004081726,1.8444160223007202,-6.5163655281066895,-5.408000469207764,9.697861671447754,1.793425440788269,-13.837836265563965,3.9157350063323975,17.02362060546875,3.7781336307525635,-3.2362749576568604,-2.6957013607025146,-2.976090669631958,16.748470306396484,-6.558376789093018,-6.2666192054748535,1.117236852645874,1.3106281757354736,9.713653564453125,-0.21626847982406616,9.853917121887207,-5.495960235595703,1.9890059232711792,3.8818857669830322,3.962221145629883,-2.5921201705932617,6.027663230895996,16.78963279724121,5.816172122955322,-3.1374292373657227,-5.994676113128662,3.846796751022339,-3.273723840713501,6.201584815979004,-5.829665184020996,-2.9493539333343506,0.9988362193107605],"xaxis":"x","y":[-3.898340940475464,-3.997440814971924,-3.651298999786377,5.463512897491455,-3.772914409637451,5.19797945022583,5.423655033111572,14.715030670166016,14.306317329406738,10.584647178649902,20.484577178955078,13.661911964416504,20.47837257385254,5.735002040863037,17.128963470458984,20.39398765563965,0.9626004099845886,10.36011791229248,5.277482986450195,5.480177879333496,-0.3841247260570526,14.612643241882324,5.377246379852295,-3.593548536300659,13.452012062072754,0.8986217975616455,1.2680202722549438,-5.895647048950195,-5.5551252365112305,-5.644626617431641,0.6043182015419006,5.51975154876709,5.236416339874268,5.331894874572754,5.1778693199157715,14.248459815979004,10.527859687805176,14.247889518737793,-0.4740677773952484,5.551443099975586,13.485156059265137,1.4514774084091187,-5.774274826049805,17.18996810913086,0.6482469439506531,17.3884334564209,-5.310748100280762,4.967361927032471,1.335627555847168,-5.966228485107422,17.026586532592773,4.802278995513916,-5.52172327041626,5.595648288726807],"yaxis":"y"}],"layout":{"annotations":[{"showarrow":false,"text":"D1","x":-15.913511705398559,"y":8.348050498962401,"yshift":10},{"showarrow":false,"text":"D2","x":1.866129374504089,"xshift":10,"y":23.55726375579834}],"height":650,"hoverlabel":{"bgcolor":"white","font":{"family":"Rockwell","size":16}},"legend":{"itemsizing":"constant","tracegroupgap":0},"margin":{"t":60},"shapes":[{"line":{"color":"#CFD8DC","width":2},"type":"line","x0":1.866129374504089,"x1":1.866129374504089,"y0":-6.861162757873535,"y1":23.55726375579834},{"line":{"color":"#9E9E9E","width":2},"type":"line","x0":-15.913511705398559,"x1":19.645770454406737,"y0":8.348050498962401,"y1":8.348050498962401}],"sliders":[{"active":0,"pad":{"t":50},"steps":[{"args":[{"marker.color":[["red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 1","method":"update"},{"args":[{"marker.color":[["#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 2","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 3","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 4","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 5","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 6","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 7","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 8","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 9","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 10","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 11","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 12","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 13","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 14","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 15","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 16","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 17","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 18","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 19","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 20","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 21","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 22","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 23","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 24","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 25","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 26","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 27","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 28","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 29","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 30","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 31","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 32","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 33","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 34","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 35","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 36","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 37","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 38","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 39","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 40","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 41","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 42","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 43","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 44","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 45","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 46","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 47","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 48","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 49","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 50","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5","#B0BEC5"]]}],"label":"Topic 51","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5","#B0BEC5"]]}],"label":"Topic 52","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red","#B0BEC5"]]}],"label":"Topic 53","method":"update"},{"args":[{"marker.color":[["#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","#B0BEC5","red"]]}],"label":"Topic 54","method":"update"}]}],"template":{"data":{"bar":[{"error_x":{"color":"rgb(36,36,36)"},"error_y":{"color":"rgb(36,36,36)"},"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"barpolar":[{"marker":{"line":{"color":"white","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"carpet":[{"aaxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"baxis":{"endlinecolor":"rgb(36,36,36)","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"rgb(36,36,36)"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"choropleth"}],"contour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"contour"}],"contourcarpet":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"contourcarpet"}],"heatmap":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmap"}],"heatmapgl":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"heatmapgl"}],"histogram":[{"marker":{"line":{"color":"white","width":0.6}},"type":"histogram"}],"histogram2d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2d"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"histogram2dcontour"}],"mesh3d":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergeo"}],"scattergl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scattermapbox"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolar"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterpolargl"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"},"colorscale":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"rgb(237,237,237)"},"line":{"color":"white"}},"header":{"fill":{"color":"rgb(217,217,217)"},"line":{"color":"white"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":1,"tickcolor":"rgb(36,36,36)","ticks":"outside"}},"colorscale":{"diverging":[[0,"rgb(103,0,31)"],[0.1,"rgb(178,24,43)"],[0.2,"rgb(214,96,77)"],[0.3,"rgb(244,165,130)"],[0.4,"rgb(253,219,199)"],[0.5,"rgb(247,247,247)"],[0.6,"rgb(209,229,240)"],[0.7,"rgb(146,197,222)"],[0.8,"rgb(67,147,195)"],[0.9,"rgb(33,102,172)"],[1,"rgb(5,48,97)"]],"sequential":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]],"sequentialminus":[[0,"#440154"],[0.1111111111111111,"#482878"],[0.2222222222222222,"#3e4989"],[0.3333333333333333,"#31688e"],[0.4444444444444444,"#26828e"],[0.5555555555555556,"#1f9e89"],[0.6666666666666666,"#35b779"],[0.7777777777777778,"#6ece58"],[0.8888888888888888,"#b5de2b"],[1,"#fde725"]]},"colorway":["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"],"font":{"color":"rgb(36,36,36)"},"geo":{"bgcolor":"white","lakecolor":"white","landcolor":"white","showlakes":true,"showland":true,"subunitcolor":"white"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"light"},"paper_bgcolor":"white","plot_bgcolor":"white","polar":{"angularaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","radialaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"scene":{"xaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"zaxis":{"backgroundcolor":"white","gridcolor":"rgb(232,232,232)","gridwidth":2,"linecolor":"rgb(36,36,36)","showbackground":true,"showgrid":false,"showline":true,"ticks":"outside","zeroline":false,"zerolinecolor":"rgb(36,36,36)"}},"shapedefaults":{"fillcolor":"black","line":{"width":0},"opacity":0.3},"ternary":{"aaxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"baxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"},"bgcolor":"white","caxis":{"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside"}},"title":{"x":0.05},"xaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"},"yaxis":{"automargin":true,"gridcolor":"rgb(232,232,232)","linecolor":"rgb(36,36,36)","showgrid":false,"showline":true,"ticks":"outside","title":{"standoff":15},"zeroline":false,"zerolinecolor":"rgb(36,36,36)"}}},"title":{"font":{"color":"Black","size":22},"text":"Intertopic Distance Map","x":0.5,"xanchor":"center","y":0.95,"yanchor":"top"},"width":650,"xaxis":{"anchor":"y","domain":[0,1],"range":[-15.913511705398559,19.645770454406737],"title":{"text":""},"visible":false},"yaxis":{"anchor":"x","domain":[0,1],"range":[-6.861162757873535,23.55726375579834],"title":{"text":""},"visible":false}}}},"metadata":{},"output_type":"display_data"}],"source":["topic_model.visualize_topics()"]},{"cell_type":"markdown","metadata":{},"source":[" ## Transformers"]},{"cell_type":"markdown","metadata":{},"source":[" ### Sentiment Analysis"]},{"cell_type":"code","execution_count":56,"metadata":{},"outputs":[],"source":["imdb = pd.read_csv(r'data/imdb.csv')"]},{"cell_type":"code","execution_count":57,"metadata":{},"outputs":[{"data":{"text/plain":["'A wonderful little production. The filming technique is very unassuming- very old-time-BBC fashion and gives a comforting, and sometimes discomforting, sense of realism to the entire piece. The actors are extremely well chosen- Michael Sheen not only \"has got all the polari\" but he has all the voices down pat too! You can truly see the seamless editing guided by the references to Williams\\' diary entries, not only is it well worth the watching but it is a terrificly written and performed piece. A masterful production about one of the great master\\'s of comedy and his life. The realism really comes home with the little things: the fantasy of the guard which, rather than use the traditional \\'dream\\' techniques remains solid then disappears. It plays on our knowledge and our senses, particularly with the scenes concerning Orton and Halliwell and the sets (particularly of their flat with Halliwell\\'s murals decorating every surface) are terribly well done.'"]},"execution_count":57,"metadata":{},"output_type":"execute_result"}],"source":["sample = imdb['review'][1]\n","\n","# define list of regex patterns for replacement\n","list_of_replacements = [\n"," (r'
', ' '), \n"," ]\n","tokenised_sample = LIB.clean_text(sample, list_of_replacements, lowercase=False)\n","\n","tokenised_sample"]},{"cell_type":"code","execution_count":58,"metadata":{},"outputs":[],"source":["classifier_sentiment = pipeline(\n"," task='sentiment-analysis', \n"," model=r'C:\\Projects\\huggingface\\distilbert-base-uncased-finetuned-sst-2-english', \n"," return_all_scores=True\n"," )"]},{"cell_type":"code","execution_count":112,"metadata":{},"outputs":[{"data":{"text/plain":["[[{'label': 'NEGATIVE', 'score': 0.0007469278643839061},\n"," {'label': 'POSITIVE', 'score': 0.9992530941963196}]]"]},"execution_count":112,"metadata":{},"output_type":"execute_result"}],"source":["classifier_sentiment(tokenised_sample)\n"]},{"cell_type":"markdown","metadata":{},"source":[" ### Zero-Shot Classification"]},{"cell_type":"code","execution_count":66,"metadata":{},"outputs":[],"source":["classifier_zero_shot = pipeline(\n"," task='zero-shot-classification', \n"," model=r'C:\\Projects\\huggingface\\distilbart-mnli-12-1', \n"," return_all_scores=True\n"," )\n"]},{"cell_type":"code","execution_count":67,"metadata":{},"outputs":[{"data":{"text/plain":["{'sequence': 'A wonderful little production.

The filming technique is very unassuming- very old-time-BBC fashion and gives a comforting, and sometimes discomforting, sense of realism to the entire piece.

The actors are extremely well chosen- Michael Sheen not only \"has got all the polari\" but he has all the voices down pat too! You can truly see the seamless editing guided by the references to Williams\\' diary entries, not only is it well worth the watching but it is a terrificly written and performed piece. A masterful production about one of the great master\\'s of comedy and his life.

The realism really comes home with the little things: the fantasy of the guard which, rather than use the traditional \\'dream\\' techniques remains solid then disappears. It plays on our knowledge and our senses, particularly with the scenes concerning Orton and Halliwell and the sets (particularly of their flat with Halliwell\\'s murals decorating every surface) are terribly well done.',\n"," 'labels': ['comedy', 'romance', 'violent'],\n"," 'scores': [0.8236507773399353, 0.0954250767827034, 0.08092416822910309]}"]},"execution_count":67,"metadata":{},"output_type":"execute_result"}],"source":["classifier_zero_shot(sample, ['violent', 'romance', 'comedy'])"]},{"cell_type":"code","execution_count":47,"metadata":{},"outputs":[],"source":["# define list of regex patterns for replacement\n","list_of_replacements = [\n"," (r'
', ' '), \n"," ]\n","tokenised_sample = LIB.clean_text(sample, list_of_replacements, lowercase=False)"]},{"cell_type":"code","execution_count":115,"metadata":{},"outputs":[{"data":{"text/plain":["['A wonderful little production.',\n"," 'The filming technique is very unassuming- very old-time-BBC fashion and gives a comforting, and sometimes discomforting, sense of realism to the entire piece.',\n"," 'The actors are extremely well chosen- Michael Sheen not only \"has got all the polari\" but he has all the voices down pat too!',\n"," \"You can truly see the seamless editing guided by the references to Williams' diary entries, not only is it well worth the watching but it is a terrificly written and performed piece.\",\n"," \"A masterful production about one of the great master's of comedy and his life.\",\n"," \"The realism really comes home with the little things: the fantasy of the guard which, rather than use the traditional 'dream' techniques remains solid then disappears.\",\n"," \"It plays on our knowledge and our senses, particularly with the scenes concerning Orton and Halliwell and the sets (particularly of their flat with Halliwell's murals decorating every surface) are terribly well done.\"]"]},"execution_count":115,"metadata":{},"output_type":"execute_result"}],"source":["tokenised_sample = sent_tokenize(tokenised_sample)\n","tokenised_sample"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["# define list of regex patterns for replacement\n","list_of_replacements = [\n"," (r'
', ' '), \n"," ]\n"]},{"cell_type":"code","execution_count":61,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
reviewsentimentreview_clean
0One of the other reviewers has mentioned that ...positiveOne of the other reviewers has mentioned that ...
1A wonderful little production. <br /><br />The...positiveA wonderful little production. The filming t...
2I thought this was a wonderful way to spend ti...positiveI thought this was a wonderful way to spend ti...
3Basically there's a family where a little boy ...negativeBasically there's a family where a little boy ...
4Petter Mattei's \"Love in the Time of Money\" is...positivePetter Mattei's \"Love in the Time of Money\" is...
............
4995An interesting slasher film with multiple susp...negativeAn interesting slasher film with multiple susp...
4996i watched this series when it first came out i...positivei watched this series when it first came out i...
4997Once again Jet Li brings his charismatic prese...positiveOnce again Jet Li brings his charismatic prese...
4998I rented this movie, after hearing Chris Gore ...negativeI rented this movie, after hearing Chris Gore ...
4999This was a big disappointment for me. I think ...negativeThis was a big disappointment for me. I think ...
\n","

5000 rows × 3 columns

\n","
"],"text/plain":[" review sentiment \\\n","0 One of the other reviewers has mentioned that ... positive \n","1 A wonderful little production.

The... positive \n","2 I thought this was a wonderful way to spend ti... positive \n","3 Basically there's a family where a little boy ... negative \n","4 Petter Mattei's \"Love in the Time of Money\" is... positive \n","... ... ... \n","4995 An interesting slasher film with multiple susp... negative \n","4996 i watched this series when it first came out i... positive \n","4997 Once again Jet Li brings his charismatic prese... positive \n","4998 I rented this movie, after hearing Chris Gore ... negative \n","4999 This was a big disappointment for me. I think ... negative \n","\n"," review_clean \n","0 One of the other reviewers has mentioned that ... \n","1 A wonderful little production. The filming t... \n","2 I thought this was a wonderful way to spend ti... \n","3 Basically there's a family where a little boy ... \n","4 Petter Mattei's \"Love in the Time of Money\" is... \n","... ... \n","4995 An interesting slasher film with multiple susp... \n","4996 i watched this series when it first came out i... \n","4997 Once again Jet Li brings his charismatic prese... \n","4998 I rented this movie, after hearing Chris Gore ... \n","4999 This was a big disappointment for me. I think ... \n","\n","[5000 rows x 3 columns]"]},"execution_count":61,"metadata":{},"output_type":"execute_result"}],"source":["imdb_df = imdb.copy()\n","imdb_df['review_clean'] = imdb_df['review'].apply(lambda x: LIB.clean_text(x, list_of_replacements, lowercase=False, ignorecase=False))\n","imdb_df"]},{"cell_type":"code","execution_count":62,"metadata":{},"outputs":[],"source":["# create empty list\n","sample_data_sentences = []\n","# sentence tokenise text\n","imdb_df['review_clean'].apply(lambda x: sample_data_sentences.append(sent_tokenize(x)))\n","# flatten list of lists\n","sample_data_sentences = [item for sublist in sample_data_sentences for item in sublist]\n","# keep sentences that have length of three or more\n","sample_data_sentences = [sentence for sentence in sample_data_sentences if len(sentence) >= 3]"]},{"cell_type":"code","execution_count":64,"metadata":{},"outputs":[],"source":["candidate_labels = [\n"," 'action',\n"," 'romance',\n"," 'comedy',\n"," 'horror',\n","]"]},{"cell_type":"code","execution_count":70,"metadata":{},"outputs":[{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
zero_shot_sequencezero_shot_labels_scoreszero_shot_actionzero_shot_comedyzero_shot_horrorzero_shot_romancezero_shot_labelzero_shot_score
0One of the other reviewers has mentioned that ...{'action': 0.6853489279747009, 'comedy': 0.222...0.6853490.2229310.0673380.024382action0.685349
1They are right, as this is exactly what happen...{'action': 0.730780839920044, 'horror': 0.2363...0.7307810.0238470.2363630.009009action0.730781
2The first thing that struck me about Oz was it...{'action': 0.5329533815383911, 'horror': 0.463...0.5329530.0021170.4633690.001561action0.532953
3Trust me, this is not a show for the faint hea...{'horror': 0.4558163583278656, 'action': 0.439...0.4398400.0768900.4558160.027454horror0.455816
4This show pulls no punches with regards to dru...{'action': 0.8655638098716736, 'horror': 0.079...0.8655640.0500770.0792260.005133action0.865564
5Its is hardcore, in the classic use of the word.{'action': 0.5196256041526794, 'horror': 0.460...0.5196260.0123310.4602860.007758action0.519626
6It is called OZ as that is the nickname given ...{'action': 0.8266003131866455, 'horror': 0.081...0.8266000.0786280.0819990.012773action0.826600
7It focuses mainly on Emerald City, an experime...{'action': 0.7694476246833801, 'comedy': 0.139...0.7694480.1399000.0832260.007427action0.769448
8Em City is home to many..Aryans, Muslims, gang...{'action': 0.8719258308410645, 'comedy': 0.072...0.8719260.0723740.0472740.008426action0.871926
9I would say the main appeal of the show is due...{'action': 0.7466148138046265, 'comedy': 0.144...0.7466150.1449600.0715960.036830action0.746615
10Forget pretty pictures painted for mainstream ...{'action': 0.4521128237247467, 'horror': 0.337...0.4521130.0157170.3378110.194359action0.452113
11The first episode I ever saw struck me as so n...{'horror': 0.5516934990882874, 'action': 0.425...0.4253500.0146880.5516930.008269horror0.551693
12Not just violence, but injustice (crooked guar...{'horror': 0.7784998416900635, 'action': 0.209...0.2097570.0087030.7785000.003040horror0.778500
13A wonderful little production.{'action': 0.9091125130653381, 'comedy': 0.064...0.9091130.0646870.0022440.023957action0.909113
14The filming technique is very unassuming- very...{'action': 0.7546261548995972, 'horror': 0.117...0.7546260.0781920.1178390.049343action0.754626
15The actors are extremely well chosen- Michael ...{'comedy': 0.5998440980911255, 'action': 0.335...0.3356020.5998440.0303820.034172comedy0.599844
16You can truly see the seamless editing guided ...{'action': 0.5568342804908752, 'comedy': 0.289...0.5568340.2892700.0647270.089169action0.556834
17A masterful production about one of the great ...{'comedy': 0.9911661744117737, 'action': 0.007...0.0070560.9911660.0010170.000760comedy0.991166
18The realism really comes home with the little ...{'action': 0.8654075264930725, 'comedy': 0.052...0.8654080.0527710.0389050.042917action0.865408
19It plays on our knowledge and our senses, part...{'comedy': 0.4329946041107178, 'action': 0.357...0.3578750.4329950.0702210.138909comedy0.432995
20I thought this was a wonderful way to spend ti...{'comedy': 0.9786663055419922, 'action': 0.019...0.0198530.9786660.0005070.000974comedy0.978666
21The plot is simplistic, but the dialogue is wi...{'comedy': 0.5518938302993774, 'action': 0.256...0.2562600.5518940.1589490.032898comedy0.551894
22While some may be disappointed when they reali...{'action': 0.6372777819633484, 'comedy': 0.170...0.6372780.1709840.1244170.067321action0.637278
23This was the most I'd laughed at one of Woody'...{'comedy': 0.9777419567108154, 'action': 0.019...0.0199520.9777420.0011090.001197comedy0.977742
24While I've never been impressed with Scarlet J...{'action': 0.8563410043716431, 'comedy': 0.105...0.8563410.1059490.0065690.031141action0.856341
25This may not be the crown jewel of his career,...{'comedy': 0.9901475310325623, 'action': 0.005...0.0055340.9901480.0028910.001427comedy0.990148
26Basically there's a family where a little boy ...{'horror': 0.6384614109992981, 'comedy': 0.220...0.1393390.2207960.6384610.001404horror0.638461
27This movie is slower than a soap opera... and ...{'action': 0.4205889403820038, 'horror': 0.390...0.4205890.1719080.3904700.017033action0.420589
28OK, first of all when you're going to make a f...{'action': 0.5613948702812195, 'horror': 0.339...0.5613950.0625950.3391320.036878action0.561395
29As a drama the movie is watchable.{'horror': 0.4866945147514343, 'action': 0.461...0.4610130.0215520.4866950.030741horror0.486695
30Parents are divorcing & arguing like in real l...{'action': 0.9169880747795105, 'horror': 0.068...0.9169880.0110320.0680610.003919action0.916988
31And then we have Jake with his closet which to...{'action': 0.46266070008277893, 'comedy': 0.28...0.4626610.2838090.2315960.021935action0.462661
32I expected to see a BOOGEYMAN similar movie, a...{'action': 0.5169137120246887, 'horror': 0.349...0.5169140.0734160.3498240.059847action0.516914
333 out of 10 just for the well playing parents ...{'comedy': 0.5327867865562439, 'action': 0.415...0.4154200.5327870.0404230.011371comedy0.532787
34As for the shots with Jake: just ignore them.{'action': 0.720186173915863, 'comedy': 0.2216...0.7201860.2216560.0456860.012472action0.720186
35Petter Mattei's \"Love in the Time of Money\" is...{'romance': 0.812362015247345, 'action': 0.137...0.1373240.0418100.0085050.812362romance0.812362
36Mr. Mattei offers us a vivid portrait about hu...{'action': 0.7270628809928894, 'comedy': 0.104...0.7270630.1048620.0684570.099618action0.727063
37This is a movie that seems to be telling us wh...{'action': 0.9017294049263, 'horror': 0.047020...0.9017290.0391800.0470200.012070action0.901729
38This being a variation on the Arthur Schnitzle...{'action': 0.9923602938652039, 'comedy': 0.003...0.9923600.0039890.0009370.002714action0.992360
39Each one is connected in one way, or another t...{'comedy': 0.43570438027381897, 'action': 0.41...0.4186520.4357040.1070910.038552comedy0.435704
40Stylishly, the film has a sophisticated luxuri...{'romance': 0.42508044838905334, 'action': 0.4...0.4049860.1256580.0442750.425080romance0.425080
41We are taken to see how these people live and ...{'action': 0.6110133528709412, 'horror': 0.306...0.6110130.0603760.3062880.022323action0.611013
42The only thing one gets out of all these souls...{'action': 0.568047285079956, 'horror': 0.2410...0.5680470.1292040.2410480.061700action0.568047
43A big city is not exactly the best place in wh...{'action': 0.6180484890937805, 'horror': 0.166...0.6180480.1333940.1662540.082303action0.618048
44The acting is good under Mr. Mattei's direction.{'action': 0.9632675051689148, 'comedy': 0.015...0.9632680.0157290.0107870.010217action0.963268
45Steve Buscemi, Rosario Dawson, Carol Kane, Mic...{'action': 0.5722494721412659, 'comedy': 0.290...0.5722490.2903620.0919910.045398action0.572249
46We wish Mr. Mattei good luck and await anxious...{'action': 0.7560404539108276, 'comedy': 0.103...0.7560400.1034440.0585620.081953action0.756040
47Probably my all-time favorite movie, a story o...{'action': 0.9280282258987427, 'romance': 0.04...0.9280280.0165370.0126800.042755action0.928028
48It just never gets old, despite my having seen...{'action': 0.42955777049064636, 'comedy': 0.39...0.4295580.3974400.1250130.047988action0.429558
49Paul Lukas' performance brings tears to my eye...{'romance': 0.496847003698349, 'action': 0.346...0.3463760.0976240.0591530.496847romance0.496847
\n","
"],"text/plain":[" zero_shot_sequence \\\n","0 One of the other reviewers has mentioned that ... \n","1 They are right, as this is exactly what happen... \n","2 The first thing that struck me about Oz was it... \n","3 Trust me, this is not a show for the faint hea... \n","4 This show pulls no punches with regards to dru... \n","5 Its is hardcore, in the classic use of the word. \n","6 It is called OZ as that is the nickname given ... \n","7 It focuses mainly on Emerald City, an experime... \n","8 Em City is home to many..Aryans, Muslims, gang... \n","9 I would say the main appeal of the show is due... \n","10 Forget pretty pictures painted for mainstream ... \n","11 The first episode I ever saw struck me as so n... \n","12 Not just violence, but injustice (crooked guar... \n","13 A wonderful little production. \n","14 The filming technique is very unassuming- very... \n","15 The actors are extremely well chosen- Michael ... \n","16 You can truly see the seamless editing guided ... \n","17 A masterful production about one of the great ... \n","18 The realism really comes home with the little ... \n","19 It plays on our knowledge and our senses, part... \n","20 I thought this was a wonderful way to spend ti... \n","21 The plot is simplistic, but the dialogue is wi... \n","22 While some may be disappointed when they reali... \n","23 This was the most I'd laughed at one of Woody'... \n","24 While I've never been impressed with Scarlet J... \n","25 This may not be the crown jewel of his career,... \n","26 Basically there's a family where a little boy ... \n","27 This movie is slower than a soap opera... and ... \n","28 OK, first of all when you're going to make a f... \n","29 As a drama the movie is watchable. \n","30 Parents are divorcing & arguing like in real l... \n","31 And then we have Jake with his closet which to... \n","32 I expected to see a BOOGEYMAN similar movie, a... \n","33 3 out of 10 just for the well playing parents ... \n","34 As for the shots with Jake: just ignore them. \n","35 Petter Mattei's \"Love in the Time of Money\" is... \n","36 Mr. Mattei offers us a vivid portrait about hu... \n","37 This is a movie that seems to be telling us wh... \n","38 This being a variation on the Arthur Schnitzle... \n","39 Each one is connected in one way, or another t... \n","40 Stylishly, the film has a sophisticated luxuri... \n","41 We are taken to see how these people live and ... \n","42 The only thing one gets out of all these souls... \n","43 A big city is not exactly the best place in wh... \n","44 The acting is good under Mr. Mattei's direction. \n","45 Steve Buscemi, Rosario Dawson, Carol Kane, Mic... \n","46 We wish Mr. Mattei good luck and await anxious... \n","47 Probably my all-time favorite movie, a story o... \n","48 It just never gets old, despite my having seen... \n","49 Paul Lukas' performance brings tears to my eye... \n","\n"," zero_shot_labels_scores zero_shot_action \\\n","0 {'action': 0.6853489279747009, 'comedy': 0.222... 0.685349 \n","1 {'action': 0.730780839920044, 'horror': 0.2363... 0.730781 \n","2 {'action': 0.5329533815383911, 'horror': 0.463... 0.532953 \n","3 {'horror': 0.4558163583278656, 'action': 0.439... 0.439840 \n","4 {'action': 0.8655638098716736, 'horror': 0.079... 0.865564 \n","5 {'action': 0.5196256041526794, 'horror': 0.460... 0.519626 \n","6 {'action': 0.8266003131866455, 'horror': 0.081... 0.826600 \n","7 {'action': 0.7694476246833801, 'comedy': 0.139... 0.769448 \n","8 {'action': 0.8719258308410645, 'comedy': 0.072... 0.871926 \n","9 {'action': 0.7466148138046265, 'comedy': 0.144... 0.746615 \n","10 {'action': 0.4521128237247467, 'horror': 0.337... 0.452113 \n","11 {'horror': 0.5516934990882874, 'action': 0.425... 0.425350 \n","12 {'horror': 0.7784998416900635, 'action': 0.209... 0.209757 \n","13 {'action': 0.9091125130653381, 'comedy': 0.064... 0.909113 \n","14 {'action': 0.7546261548995972, 'horror': 0.117... 0.754626 \n","15 {'comedy': 0.5998440980911255, 'action': 0.335... 0.335602 \n","16 {'action': 0.5568342804908752, 'comedy': 0.289... 0.556834 \n","17 {'comedy': 0.9911661744117737, 'action': 0.007... 0.007056 \n","18 {'action': 0.8654075264930725, 'comedy': 0.052... 0.865408 \n","19 {'comedy': 0.4329946041107178, 'action': 0.357... 0.357875 \n","20 {'comedy': 0.9786663055419922, 'action': 0.019... 0.019853 \n","21 {'comedy': 0.5518938302993774, 'action': 0.256... 0.256260 \n","22 {'action': 0.6372777819633484, 'comedy': 0.170... 0.637278 \n","23 {'comedy': 0.9777419567108154, 'action': 0.019... 0.019952 \n","24 {'action': 0.8563410043716431, 'comedy': 0.105... 0.856341 \n","25 {'comedy': 0.9901475310325623, 'action': 0.005... 0.005534 \n","26 {'horror': 0.6384614109992981, 'comedy': 0.220... 0.139339 \n","27 {'action': 0.4205889403820038, 'horror': 0.390... 0.420589 \n","28 {'action': 0.5613948702812195, 'horror': 0.339... 0.561395 \n","29 {'horror': 0.4866945147514343, 'action': 0.461... 0.461013 \n","30 {'action': 0.9169880747795105, 'horror': 0.068... 0.916988 \n","31 {'action': 0.46266070008277893, 'comedy': 0.28... 0.462661 \n","32 {'action': 0.5169137120246887, 'horror': 0.349... 0.516914 \n","33 {'comedy': 0.5327867865562439, 'action': 0.415... 0.415420 \n","34 {'action': 0.720186173915863, 'comedy': 0.2216... 0.720186 \n","35 {'romance': 0.812362015247345, 'action': 0.137... 0.137324 \n","36 {'action': 0.7270628809928894, 'comedy': 0.104... 0.727063 \n","37 {'action': 0.9017294049263, 'horror': 0.047020... 0.901729 \n","38 {'action': 0.9923602938652039, 'comedy': 0.003... 0.992360 \n","39 {'comedy': 0.43570438027381897, 'action': 0.41... 0.418652 \n","40 {'romance': 0.42508044838905334, 'action': 0.4... 0.404986 \n","41 {'action': 0.6110133528709412, 'horror': 0.306... 0.611013 \n","42 {'action': 0.568047285079956, 'horror': 0.2410... 0.568047 \n","43 {'action': 0.6180484890937805, 'horror': 0.166... 0.618048 \n","44 {'action': 0.9632675051689148, 'comedy': 0.015... 0.963268 \n","45 {'action': 0.5722494721412659, 'comedy': 0.290... 0.572249 \n","46 {'action': 0.7560404539108276, 'comedy': 0.103... 0.756040 \n","47 {'action': 0.9280282258987427, 'romance': 0.04... 0.928028 \n","48 {'action': 0.42955777049064636, 'comedy': 0.39... 0.429558 \n","49 {'romance': 0.496847003698349, 'action': 0.346... 0.346376 \n","\n"," zero_shot_comedy zero_shot_horror zero_shot_romance zero_shot_label \\\n","0 0.222931 0.067338 0.024382 action \n","1 0.023847 0.236363 0.009009 action \n","2 0.002117 0.463369 0.001561 action \n","3 0.076890 0.455816 0.027454 horror \n","4 0.050077 0.079226 0.005133 action \n","5 0.012331 0.460286 0.007758 action \n","6 0.078628 0.081999 0.012773 action \n","7 0.139900 0.083226 0.007427 action \n","8 0.072374 0.047274 0.008426 action \n","9 0.144960 0.071596 0.036830 action \n","10 0.015717 0.337811 0.194359 action \n","11 0.014688 0.551693 0.008269 horror \n","12 0.008703 0.778500 0.003040 horror \n","13 0.064687 0.002244 0.023957 action \n","14 0.078192 0.117839 0.049343 action \n","15 0.599844 0.030382 0.034172 comedy \n","16 0.289270 0.064727 0.089169 action \n","17 0.991166 0.001017 0.000760 comedy \n","18 0.052771 0.038905 0.042917 action \n","19 0.432995 0.070221 0.138909 comedy \n","20 0.978666 0.000507 0.000974 comedy \n","21 0.551894 0.158949 0.032898 comedy \n","22 0.170984 0.124417 0.067321 action \n","23 0.977742 0.001109 0.001197 comedy \n","24 0.105949 0.006569 0.031141 action \n","25 0.990148 0.002891 0.001427 comedy \n","26 0.220796 0.638461 0.001404 horror \n","27 0.171908 0.390470 0.017033 action \n","28 0.062595 0.339132 0.036878 action \n","29 0.021552 0.486695 0.030741 horror \n","30 0.011032 0.068061 0.003919 action \n","31 0.283809 0.231596 0.021935 action \n","32 0.073416 0.349824 0.059847 action \n","33 0.532787 0.040423 0.011371 comedy \n","34 0.221656 0.045686 0.012472 action \n","35 0.041810 0.008505 0.812362 romance \n","36 0.104862 0.068457 0.099618 action \n","37 0.039180 0.047020 0.012070 action \n","38 0.003989 0.000937 0.002714 action \n","39 0.435704 0.107091 0.038552 comedy \n","40 0.125658 0.044275 0.425080 romance \n","41 0.060376 0.306288 0.022323 action \n","42 0.129204 0.241048 0.061700 action \n","43 0.133394 0.166254 0.082303 action \n","44 0.015729 0.010787 0.010217 action \n","45 0.290362 0.091991 0.045398 action \n","46 0.103444 0.058562 0.081953 action \n","47 0.016537 0.012680 0.042755 action \n","48 0.397440 0.125013 0.047988 action \n","49 0.097624 0.059153 0.496847 romance \n","\n"," zero_shot_score \n","0 0.685349 \n","1 0.730781 \n","2 0.532953 \n","3 0.455816 \n","4 0.865564 \n","5 0.519626 \n","6 0.826600 \n","7 0.769448 \n","8 0.871926 \n","9 0.746615 \n","10 0.452113 \n","11 0.551693 \n","12 0.778500 \n","13 0.909113 \n","14 0.754626 \n","15 0.599844 \n","16 0.556834 \n","17 0.991166 \n","18 0.865408 \n","19 0.432995 \n","20 0.978666 \n","21 0.551894 \n","22 0.637278 \n","23 0.977742 \n","24 0.856341 \n","25 0.990148 \n","26 0.638461 \n","27 0.420589 \n","28 0.561395 \n","29 0.486695 \n","30 0.916988 \n","31 0.462661 \n","32 0.516914 \n","33 0.532787 \n","34 0.720186 \n","35 0.812362 \n","36 0.727063 \n","37 0.901729 \n","38 0.992360 \n","39 0.435704 \n","40 0.425080 \n","41 0.611013 \n","42 0.568047 \n","43 0.618048 \n","44 0.963268 \n","45 0.572249 \n","46 0.756040 \n","47 0.928028 \n","48 0.429558 \n","49 0.496847 "]},"execution_count":70,"metadata":{},"output_type":"execute_result"}],"source":["# get prediction on list of inputs\n","zero_shot_classification = classifier_zero_shot(list(sample_data_sentences[:50]), candidate_labels)\n","# get prediction on list of inputs\n","# zero_shot_classification = zero_shot_pipline(list(sample_data_sentences[:100]), candidate_labels)\n","# get prediction on list of inputs\n","# zero_shot_classification = zero_shot_pipline(manual_samples, candidate_labels)\n","\n","# convert transformer model zero shot classification prediction into dataframe\n","zero_shot_results_sample = LIB.convert_zero_shot_classification_output_to_dataframe(zero_shot_classification)\n","\n","# replace scores with nan where input is blank\n","for col in zero_shot_results_sample.iloc[:,1:]:\n"," zero_shot_results_sample[col] = np.where(zero_shot_results_sample['sequence'] == ' ', np.nan, zero_shot_results_sample[col])\n","\n","# add prefix\n","zero_shot_results_sample = zero_shot_results_sample.add_prefix('zero_shot_')\n","\n","# display\n","zero_shot_results_sample"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":[]}],"metadata":{"kernelspec":{"display_name":"Python 3.9.12 64-bit","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.12"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"d6e4ddf0402096041728e45a812bc03d0f328e458bea32880eee4360afcbdb03"}}},"nbformat":4,"nbformat_minor":2}