if show_clusters: cluster_labels = Inspector.cluster_labels(data=df_results, span=3, t=step_clustering) #df_results['cluster']=df_results.agent.apply(lambda i: cluster_labels[i]) else: cluster_labels = [] # MAIN PAGE st.subheader('Opinion trajectories of all agents') fig = Inspector.detailed_plots( config=configrun, data=df_results, highlight_agents=[agent_focus], highlight_range=[step_focus - 1, step_focus + 1], clusters=cluster_labels, legend=None) st.pyplot(fig) #st.write(df_results.head()) st.subheader('Perspective of the selected agent') #st.dataframe(Inspector.get_persp(data=df_results, display_agent=agent_focus, step=step_focus)) components.html(html_perspective, height=600, scrolling=True) st.subheader('Parameters')