def write(year): util.write_header() st.markdown("---") util.write_title("- DISCORD") discord_text_df = get_discord_text(year) discord_voice_df = get_discord_voice(year) if discord_text_df.empty: st.write("EM DESENVOLVIMENTO") return None messages = discord_text_df["messages"].sum() minutes = round(discord_voice_df["speaking_minutes"].sum(), 2) hours = round(minutes / 60, 2) days = round(hours / 24, 2) year = round(days / 365, 1) st.markdown( f"## - No Discord tivemos um total de **{(messages)}** enviadas ") st.markdown( f"## - Além disso, nas messas de bar e canais de áudios tivemos **{(minutes)} minutos** de conversas " ) st.markdown( f"## - Com um total de **{hours} horas** de áudios, o que dá **{days} dias** consecutivo ouvindo tudo !!" ) plot_discord(discord_text_df, discord_voice_df)
def write(year): util.write_header() st.markdown("---") util.write_title("- FEEDBACKS") feedbacks_df = get_event_feedbacks(year) if feedbacks_df.empty: st.write("EM DESENVOLVIMENTO") return None total = feedbacks_df.shape[0] st.markdown( f"## Tivemos um total de **{total}** respostas ao formulário de feedback!!!" ) plot_who(feedbacks_df)
def write(year): util.write_header() st.markdown("---") util.write_title("- LIVES YOUTUBE") lives_df = get_lives_tutorials(year) if lives_df.empty: st.write("EM DESENVOLVIMENTO") return None views = lives_df["Views"].sum() hours = round(lives_df["Watch time (hours)"].sum(), 2) days = round(lives_df["Watch time (days)"].sum(), 2) year = round(days / 365, 1) st.markdown(f"## - Tivemos um total de **{int(views)}** visualizações ") st.markdown( f"## - Com um total de **{hours} horas** de visualizações, o que dá **{days} dias** consecutivo assistindo tudo !!" ) st.markdown( f"## **ISSO DÁ PRATICAMENTE {year} ANOS DE CONTÉUDO SEM PARAR !!!**") plot_youtube(lives_df)
def write(year): util.write_header() st.markdown("---") util.write_title("- PALESTRAS") tickest_df = get_event_tickets(year) if tickest_df.empty: return None col = "Em qual país você reside?" tickest_df[col] = tickest_df[col].str.strip() tickest_df.loc[ tickest_df[col] == "Por favor, que formulário mais sem sentido. Querem também saber que orientação sexual vou querer ter na próxima encarnação? Isso não tem sentido.", col, ] = "N/A" tickest_df.loc[tickest_df[col] == ",", col] = "N/A" tickest_df.loc[tickest_df[col] == "PNR", col] = "N/A" tickest_df.loc[tickest_df[col] == "Prefiro não responder.", col] = "N/A" tickest_df.loc[tickest_df[col] == "Alemanha, Berlin", col] = "Alemanha" tickest_df.loc[tickest_df[col] == "Canada", col] = "Canadá" tickest_df.loc[tickest_df[col] == "Dublin, Irlanda", col] = "Irlanda" tickest_df.loc[tickest_df[col] == "Ireland", col] = "Irlanda" tickest_df.loc[tickest_df[col] == "irlanda", col] = "Irlanda" tickest_df.loc[tickest_df[col] == "Italy", col] = "Itália" tickest_df.loc[tickest_df[col] == "Mocambique", col] = "Moçambique" tickest_df.loc[tickest_df[col] == "Países Baixo", col] = "Países Baixos" tickest_df.loc[tickest_df[col] == "Perú", col] = "Peru" tickest_df.loc[tickest_df[col] == "US", col] = "EUA" tickest_df.loc[tickest_df[col] == "USA", col] = "EUA" tickest_df.loc[tickest_df[col] == "Usa", col] = "EUA" tickest_df.loc[tickest_df[col] == "Estados Unidos", col] = "EUA" tickest_df.loc[tickest_df[col] == "United States", col] = "EUA" tickest_df.loc[tickest_df[col] == "CZ", col] = "República Tcheca" tickest_df.loc[tickest_df[col] == "United Kingdom", col] = "Reino Unido" tickest_df.loc[tickest_df[col] == "colombia", col] = "Colombia" tickest_df.loc[tickest_df[col] == "portugal", col] = "Portugal" tickest_df.loc[tickest_df[col] == "PT", col] = "Portugal" tickest_df.loc[tickest_df[col] == "thailand", col] = "Tailandia" tickest_df.loc[tickest_df[col] == "France", col] = "França" tickest_df.loc[tickest_df[col] == "Japao", col] = "Japão" OPTIONS = ["Inscrições", "Quem", "Onde", "Python"] st.sidebar.title("Dados de Inscrições do Evento") select_column = st.sidebar.selectbox("", OPTIONS) if select_column == "Quem": st.markdown(f"## Detalhes sobre as Quem") plot_who(tickest_df) elif select_column == "Onde": st.markdown(f"## Detalhes sobre as Onde") plot_where(tickest_df) elif select_column == "Python": st.markdown(f"## Detalhes sobre as Python") plot_python(tickest_df) elif select_column == "Inscrições": total = tickest_df.shape[0] st.markdown( f"## Tivemos um total de **{total}** inscrições para o evento !!!") st.markdown(f"## Selecione alguma opção na barra lateral em:") st.markdown(f"## `Dados de Inscrições do Evento` para ver detalhes.") else: st.write("Escolha uma opção")
def write(year=None): util.write_title("- PyBR2020 - ") st.text("") util.render_img("./assets/pybr2020-logo-colorido.png", "2020")
def write(year=None): util.write_title("- PyBR2021 - ") util.render_img("./assets/pybr2021-logo-abreviado.png", "2021")
def write(year=None): util.write_title("- Python Brasil") st.text("") util.render_img("./assets/PyBrOpenData-alternativa.png", "Python Brasil Open Data") st.text("")