Urgent Sankey Diagram Creation

Замовник: AI | Опубліковано: 15.12.2025
Бюджет: 250 $

can you help me create a sankey diagram in the next eight hours? l have the data, l just need someone to imput this data to plotly or any similar software to create a beatuful sankey diagram import plotly.graph_objects as go # ---------------------------------------------------------------------- # 1. DEFINICIÓN DE LOS NODOS (ETAPAS) # Nodos temporales (Meses) y Nodos de Destino (Tipos de Centro) nodos = [ 'Mes 1 (Sep)', # Índice 0 'Mes 2 (Oct)', # Índice 1 'Mes 3 (Nov)', # Índice 2 'Mes 4 (Dic)', # Índice 3 'Mes 5 (Ene)', # Índice 4 'Mes 6 (Feb)', # Índice 5 'IES Generalista', # Índice 6 'CIFP Público', # Índice 7 'Concertado/Privado'# Índice 8 ] # ---------------------------------------------------------------------- # 2. DATOS DE FLUJO (EJEMPLO LÓGICO BASADO EN H1) # ÍNDICES: [M1->IES, M1->CIFP, M1->Conc, M2->IES, M2->CIFP, M2->Conc, ...] fuente = [ 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 ] destino = [6, 7, 8, 6, 7, 8, 6, 7, 8, 6, 7, 8, 6, 7, 8, 6, 7, 8 ] # VALORES: Número de profesores noveles contratados en ese flujo. valor = [ 2, 3, 20, # Mes 1: Mucho Concertado/Poco IES 5, 10, 5, # Mes 2: Énfasis en CIFP 7, 5, 3, # Mes 3: Más equilibrado 5, 2, 3, # Mes 4: Flujo reducido 6, 3, 1, # Mes 5 4, 1, 0 # Mes 6 ] # ---------------------------------------------------------------------- # 3. CREACIÓN DEL DIAGRAMA fig = go.Figure(data=[go.Sankey( node = dict( pad = 15, thickness = 20, line = dict(color = "black", width = 0.5), label = nodos, color = ["#4A90E2", "#50C878", "#FFD700", "#FF6347", "#8A2BE2", "#3CB371", "#1A5276", "#1E8449", "#C0392B"] ), link = dict( source = fuente, target = destino, value = valor, hovertemplate="Flujo: %{value} profesores<br>Origen: %{source.label}<br>Destino: %{target.label}<extra></extra>" ))]) fig.update_layout( title_text="Flujo de Inserción Laboral del Profesorado Novel (Modelo Hipotético)", font_size=10, autosize=False, width=900, height=600 ) # Guardar la gráfica para su uso en el informe fig.write_html("sankey_insercion_laboral_final.html") print("Gráfica de Sankey guardada como sankey_insercion_laboral_final.html")