Skip to content

Commit c41c828

Browse files
committed
refine lessons and break up final lesson into 2
1 parent c8dc960 commit c41c828

File tree

8 files changed

+381
-327
lines changed

8 files changed

+381
-327
lines changed

_episodes/02-data-wrangling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ df_final
121121
Finally, we will export the dataframe to a CSV file.
122122

123123
~~~
124-
df_final.to_csv("data/gapminder_tidy.csv", index=False)
124+
df_final.to_csv("Data/gapminder_tidy.csv", index=False)
125125
~~~
126126
{: .language-python}
127127

_episodes/03-create-visualizations.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Create Visualizations"
3-
teaching: 15
3+
teaching: 10
44
exercises: 0
55
questions:
66
- "How can I create an interactive visualization using Plotly Express?"
@@ -15,6 +15,13 @@ keypoints:
1515

1616
Now that our data is in a tidy format, we can start creating some visualizations. Let's start by creating a new notebook (make sure to select the `dataviz` kernel in the Launcher) and renaming it `data_visualizations.ipynb`.
1717

18+
Let's make our first cell into a markdown cell, and give this notebook a title:
19+
20+
~~~
21+
# Data Visualizations
22+
~~~
23+
{: .source}
24+
1825
## Import our newly tidy data
1926

2027
First, we need to import pandas and Plotly Express, and then read in our dataframe.

_episodes/04-create-streamlit-app.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Create Streamlit App"
2+
title: "Create the Streamlit App"
33
teaching: 10
44
exercises: 0
55
questions:
@@ -68,7 +68,7 @@ We can add other text to our app with `st.write()` and other functions.
6868
Now, let's go ahead and add the visualization of GDP in Oceania that we created in the previous lesson. We can copy and paste the code over from our Jupyter Notebook - but leave out the `fig.show()`. We're going to use a different function to display the plot in the Streamlit app: `st.plotly_chart()`
6969

7070
~~~
71-
df = pd.read_csv("data/gapminder_tidy.csv")
71+
df = pd.read_csv("Data/gapminder_tidy.csv")
7272
df_gdp_o = df.query("continent=='Oceania' & metric=='gdpPercap'")
7373
7474
title = "GDP for countries in Oceania"
@@ -93,7 +93,7 @@ import plotly.express as px
9393
st.set_page_config(layout="wide")
9494
st.title("Interact with Gapminder Data")
9595
96-
df = pd.read_csv("data/gapminder_tidy.csv")
96+
df = pd.read_csv("Data/gapminder_tidy.csv")
9797
df_gdp_o = df.query("continent=='Oceania' & metric=='gdpPercap'")
9898
9999
title = "GDP for countries in Oceania"
@@ -107,7 +107,7 @@ You know the drill! Save, switch over to the Streamlit app, and click "Rerun".
107107
We now have a web application that can allow you to share your interactive visualizations.
108108

109109
> ## Share your app online
110-
> Right now, our app only lives on our computer. Like Jupyter Lab, the app is displaying in a web browser but has the URL `localhost:####` (where #### represent the port number).
110+
> Right now, our app only lives on our computer. Like Jupyter Lab, the app is displaying in a web browser but has the URL `localhost:####` (where #### represents the port number).
111111
> To easily make this app public and shared online, you can sign up for a [Streamlit Sharing](https://streamlit.io/sharing-sign-up) account. This will let you share up to 3 apps.
112112
> All you need (in addition to an account) is to have your code in a public GitHub repo.
113113
> Detailed instructions can be found in [Streamlit's Documentation](https://docs.streamlit.io/en/stable/deploy_streamlit_app.html)

_episodes/05-add-widgets.md

Lines changed: 0 additions & 319 deletions
This file was deleted.

0 commit comments

Comments
 (0)