Skip to content

Commit

Permalink
Merge branch 'main' into TPTM-bug-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgman authored Jul 10, 2024
2 parents 76dab34 + ca28664 commit d253d4c
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# shiny-python-workshop-2023
# Reactive Web Dashboards with Shiny Course

This is the repository for the 2023 Shiny for Python workshop.
This is the repository for Talk Python's [Reactive Web Dashboards with Shiny course](https://training.talkpython.fm/courses/reactive-web-dashboards-with-shiny-for-data-science). This 2-hour video course is 100% free so [visit the course page and sign up](https://training.talkpython.fm/courses/reactive-web-dashboards-with-shiny-for-data-science) if you're interested.

# Installation

Expand Down
9 changes: 5 additions & 4 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ project:
website:
title: "Shiny for Python Workshop"
sidebar:
style: docked
contents:
- section: "Exercises"
contents:
- exercises/1-hello-world.qmd
- exercises/2-basic-ui.qmd
- exercises/3-reactivity.qmd
- exercises/4-dynamic-ui.qmd
- exercises/5-reactive-effect.qmd
- exercises/4-dynamic-ui.qmd

navbar:
tools:
- icon: github
href: https://github.com/posit-dev/shiny-python-workshop-2023
- icon: fa-dicord
href: https://discord.gg/AQVJzG2bnN
href: https://github.com/talkpython/reactive-web-dashboards-with-shiny-course
left:
- href: index.qmd
text: Home
Expand All @@ -29,8 +28,10 @@ filters:
format:
html:
theme: cosmo
margin-right: 0px
css: styles.css
toc: true
toc-location: left



2 changes: 2 additions & 0 deletions exercises/1-hello-world.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: "Hello Shiny"
---

These exercises should be done after Chapter 2 of the course.

```{python}
# | echo: false
import os
Expand Down
2 changes: 1 addition & 1 deletion exercises/2-basic-ui.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Basic UI"
---

These exercises should be done after Chapter 3 of the course.
```{python}
# | echo: false
import os
Expand Down
2 changes: 1 addition & 1 deletion exercises/3-reactivity.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Reactivity"
---

These exercises should be done after Chapter 4 of the course.
```{python}
# | echo: false
import os
Expand Down
2 changes: 1 addition & 1 deletion exercises/4-dynamic-ui.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Dynamic UI"
---

These exercises should be done after Chapter 5 of the course.
```{python}
# | echo: false
import os
Expand Down
2 changes: 1 addition & 1 deletion exercises/5-reactive-effect.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Reactive Effects"
---

These exercises should be done after Chapter 6 of the course.
```{python}
# | echo: false
import os
Expand Down
4 changes: 2 additions & 2 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def find_problem_set_folder(base_path, target_path):
block = QuartoPrint(
[
formatted_title,
"::::: {.column-screen-inset}",
"::::: {.column-screen-inset-right}",
"::: {.panel-tabset}",
"## Goal",
]
Expand All @@ -156,7 +156,7 @@ def find_problem_set_folder(base_path, target_path):
)
block.append("## {{< bi github >}}")
block.append(
f"The source code for this exercise is [here](https://github.com/posit-dev/shiny-python-workshop-2023/tree/main/{path})."
f"The source code for this exercise is [here](https://github.com/talkpython/reactive-web-dashboards-with-shiny-course/tree/main/{path})."
)

block.append(":::")
Expand Down
24 changes: 12 additions & 12 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: "Shiny for Python Workshop"
title: "Reactive Web Dashboards with Shiny"
---

::: callout-warning
This website is under active development and will be unstable.
:::
# Web applications without the headaches

# Background
Shiny lets you build beautiful, performant dashboards and web applications without a lot of effort.
Instead of manually managing callback functions and application state, Shiny uses a reactive framework to automatically determine the best way to run your application.
This means that you can focus on communicating insights rather than debugging your web application.

This workshop is aimed at people who are somewhat familiar with doing data analysis in Python, but do not have much of a background in Shiny. If you are brand new to Python we recommend spending a bit of time familiarizing yourself with the following topics before the workshop:
This site is a companion to the [Talk Python video course](https://training.talkpython.fm/purchase/access_code/f3180ced-3d5c-42ad-a318-e81e6355a4fd), and provides some exercises that let you practice what you learned in the videos.

- How to install Python packages in a virtual environment
- How to do basic data manipulation with pandas or polars
- How to draw plots
- How to clone a repository with git
# Who is this course for?

This course assumes that you have a basic understanding of Python, but does not require any knowledge of web applications, JavaScript, or HTML.
If you can read a CSV, manipulate data, and draw a plot in Python, then you have everything you need to start building a Shiny application.

# Setup

Expand All @@ -26,14 +26,14 @@ As a result you should be able to work through all of the examples in the worksh

## 2) Locally with VS Code

While Shinylive is great, it likely isn't the environment you'll use to develop Shiny apps, and so it makes sense to set up VS Code and run the examples locally. To do this follow these steps before the workshop:
While Shinylive is great, it likely isn't the environment you'll use to develop Shiny apps, and so it makes sense to set up VS Code and run the examples locally. To do this, follow these steps before the workshop:

1) Install [VS Code](https://code.visualstudio.com/)
2) Install the [Shiny extension for VS Code](https://marketplace.visualstudio.com/items?itemName=posit.shiny)
3) Clone the repository with `git clone https://github.com/rstudio/shiny-python-workshop-2023.git`, or alternately download the repository as a zip file: \
![](images/git-download-button.png){width="287"}
4) Navigate to the project directory and create a new virtual environment with `python3 -m venv .venv`
5) Set your python interpreter to the virtual environment with `CMD + SHIFT + P` \> `Select Interpreter`
5) Set your Python interpreter to the virtual environment with `CMD + SHIFT + P` > `Select Interpreter`
6) Open a new terminal prompt, which should switch to `(.venv)`
7) Install the relevant packages with `pip install -r requirements.txt`

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ shiny
shinylive
pandas
plotnine
seaborn
seaborn
jupyter

0 comments on commit d253d4c

Please sign in to comment.