john-student-2025)my-streamlit-app (no spaces!)https://github.com/YOUR-USERNAME/my-streamlit-app (change the last part of the URL to your repo name if different). key (period/dot) on your keyboard
.com to .dev in the URL: https://github.dev/YOUR-USERNAME/my-streamlit-appThis is where you are going to edit your code.
Everytime you edit your code you need to save it and commit it to github. Then wait a few seconds and your app will be deployed with the changes you made.
data.csvMonth,Sales,Expenses
January,12000,8000
February,15000,9000
March,13000,8500
April,17000,10000
May,19000,11000
June,21000,12000
Ctrl+S (Windows) or Cmd+S (Mac) to saverequirements.txtstreamlit
pandas
plotly
Ctrl+S / Cmd+S to saveapp.pyimport streamlit as st
import pandas as pd
import plotly.express as px
# Page configuration
st.set_page_config(page_title="Sales Dashboard", page_icon="š", layout="wide")
# Title
st.title("š Monthly Sales Dashboard")
st.markdown("---")
# Load data
@st.cache_data
def load_data():
df = pd.read_csv('data.csv')
return df
df = load_data()
# Display the data
st.subheader("š Raw Data")
st.dataframe(df, use_container_width=True)
st.markdown("---")
# Create two columns
col1, col2 = st.columns(2)
with col1:
st.subheader("š Sales vs Expenses")
fig1 = px.line(df, x='Month', y=['Sales', 'Expenses'],
title='Monthly Trend',
markers=True)
st.plotly_chart(fig1, use_container_width=True)
with col2:
st.subheader("š° Profit Analysis")
df['Profit'] = df['Sales'] - df['Expenses']
fig2 = px.bar(df, x='Month', y='Profit',
title='Monthly Profit',
color='Profit',
color_continuous_scale='RdYlGn')
st.plotly_chart(fig2, use_container_width=True)
# Interactive filters
st.markdown("---")
st.subheader("š Filter Data")
selected_month = st.selectbox("Select a month:", df['Month'].tolist())
month_data = df[df['Month'] == selected_month].iloc[0]
st.metric("Sales", f"${month_data['Sales']:,}")
st.metric("Expenses", f"${month_data['Expenses']:,}")
st.metric("Profit", f"${month_data['Profit']:,}")
Ctrl+S / Cmd+S to saveInitial commit - Streamlit apphttps://github.com/YOUR-USERNAME/my-streamlit-appREADME.mdapp.pydata.csvrequirements.txtYOUR-USERNAME/my-streamlit-appmain (should be default)app.pyhttps://YOUR-USERNAME-my-streamlit-app-app-RANDOM.streamlit.appWhat you'll see:
To update your app:
https://github.dev/YOUR-USERNAME/my-streamlit-appapp.py or data.csvCtrl+S / Cmd+S)App won't deploy?
app.py, data.csv, requirements.txtCan't push code?
App crashes?
app.py or missing fileā GitHub account and public repository ā Web-based code editor (github.dev) ā CSV data file ā Python Streamlit app with interactive visualizations ā Deployed live web application ā Shareable URL for their project
All without installing anything on their computer!