Interactive visualization tool for Swiss grading system calculations deployed on Cloudflare Workers
An educational tool that visualizes how different Swiss grading models calculate final grades from raw points. Compare two models side-by-side:
- Inclusive Model: Traditional rounding to nearest half-grade
- Abrunden Model: Conservative rounding down (floor)
Perfect for teachers, students, and education administrators who need to understand or demonstrate grading calculations.
- π Interactive Charts: Hover over data points to see grade bands
- π± Fully Responsive: Desktop side-by-side, mobile full-screen pagination
- π¨ Color-Coded: Red for failing (<4), yellow-green for passing (β₯4)
- πΎ Persistent Settings: Your preferences saved locally
- β¨οΈ Keyboard Navigation: Arrow keys for quick comparison
- π₯ Export Charts: Download as PNG images
- π Global CDN: Fast loading worldwide via Cloudflare edge network
# Install dependencies
npm install
# Start development server
npm run start
# Visit http://localhost:8787# Authenticate (first time only)
npx wrangler login
# Deploy to production
npm run deploy- Quick Reference - You are here!
- Complete Guide - 500+ line beginner-friendly guide
- Development Log - Full development journey with technical decisions
- Grading Models - Swiss grading system explanation
swissgrades/
βββ src/
β βββ index.ts # Cloudflare Worker entry point
βββ static/
β βββ index.html # Application structure
β βββ styles.css # Responsive design
β βββ grading.js # Grade calculation logic
β βββ main.js # UI orchestration
β βββ favicon.svg # Swiss flag icon
βββ wrangler.toml # Cloudflare configuration
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript config
| Technology | Purpose |
|---|---|
| Cloudflare Workers | Edge deployment, global CDN |
| Plotly.js | Interactive data visualization |
| Vanilla JavaScript | Client-side calculations |
| TypeScript | Development-time type safety |
| CSS Grid | Responsive layout |
| ES6 Modules | Code organization |
// Linear interpolation between PPPβ4.0 and MPβ6.0
// Round to nearest half-grade (0.5, 1.0, 1.5, etc.)
roundingMode: "nearest"// Same interpolation
// Round DOWN to lower half-grade (floor)
roundingMode: "floor"Both models use the same linear interpolation formula but differ in final rounding behavior. See GRADING_MODELS.md for detailed explanation.
- Teachers: Understand how grading policies affect student outcomes
- Students: Visualize what points are needed for target grades
- Administrators: Compare fairness of different grading approaches
- Education Research: Analyze grading system properties
Try these configurations to explore the models:
-
Standard Test
- MP: 23 points, PPP: 13 points, Granularity: 0.5
-
Strict Grading
- MP: 100 points, PPP: 60 points, Granularity: 0.5
-
Fine Gradations
- MP: 20 points, PPP: 12 points, Granularity: 0.25
Production URL: https://swissgrades.cheddar.workers.dev
Hosted on Cloudflare's global edge network with automatic HTTPS and caching.
This project was developed through human-AI collaboration with GitHub Copilot. Contributions welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes with clear commits
- Test locally:
npm run start - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request
- ES6+ JavaScript with modern syntax
- Clear function names and comments
- Single responsibility principle
- Responsive design first
This project is open source and available for educational purposes.
- Swiss Education System: For the grading model specifications
- Plotly.js: For excellent visualization capabilities
- Cloudflare Workers: For edge computing infrastructure
- GitHub Copilot: For AI-assisted development
Questions or feedback? Open an issue on GitHub or visit the live demo.
Built with β€οΈ and π€ through human-AI collaboration
Last updated: November 1, 2025