Welcome to class!
Reminder about resources
- “Potluck” prep assignment
- Work with peers
- Make your own cheat sheet
Anouncements
- Always submit a halfway checkpoint even if you’re behind!
- It’s the only hard due date
- Think of it as a check in with “the boss”
Thoughts on P1 Halfway Checkpoint
- Do your work in .py or .ipynb file, write-up in .qmd
- Making/submitting a video: Loom
alt.Save()Quarto- Graphics for Communication
- Plotly.Express Resources
Let’s practice!
Explore the data
import plotly.express as px
import pandas as pd
import numpy as np
url = "https://github.com/byuidatascience/data4names/raw/master/data-raw/names_year/names_year.csv"
names = pd.read_csv('names_year.csv')
names.head()
names.describe()
What do you want the chart to look like?
What types of charts are there?
What data do you need to make that chart?
# names[['name'],['year']] vs. names.query()
kobe = names.query("name == 'Kobe'")[["name", "year", "Total"]]
kobe2 = names.query("name == 'Kobe'").filter(items=["name", "year", "Total"])
# method chaining with ()