Metadata-Version: 2.4
Name: sced-matcher
Version: 0.1.2
Summary: A tool for matching K-12 course names and descriptions to standardized NCES SCED codes
Author: Leoson Hoay
Author-email: leoson.public@gmail.com
License: MPL-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pandas
Requires-Dist: python-dotenv
Requires-Dist: google-genai
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# NCES School Courses for the Exchange of Data (SCED) Codes Matching Tool
A Python package for matching K-12 course names and descriptions to standardized NCES School Courses for the Exchange of Data (SCED) codes.

## Installation

Install the package using pip:

```bash
pip install sced-matcher
```

## Usage

### Basic Usage

```python
from sced_matcher import SCEDMatcher

# Initialize the matcher with your Google Gemini API key
matcher = SCEDMatcher(api_key="your-gemini-api-key")
# Or set GEMINI_API_KEY environment variable and use:
# matcher = SCEDMatcher()

# Get SCED code for a single course
sced_code = matcher.get_sced_match("Advanced Algebra")
print(sced_code)  # Returns SCED code

# Get detailed information
code, name, description = matcher.get_sced_match("Advanced Algebra", return_details=True)
print(f"Code: {code}, Name: {name}, Description: {description}")
```

### Processing DataFrames

```python
import pandas as pd

# Create or load your DataFrame
df = pd.DataFrame({
    'Course_Name': ['Advanced Algebra', 'Biology I', 'World History'],
    'Course_Description': ['Advanced algebra concepts', 'Introduction to biology', 'World history survey']
})

# Process the DataFrame
result_df = matcher.process_dataframe(df)
print(result_df)  # DataFrame with added SCED_Code column
```

### Processing CSV Files

```python
# Process a CSV file directly
result_df = matcher.process_csv_file('input.csv', 'output_with_sced.csv')
```

## Requirements

- Python 3.8+
- Google Gemini (AI Studio) API key
- Required packages: `google-genai`, `pandas`, `python-dotenv`

## Environment Setup

Create a `.env` file in your project root:

```
GEMINI_API_KEY=your-gemini-api-key-here
```
