Tutorials¶
This section contains step-by-step tutorials and examples for using TBsim. These tutorials range from basic introductions to advanced modeling scenarios.
Getting Started¶
Core Modeling¶
TB Modeling:
- TB Interventions Tutorial
- Overview
- Required Packages
- Default Parameters
- Building the Simulation Function
- Defining Intervention Scenarios
- Running a Single Scenario
- Exploring Baseline Results
- Plotting Baseline Results
- Running Multiple Scenarios
- Creating Comparison Plots
- Intervention Impact Analysis
- Advanced: Custom Scenario Creation
- Summary and Key Takeaways
- References and Further Reading
- Running TB HIV scenarios
Advanced Topics¶
Advanced Features:
- HIV Comorbidity in TBSim
- Example
- Comprehensive Analyzer Plots Example
- Build a TB simulation with dwell time analyzer
- Run the simulation and extract the analyzer
- 1. Sankey Diagrams
- 2. Network Graphs
- 3. Histograms and Distributions
- 4. Interactive Bar Charts
- 5. Stacked Bar Charts
- 6. Custom Transition Analysis
- 7. Survival Analysis
- 8. Using DwtPlotter Directly
- 9. Post Processor Demonstration
Tutorial Descriptions¶
- basic_tbrun.rst
Basic introduction to TBsim concepts and workflow
- tuberculosis_sim.ipynb
Comprehensive TB simulation tutorial with step-by-step explanations
- tb_interventions_tutorial.ipynb
Detailed guide to implementing and analyzing TB interventions
- run_tbhiv_scens.ipynb
TB-HIV co-infection modeling scenarios and analysis
- tbhiv_comorbidity.ipynb
Advanced comorbidity modeling between TB and HIV
- comprehensive_analyzer_plots_example.ipynb
Using TBsim’s built-in analyzers and plotting tools
Running Tutorials¶
All tutorials can be run:
Online: Using the Binder environment (recommended for beginners)
Locally: After installing TBsim and its dependencies
In Jupyter: Open the .ipynb files in Jupyter Notebook or JupyterLab
For the best experience, we recommend starting with the basic tutorials and progressing to more advanced topics as you become familiar with the framework.