Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import requests | |
| import pandas as pd | |
| margins_css = """ | |
| <style> | |
| section.stMain .block-container { | |
| max-width: 85%; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| section.main .block-container { | |
| max-width: 85%; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| </style> | |
| """ | |
| def setsidebar(): | |
| authors_info = """ | |
| [**Jean-Bernard Hayet**](mailto:jbhayet@cimat.mx) | |
| Departamento de Ciencias de la Computación | |
| [CIMAT](https://www.cimat.mx/) | |
| """ | |
| st.sidebar.info(authors_info) | |
| # Get a map of Mexico states | |
| mx_estados_url = 'https://raw.githubusercontent.com/angelnmara/geojson/master/mexicoHigh.json' | |
| mx_estados_geo = requests.get(mx_estados_url).json() | |
| # Incorporate data | |
| sheet_name = 'Egresados' # replace with your own sheet name | |
| sheet_id = '1HCAawlP0Y2H0YOymCij7gC9ACJ3_kVI2' # replace with your sheet's ID | |
| url = f"https://docs.google.com/spreadsheets/d/{sheet_id}/gviz/tq?tqx=out:csv&sheet={sheet_name}" | |
| students_df = pd.read_csv(url) | |
| # Default height for plots | |
| defaultHeight = 600 |