A tool for matching K-12 course names and descriptions to standardized NCES SCED codes
Project description
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.
An API key from Google AI Studio (Gemini) is required.
Installation
Install the package using pip:
pip install sced-matcher
Usage
Basic Usage
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
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
# 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sced_matcher-0.2.0.tar.gz.
File metadata
- Download URL: sced_matcher-0.2.0.tar.gz
- Upload date:
- Size: 864.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35fbad1171048673bb7e76550f8dd2f64d22c261b397157a141a51e1128377be
|
|
| MD5 |
26dc1ea7782591bcc8df1a8197f1bb64
|
|
| BLAKE2b-256 |
d92f052809fd6e8fd9b8e0b7e3a2f69e7c51b3015f72a9812ddb41e3abe7e457
|
File details
Details for the file sced_matcher-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sced_matcher-0.2.0-py3-none-any.whl
- Upload date:
- Size: 861.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e15af8e8d2d116934278375223f56183fbea27aa3a603862e391cf7e84dc8d
|
|
| MD5 |
84795d1f56574660ee8c456738b3e1a1
|
|
| BLAKE2b-256 |
a0323b2b2f65eb209ebbe4d293d55fd4267a5ca2c03a0d44cef50e7547e000a2
|