-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
33 lines (28 loc) · 796 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import streamlit as st
import numpy as np
import pandas as pd
from utils.plot import *
from utils.data_source import *
from utils.map import *
from utils.constantes import *
from utils.tendance import trajectory_cases
import os
from typing import Dict, Callable
data = load_data()
st.sidebar.title("Covid-19 Visualizer")
page = st.sidebar.selectbox(
label="Sommaire",
options=[
"Données",
"Graphiques temporels",
"Graphiques de tendance",
"Distribution géographique ",
],
)
page_function_mapping: Dict[str, Callable[[pd.DataFrame], None]] = {
"Données": show_data,
"Graphiques temporels": line_plots,
"Graphiques de tendance": trajectory_cases,
"Distribution géographique ": chloropleth_maps
}
page_function_mapping[page](data)