a cool app about nyc
To upload files, please first save the app
import streamlit as st
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.orm import DeclarativeBase
class Base(DeclarativeBase):
pass
st.title("Cool NYC App")
st.write("Welcome to our cool NYC app! Here you can explore various features related to New York City.")
# Display random NYC data
nyc_data = pd.DataFrame(
np.random.randn(10, 2) / [100, 100] + [40.7128, -74.0060],
columns=["lat", "lon"]
)
st.map(nyc_data)
# Store random data into SQLite database
engine = create_engine("sqlite:///nyc_data.sqlite")
Base.metadata.create_all(bind=engine)
with Session(engine) as session:
session.add_n(your_object) # Assume 'your_object' is defined before
session.commit()
st.write("Data has been stored in the SQLite database!")
st.write("Explore more features soon!")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?