Spaces:
Sleeping
Sleeping
File size: 914 Bytes
fe475ff 829bd84 fe475ff 40fc29c fe475ff 40fc29c fe475ff |
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 |
import os
import sys
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..", "frontend"))
sys.path.append(src_directory)
import streamlit as st
import streamlit_functions
st.title("World Population Data")
csv_file = "./world_population.csv"
# csv_file = st.file_uploader("Choose a CSV file", type=['csv'])
if csv_file:
choosen_data = streamlit_functions.choose_data_view(st)
if choosen_data == "Show All Continents":
option = choosen_data.replace(" ","")
streamlit_functions.display_contents(option, st)
if choosen_data == "Show All Countries":
option = choosen_data.replace(" ","")
streamlit_functions.display_contents(option, st)
if choosen_data == "Show Continent Stats":
streamlit_functions.display_stats(st,choosen_data)
if choosen_data == "Show Country Stats":
streamlit_functions.display_stats(st,choosen_data)
|