This example shows how to create interactive visualizations using Plotly to analyze and present talent data extracted from CVs. Build professional dashboards to understand your candidate pipeline.
import pandas as pdimport plotly.express as px# Assume 'resultados' is available from batch processingdf = pd.DataFrame(resultados)print(f"TOTAL STUDENTS ANALYZED: {len(df)}")
Create a hierarchical view of talent by university and specialization:
if not df.empty: # CHART 1: Talent Map (University > Profile) if 'universidad' in df.columns and 'tipo_perfil' in df.columns: fig1 = px.sunburst( df, path=['universidad', 'tipo_perfil'], title="Youth Talent Distribution (University > Specialty)", color='universidad', color_discrete_sequence=px.colors.qualitative.Bold ) fig1.show()else: print("No data extracted. Make sure batch processing ran successfully.")
Show the structured data alongside visualizations:
print("\n📊 INTERNSHIP DATABASE:")cols_a_mostrar = [ 'nombre', 'universidad', 'ciclo_actual', 'tipo_perfil', 'stack_principal', 'potencial_contratacion']# Only show columns that existcols_finales = [c for c in cols_a_mostrar if c in df.columns]# Display the DataFramefrom IPython.display import displaydisplay(df[cols_finales])
Here’s a complete example combining multiple visualizations:
import pandas as pdimport plotly.express as pxfrom plotly.subplots import make_subplotsimport plotly.graph_objects as go# Load datadf = pd.DataFrame(resultados)print(f"TOTAL STUDENTS ANALYZED: {len(df)}")if not df.empty: # Create figure with subplots from plotly.subplots import make_subplots # Chart 1: Sunburst - University distribution if 'universidad' in df.columns and 'tipo_perfil' in df.columns: fig1 = px.sunburst( df, path=['universidad', 'tipo_perfil'], title="Youth Talent Distribution (University > Specialty)", color='universidad', color_discrete_sequence=px.colors.qualitative.Bold ) fig1.show() # Chart 2: Bar - Academic ranking if 'ciclo_actual' in df.columns: df_sorted = df.sort_values(by='ciclo_actual') fig2 = px.bar( df_sorted, x='nombre', y='ciclo_actual', color='tipo_perfil', title="Academic Ranking: Students by Cycle and Profile", text='ciclo_actual', labels={'ciclo_actual': 'Academic Cycle', 'nombre': 'Student'} ) fig2.update_traces(textposition='outside') fig2.update_layout(xaxis_tickangle=-45) fig2.show() # Display final table print("\n📊 INTERNSHIP DATABASE:") cols_a_mostrar = [ 'nombre', 'universidad', 'ciclo_actual', 'tipo_perfil', 'stack_principal', 'potencial_contratacion' ] cols_finales = [c for c in cols_a_mostrar if c in df.columns] display(df[cols_finales])else: print("No data extracted. Ensure batch processing ran without errors.")