Skip to content

Jupyter Notebooks

Interactive computing environment.

Overview

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.

Features

  • Interactive code execution
  • Rich text with Markdown
  • Data visualization
  • Export to multiple formats
  • Kernel support for many languages
  • Collaboration features

Getting Started

bash
pip install jupyter
jupyter notebook

Basic Example

python
# In a Jupyter Notebook cell
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Create sample data
data = {
    'Name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],
    'Age': [25, 30, 35, 28, 32],
    'Score': [85, 92, 78, 88, 95]
}

df = pd.DataFrame(data)
print("Dataset:")
print(df)

# Data visualization
plt.figure(figsize=(10, 4))

# Bar plot
plt.subplot(1, 2, 1)
plt.bar(df['Name'], df['Score'], color='skyblue')
plt.title('Scores by Person')
plt.xlabel('Name')
plt.ylabel('Score')
plt.xticks(rotation=45)

# Scatter plot
plt.subplot(1, 2, 2)
plt.scatter(df['Age'], df['Score'], color='coral', s=100)
plt.title('Age vs Score')
plt.xlabel('Age')
plt.ylabel('Score')

plt.tight_layout()
plt.show()

# Statistical analysis
print("\nStatistics:")
print(f"Mean Age: {df['Age'].mean():.1f}")
print(f"Mean Score: {df['Score'].mean():.1f}")
print(f"Correlation: {df['Age'].corr(df['Score']):.2f}")

PAPER-CODE Integration

PAPER-CODE provides:

  • Jupyter notebook templates
  • Data analysis workflows
  • Visualization setups
  • Export configurations

Resources