Code-Alongs
What is a Code-Along?
Code-Alongs are live experiences taught by our instructors designed to prepare you for concepts found in the sprint challenges. They're your opportunity to work on complex job-ready problems in a live and engaging environment.
These sessions are 50 minutes in length and are offered seven days a week in the morning, afternoon, and evening. Because Code-Alongs delve deeper into a core competency, you will need to come to class prepared to have the best experience.
Ideal Code-Along Preparation Checklist
- Did you review the core competencies?
- Did you watch the guided projects?
- Did you finish your module projects?
Code-Along 1: Importing Data and EDA
In this code-along, you'll work with real-world datasets and practice importing data from different sources. You'll also perform exploratory data analysis (EDA) to understand the structure and characteristics of the data.
What You'll Learn
- Loading data from various sources (URLs, local files)
- Using basic pandas functions for exploratory data analysis
- Understanding data types and structures
- Detecting and handling missing values
- Performing basic data cleaning operations
# Example code you'll work with:
import pandas as pd
# Loading data from a URL
url = 'https://raw.githubusercontent.com/datasets/sample-data/main/data.csv'
df = pd.read_csv(url)
# Basic EDA operations
print(df.shape)
print(df.info())
print(df.describe())
# Checking for missing values
print(df.isnull().sum())
# Cleaning data
df_cleaned = df.dropna()
Code-Along 2: Exploration through Visualization
In this code-along, you'll practice creating various types of visualizations to explore and communicate insights from your data. You'll work with matplotlib and other visualization libraries to create effective and informative plots.
What You'll Learn
- Creating various plot types with matplotlib (bar charts, histograms, scatter plots)
- Customizing visualizations with colors, labels, and annotations
- Understanding the appropriate plot types for different data scenarios
- Identifying patterns and relationships in your data through visualization
- Creating multi-panel plots to compare different variables
# Example code you'll work with:
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Load dataset
df = pd.read_csv('sample_data.csv')
# Create a histogram
plt.figure(figsize=(10, 6))
plt.hist(df['numeric_column'], bins=20, alpha=0.7)
plt.title('Distribution of Values')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.grid(alpha=0.3)
plt.show()
# Create a scatter plot
plt.figure(figsize=(10, 6))
plt.scatter(df['x_column'], df['y_column'], alpha=0.6)
plt.title('Relationship Between X and Y')
plt.xlabel('X Variable')
plt.ylabel('Y Variable')
plt.grid(alpha=0.3)
plt.show()
Prepare for Success
The best Code-Along experiences happen when you are ready before coming to class. Your instructors created a starting point and a solution for each of your Code-Alongs to ensure you have what you need to succeed.
Make sure to review the relevant module materials before attending the code-along. This will help you get the most out of the session and be better prepared to tackle the challenges.