Created
May 23, 2018 19:34
-
-
Save sergiolucero/315df13449f1fb633c0e0766a8a5db77 to your computer and use it in GitHub Desktop.
Evolución semanal atención TGR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gdf=pysqldf('SELECT semana,Oficina,AVG(Tiempo_Ate_Min) AS TiempoAtencion, \ | |
| AVG(Tiempo_Esp_Min) AS TiempoEspera,\ | |
| COUNT(DISTINCT(Ejecutivo)) AS Personal FROM df GROUP BY Oficina, semana') | |
| atencion = gdf.pivot("Oficina","semana", "TiempoAtencion") | |
| espera = gdf.pivot("Oficina","semana", "TiempoEspera") | |
| ejecutivos = gdf.pivot("Oficina","semana", "Personal") # on same plot? | |
| f, (ax1, ax2, ax3) = plt.subplots(1,3,figsize=(20, 8),sharey=True) | |
| sns.heatmap(atencion, cmap="rainbow",fmt="d",ax=ax1) | |
| sns.heatmap(espera, cmap="rainbow",fmt="d",ax=ax2) | |
| sns.heatmap(ejecutivos, cmap="YlGnBu",fmt="d",ax=ax3) | |
| ax1.set_title('Tiempo Atencion Promedio'); ax2.set_title('Tiempo Espera Promedio') | |
| ax3.set_title('Cantidad Ejecutivos Promedio') |
Author
sergiolucero
commented
May 23, 2018

Falta estimar afluencia, demanda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment