Day 3: Making your name stand out

Welcome to class!


Reminder about resources

  • “Potluck” prep assignment
  • Work with peers
  • Make your own cheat sheet

Anouncements

  1. 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
  1. Do your work in .py or .ipynb file, write-up in .qmd
  2. Making/submitting a video: Loom
  3. alt.Save() Quarto
  4. Graphics for Communication
  5. 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 ()


J. Hathaway and BYU-I ©