Skip to content

Latest commit

 

History

History
66 lines (40 loc) · 1.76 KB

File metadata and controls

66 lines (40 loc) · 1.76 KB

Lab 10

Goals:

  • Think through data loading for different data sources
  • Ensure your app is performant

Work in your Project team.


All data in BigQuery

Use BigQuery for all your datasets. For each data source:

  1. What type of data loading will you use? Why? Explain as Markdown in your repository.
  2. Repeat the middle steps from Part 5.

Performance

Ensure each page of your app (if there are multiple) fully loads within two seconds.

  • Display the overall page load time using:

    import time
    import streamlit as st
    
    start_time = time.time()
    
    # --- your page code here ---
    
    elapsed = time.time() - start_time
    st.caption(f"Page loaded in {elapsed:.2f} seconds")
  • You can use caching in Streamlit, but don't rely on that exclusively.

  • Timing Function[s] in Python can help you identify where the slowdown(s) are.

Hint You may need to push logic/filtering from pandas to SQL to reduce the number of records that need to be loaded from the database by your app.

Record

Make a screen recording starting your app locally, then loading each page in real time. Some options for recording:


Submit

Submit via CourseWorks:

  • Links to the pull request(s)
  • The screen recording