This project creates an AI-powered platform for analyzing COVID-19 data using Azure OpenAI services and various database integrations. It demonstrates different approaches to data analysis, from simple CSV processing to complex SQL database interactions.
- CSV data loading and transformation
- SQLite database integration
- Automated data cleaning and standardization
- Azure OpenAI API integration
- Function calling capabilities
- Code interpreter implementation
- SQL query generation and execution
- State-by-state COVID statistics
- Historical data analysis
- Custom query support
- Multiple visualization options
project/
├── code/
│ ├── L1_Your_First_AI_Agent.ipynb # Create the first AI Agent
│ ├── L2_Interacting_with_CSV_Data.ipynb # CSV data processing
│ ├── L3_Connecting_to_SQL_Database.ipynb # SQL database setup
│ ├── L4_Azure_OpenAI_Function_Calling.ipynb # Azure OpenAI integration
│ ├── L5_Leveraging_Assistants_API.ipynb # AI Assistant implementation
│ └── Helper.py # Utility functions
├── data/
│ └── all-states-history.csv # COVID-19 dataset
└── .env # Environment variables
- Environment Configuration
pip install -r requirements.txt- Environment Variables
AZURE_OPENAI_ENDPOINT=your_endpoint
AZURE_OPENAI_API_KEY=your_key
DATA_PATH=path_to_data_directory- Azure Configuration
a. Create an Azure Account
- Visit portal.azure.com and sign up for an account
- If you're new to Azure, you may be eligible for free credits
b. Create an Azure OpenAI Resource
- In Azure portal, search for "Azure OpenAI"
- Click "Create" and follow setup wizard# Load and analyze CSV data
import pandas as pd
df = pd.read_csv("data/all-states-history.csv")# Generate and execute SQL queries
agent_executor_SQL.invoke("How many patients were hospitalized in Alaska?")# Create and use AI assistant
assistant = client.beta.assistants.create(
model="gpt-35-turbo",
instructions="Analyze COVID-19 data",
tools=[{"type": "code_interpreter"}]
)- Azure OpenAI Setup
- Database Schema
- API Reference
Contributions are welcome! Please feel free to submit a Pull Request.
If you like my work, consider supporting my studies!
Your contributions will help cover fees and materials for my Computer Science and Engineering studies at the UOC starting in September 2025.
Every little bit helps—you can donate from as little as $1.
This project is inspired by the DeepLearning.AI courses. Please visit DeepLearning.AI for more information and resources.