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.
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
sced_matcher-0.1.2.tar.gz
(9.7 kB
view details)
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.1.2.tar.gz.
File metadata
- Download URL: sced_matcher-0.1.2.tar.gz
- Upload date:
- Size: 9.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 |
57ddace8efb46bb28234b8fddb1b99d912fa30c54dcd0b1fdfe88b1e2d948c00
|
|
| MD5 |
edbe00fbdcdd67959ae669ad541b4d4c
|
|
| BLAKE2b-256 |
68db0a08f595697e7903e2b37b5081a3d031e8ede20c2b99619c8e066e1c21ff
|
File details
Details for the file sced_matcher-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sced_matcher-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.1 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 |
db672ec4cf1e8fc5c501c311c4fd7d6d4b685d151386043aa0740a36f38c2741
|
|
| MD5 |
f2e8e61316b6a7584c74452ca60acadc
|
|
| BLAKE2b-256 |
42d54eb1be0a797db2f329420cece255b7636ade5ae3e492e02dc6f684cfecf0
|