Analytics
Resources tagged Analytics#
[84] Reproducible Publications with Python and Quarto (Thomas Mock)
Join our Meetup group: https://www.meetup.com/data-umbrella
Tom Mock: Reproducible Publications with Python and Quarto
Resources#
Full transcript#
https://blog.dataumbrella.org/quarto-blog
About the Event#
Quarto is an open-source scientific and technical publishing system that builds on standard markdown with features essential for scientific communication. The system has support for reproducible embedded computations, equations, citations, crossrefs, figure panels, callouts, advanced layouts, and more. In this talk we’ll explore the use of Quarto with Python, describing both integration with IPython/Jupyter and the Quarto VS Code extension. Users can author Jupyter notebooks or documents as plain text markdowns with code in Python, R, Julia or Observable. Quarto includes the ability to publish high-quality articles, reports, presentations, websites, blogs, and books in HTML, PDF, MS Word, ePub, Reveal.js and more.
Timestamps#
00:00 Data Umbrella introduction 03:41 Introduce the speaker, Thomas Mock 04:14 Thomas begins 05:14 RStudio is now Posit 05:55 What is Quarto? 07:13 Origins of Quarto 08:31 Goal: Computation Document 09:09 Goal: Scientific Markdown 10:03 Goal: Single Source Publishing 10:33 Simple example of what Quarto looks like (YAML, Markup, Markdown, code chunks) 12:29 Simple example: multi-format (output formats: html, pdf, docx, epub, pptx, revealjs) 13:16 List of what is possible with Quarto 14:02 So, what is Quarto: quarto is a language-agnostic command line interface (CLI) 15:27 Basic Quarto workflow 16:43 Difference between “render” and “preview” 17:16 IPython 18:43 Stored/frozen computation and reproducibility 20:36 A *.qmd is a plain text file 21:28 Quarto doesn’t have to be plain text 22:12 Rendering pipeline 22:57 What to do with my existing .ipynb? 24:23 Comfort of your own workspace: JupyterLab, Visual Studio Code, 25:00 Auto-completion in RStudio + VSCode 26:01 Quarto Extensions and Visual / Live Editor 27:19 Quarto, unified document layout 29:54 Quarto, unified syntax across Markdown and code 31:11 Built-in vs Custom 33:01 Extending Quarto with Extensions 33:51 Interactivity, Jupyter Widgets (with plots, matplotlib, etc) 34:15 Interactivity, Observable 35:01 Interactivity, on the fly Observable “widgets” 36:24 Parameters - one source, many outputs 37:36 Rendering with parameters 38:27 Quarto Publish 38:57 Quarto, crafted with love and care (the team) 39:30 Quarto Resources (installation) 39:44 Quarto resources: video tutorials 40:13 Q: Can Quarto documents be shared like Overleaf docs and can users import article templates for specific journals into Quarto? 41:39 new! Manuscript option to bundle an entire project together (bundle can be shipped to a journal) 42:48 Q: Is Quarto git friendly? 43:28 Q: Has Quarto already been used in published scientific work? 44:14 publishing books with Quarto 44:22 Q: Any general suggestions for outputting to docx (Word)? 45:20 Q: Any tips on how Quarto can help conda users? 46:14 Q: Can you use GitHub Actions with Quarto? 47:18 Q: Can you have individual environments for each blog post? 49:50 Download CLI (command line interface) for Quarto 51:10 Example Gallery 51:44 nbdev project 53:14 Quarto blog, Shinylive extension 55:12 Q: How can I use Quarto to write scientific papers?
About the Speaker: Tom Mock#
- Twitter: https://twitter.com/thomas_mock
- GitHub: https://github.com/jthomasmock
#python #quarto #rstats
[79] Create a Python Web App Using Shiny (Gordon Shotwell)
Join our Meetup group for more events! https://www.meetup.com/data-umbrella
Resources#
- website for presentation: https://shiny.rstudio.com/py/
- https://shiny.rstudio.com/py/docs/reactive-mutable.html
- https://www.shinyapps.io/
- https://huggingface.co/new-space
- https://shiny.rstudio.com/py/docs/shinylive.html
- https://shiny.rstudio.com/py/api/reactive.poll.html#shiny.reactive.poll
About the Event#
Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack. If you want to develop a python web application you usually need to choose between simple, limited frameworks like Streamlit and more extensible frameworks like Dash. This can cause a lot of problems if you get started with a simple framework but then discover that you need to refactor your application to accommodate the next user request. Shiny for Python differs from other frameworks because it has tremendous range. You can build a small application in a few minutes with the confidence that the framework can handle much more complex problems. In this workshop we will go through the core limitations of Streamlit, and build a Shiny app which avoids those limitations.
Timestamps#
00:00 Welcome
00:23 Reshama introduces Data Umbrella
03:45 Reshama introduces Gordon Shotwell
04:21 Gordon Shotwell begins
04:29 The motivation to develop Shiny for Python
06:05 The main strength of both the R and Python library
06:56 What Gordon Shotwell will build during his presentation
07:25 Shiny documentation website
08:01 QuickStart for R users showing differences between the R and Python libraries
08:44 All the function reference in Shiny
09:08 Demo starts
09:50 Virtual environment
10:36 How to start shiny app in the terminal
11:15 Install shiny extension in VS Code which makes it easier to preview the web app
11:36 How the output function works on the preview app to execute
12:22 Penguin dataset description for the demo
12:45 Modules/submodules shiny app is built on
13:04 How to add a sidebar layout (sidebar, panel sidebar and panel main)
13:43 How to read in the data and the output functions
14:31 How to define some server logic
14:59 The conventional shiny rule
16:30 Use of slide input
17:50 Where the reactive magic comes in
19:30 Important note on what can really slow down your shiny app
20:14 Importance of Python data copy method when using external dataset
21:01 Important note to avoid dependency inside the render function
21:30 Q&A
29:35 Adding a plot to the output: The UI sides
30:12 Adding a plot to the output: The render sides
32:16 The core principle of reactivity in which you do not want to repeat yourself
33:26 Reactivate calculation concept which allows you to store intermediate values in one place
37:24 Q&A
38:53 Reactive calculations and rendering functions
39:30 Side-effects or user effect. Another class of interactions
41:18 How to tell reactive effect what it should respond to or what events to watch before executing
41:53 How to update the data filter in the side-effect function
42:22 The second important pattern for shiny
43:00 One of the important things to pay attention to once you start learning/using shiny
44:45 Series of Q&A until the end of the video. Some response includes live demo
01:01:03 Gordon Shotwell ends his presentation
01:01:17 Reshama closes the session
About the Speaker#
Gordon Shotwell is a Software Engineer at Posit. He’s been using Shiny to solve business problems for the past ten years.
- LinkedIn: https://www.linkedin.com/in/gshotwell/
Key Links#
- Transcript: https://github.com/data-umbrella/event-transcripts/blob/main/2023/78-gordon-shiny.md
- Meetup Event: https://www.meetup.com/data-umbrella/events/292848290/
- Video: https://youtu.be/pXidQWYY14w
#python #deployment