Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jimena vega s patch 1 #157

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0ec70a6
Update streamlit_app.py
JimenaVegaS Nov 19, 2023
496ea05
streamlit_app.py
JimenaVegaS Nov 19, 2023
cb948b0
streamlit_app.py
JimenaVegaS Nov 21, 2023
6068bcd
streamlit_app.py
JimenaVegaS Nov 21, 2023
56a9b44
streamlit_app.py
JimenaVegaS Nov 21, 2023
6812312
streamlit_app.py
JimenaVegaS Nov 21, 2023
02f2175
streamlit_app.py
JimenaVegaS Nov 21, 2023
887ff1a
streamlit_app.py
JimenaVegaS Nov 21, 2023
9437232
streamlit_app.py
JimenaVegaS Nov 21, 2023
14b377f
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
718774a
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
6c8abc4
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
258e3cd
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
e053b59
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
c6a7e71
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
d5f40ce
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
39f39bf
Update streamlit_app.py
JimenaVegaS Nov 21, 2023
06707ff
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
69f26ad
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
c5b26bc
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
aa83e16
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
72e42de
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
222200d
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
e5a2b11
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
31f5a5e
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
fc315ec
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
444d20a
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
ad800ee
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
d08faab
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
7ad0319
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
1da9b9c
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
d9da899
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
3c6052b
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
0d687e1
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
b3c4f92
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
7d24ffa
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
6671cfc
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
6665918
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
fedbc7f
Add files via upload
JimenaVegaS Nov 22, 2023
4c3fb3c
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
1c36bfa
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
89a3636
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
4cea5d0
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
920ee0b
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
3e2fc73
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
ed50db1
Update streamlit_app.py
JimenaVegaS Nov 22, 2023
e271bc7
Update README.md
Fx2048 Nov 22, 2023
8070afc
imagen
JimenaVegaS Nov 24, 2023
49c80ec
imagen
JimenaVegaS Nov 24, 2023
59535aa
imagen
JimenaVegaS Nov 24, 2023
f371e7a
imagen
JimenaVegaS Nov 24, 2023
3944404
imagen
JimenaVegaS Nov 24, 2023
1bc1bc7
imagen
JimenaVegaS Nov 24, 2023
917d847
Update streamlit_app.py
JimenaVegaS Nov 24, 2023
22a888e
Update streamlit_app.py
JimenaVegaS Nov 24, 2023
03364ae
Update streamlit_app.py
JimenaVegaS Nov 24, 2023
6a4f657
Create Prueba.py
JimenaVegaS Nov 24, 2023
d2f2670
i
JimenaVegaS Nov 24, 2023
49ad95b
Update streamlit_app.py
JimenaVegaS Nov 24, 2023
003617d
Merge branch 'JimenaVegaS-patch-1' into master
JimenaVegaS Nov 24, 2023
3630ca9
Merge pull request #2 from JimenaVegaS/master
JimenaVegaS Nov 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Brigitte.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Prueba.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Welcome to Streamlit!

#Programación Avanzada,proyecto de donantes de órganos :)
Edit `/streamlit_app.py` to customize this app to your heart's desire. :heart:

If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
Expand Down
116 changes: 84 additions & 32 deletions streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,92 @@
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st
import pandas as pd
import numpy as np
from PIL import Image

"""
# Welcome to Streamlit!

Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
forums](https://discuss.streamlit.io).
#hola
titulos_pestanas = ['Página principal', 'Nacional', 'Internacional','Departamentos','Países','Sobre nosotras']
pestaña1, pestaña2, pestaña3, pestaña4, pestaña5, pestaña6 = st.tabs(titulos_pestanas)

In the meantime, below is an example of what you can do with just a few lines of code:
"""
with pestaña1:
st.title('Análisis de Población identificada con DNI de mayor de edad por condición de donante de órganos')
st.write("Texto sobre donación de órganos")
st.write("")
with st.container():
left_column, right_column = st.columns(2)
with left_column:
st.button("Nacional", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
with right_column:
st.button("Internacional", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
st.caption('Los datos de este gráfico no están actualizados a la fecha actual.')

num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
with pestaña2:
st.title("Condición de donante de órganos a nivel nacional")
with st.container():
left_column, right_column = st.columns(2)
with left_column:
st.button("2022", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
with right_column:
st.button("2023", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
st.caption("Los datos de este gráfico no están actualizados a la fecha actual.")

indices = np.linspace(0, 1, num_points)
theta = 2 * np.pi * num_turns * indices
radius = indices
with pestaña3:
st.title ("Condición de donante de órganos a nivel internacional")
with st.container():
left_column, right_column = st.columns(2)
with left_column:
st.button(" 2022", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
with right_column:
st.button(" 2023", type="secondary")
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
st.bar_chart(chart_data)
st.caption("Los datos de este gráfico no están actualizados a la fecha actual.")

x = radius * np.cos(theta)
y = radius * np.sin(theta)
with pestaña4:
st.title("Condición de donante de órganos por departamentos")
option = st.selectbox(
"Elije un departamento",
("Amazonas", "Áncash","Apurímac","Arequipa","Ayacucho","Cajamarca","Cusco","Huancavelica","Huánuco","Ica","Junín","La Libertad","Lambayeque","Lima","Loreto","Madre de Dios","Moquegua","Pasco","Piura","Puno","San Martín","Tacna","Tumbes","Callao","Ucayali"))
option2 = st.selectbox(
"Elige un año",
("2022","2023"))

df = pd.DataFrame({
"x": x,
"y": y,
"idx": indices,
"rand": np.random.randn(num_points),
})
with pestaña5:
st.title("Condición de donante de órganos por países")
option3 = st.selectbox(
"Elige un continente",
("África","América","Asia","Europa","Oceanía"))
if option3 == "África":
option5 = st.selectbox(
"Elige un país",
("Argelia","Costa de Marfil"))
elif option3 == "América":
option5 = st.selectbox(
"Elige un país",
("Antillas Holandesas","Argentina"))
elif option3 == "Asia":
option5 = st.selectbox(
"Elige un país",
("Catar","India"))
elif option3 == "Europa":
option5 = st.selectbox(
"ELige un país",
("Alemania","Austria"))
elif option3 == "Oceanía":
option5 = st.selectbox(
"Elige un país",
("Australia","Nueva Zelanda"))
option4 = st.selectbox(
"Elige un año",
(" 2022","2023"))

st.altair_chart(alt.Chart(df, height=700, width=700)
.mark_point(filled=True)
.encode(
x=alt.X("x", axis=None),
y=alt.Y("y", axis=None),
color=alt.Color("idx", legend=None, scale=alt.Scale()),
size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
))
st.link_button("Para más información de click aquí", "https://www.datosabiertos.gob.pe/dataset/reniec-poblaci%C3%B3n-identificada-con-dni-de-mayor-de-edad-por-condici%C3%B3n-de-donante-de-%C3%B3rganos")