Prerequisites:
Knowledge of Python, including completion of Data Analysis and Visualization with Pandas and Network Analysis and Visualization with NetworkX, or equivalent experience with Python data structures and Matplotlib.
Overview:
Standard data visualizations are often static "snapshots" of your code. To truly explore complex datasets, researchers need tools that allow them to change parameters and see results instantly without re-running code cells.
This workshop introduces ipywidgets (or "Jupyter Widgets"), the standard framework for adding interactive HTML controls to Jupyter Notebooks. You will learn how to build custom user interfaces—using sliders, buttons, and dropdowns—that are directly linked to your Python functions. This approach allows you to turn a standard research notebook into an interactive dashboard for exploring your data dynamically.
Topics Include:
- Widget Fundamentals: Adding basic controls (e.g. number sliders, dropdown selectors, checkboxes, etc.) to your Notebook cells.
- The interact Function: Using simple decorators to wrap your existing plotting functions with interactive UI elements and make your plots update themselves when you modify their UI inputs.
- Linking Data to UI: Connecting widget values to Pandas filtering logic to slice DataFrames on the fly.
- Interactive Network Exploration: Using widgets to control NetworkX graphs dynamically.
- Layout and Styling: Organizing multiple widgets to create a clean, functional research interface.
- State Management: Understanding how to use observe and link to synchronize multiple widgets and complex plot updates.
Contact information:
Please email mrsmith@rice.edu or researchdata@rice.edu if you have questions about the Data@Rice workshop series.
Visit the Data@Rice workshop page for more information about other Python and data courses at Rice.