Skip to main content

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


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.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sced_matcher-0.1.3-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file sced_matcher-0.1.3.tar.gz.

File metadata

  • Download URL: sced_matcher-0.1.3.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

Hashes for sced_matcher-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d012b5a4e36b1cf5b6caf0609f3a2114fd60e5ef2eb537eb9cfcdc61027881f0
MD5 0fdaef64febb5a8bceedf7bcd0fa50e0
BLAKE2b-256 647ec80c0b225c376fdeb90904d2f91e0ea4fa8b485419ee891a3b00bdb929ae

See more details on using hashes here.

File details

Details for the file sced_matcher-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sced_matcher-0.1.3-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

Hashes for sced_matcher-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e6b86a54d9ff26cbedc7e0616ff0b180e466d11f18c94aed3f71f8a0953fef
MD5 39cad5f69f22a6cd3cd7106566852921
BLAKE2b-256 9ff7282acb1e8c0a05b4d231c3a8d9e19743ed6ea0a6e6cdf2721c93e206dcdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page