{"id":50543834,"url":"https://github.com/colonelpanic8/map-quiz","last_synced_at":"2026-06-03T22:01:53.543Z","repository":{"id":350952676,"uuid":"1208036862","full_name":"colonelpanic8/map-quiz","owner":"colonelpanic8","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-13T00:15:27.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-13T00:35:21.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colonelpanic8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T18:25:22.000Z","updated_at":"2026-04-13T00:15:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/colonelpanic8/map-quiz","commit_stats":null,"previous_names":["colonelpanic8/map-quiz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/colonelpanic8/map-quiz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fmap-quiz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fmap-quiz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fmap-quiz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fmap-quiz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colonelpanic8","download_url":"https://codeload.github.com/colonelpanic8/map-quiz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fmap-quiz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33881107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-03T22:01:52.720Z","updated_at":"2026-06-03T22:01:53.530Z","avatar_url":"https://github.com/colonelpanic8.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Map Quiz\n\nA batch-submission map quiz system. The interaction is inspired by Sporcle picture-click geography quizzes, but the grading model is different: you place labels across the full map first, then submit once to score the entire board in a single pass.\n\n## What it ships with\n\n- `Find the US States`\n- `Countries of the World`\n\nEach board can optionally expose subset filters. The sample data now includes:\n\n- `Find the US States` with filters such as `Original 13`, `Midwest`, and `South`\n- `Countries of the World` with overlapping filters such as `Europe`, `Africa`, and `Middle East`\n\nBoth are built from atlas packages rather than hard-coded SVGs:\n\n- `us-atlas`\n- `world-atlas`\n\n## Run it\n\n```bash\nnpm install\nnpm run dev\n```\n\nBuild for production with:\n\n```bash\nnpm run build\n```\n\nBuild the GitHub Pages artifact with Nix:\n\n```bash\nnix build .#github-pages\n```\n\nThat output is a static site at the root of `./result`, ready to upload to GitHub Pages.\n\nTo use the workflow, set the repository's GitHub Pages source to `GitHub Actions`.\n\n## Data model\n\nThe UI only needs a normalized quiz definition:\n\n```ts\ntype MapQuizDefinition = {\n  id: string\n  title: string\n  description: string\n  prompt: string\n  credit: string\n  timeLimitSeconds: number\n  initialMapTransform?: { scale: number; x: number; y: number }\n  defaultActiveSubsetIds?: string[]\n  subsets?: Array\u003c{\n    id: string\n    title: string\n    regionIds: string[]\n    viewportRegionIds: string[]\n    initialMapTransform?: { scale: number; x: number; y: number }\n  }\u003e\n  viewBox: { width: number; height: number }\n  regions: Array\u003c{\n    id: string\n    name: string\n    aliases: string[]\n    bounds: { minX: number; minY: number; maxX: number; maxY: number }\n    path: string\n  }\u003e\n}\n```\n\nThere are two helpers in [src/lib/quiz-builder.ts](/home/imalison/Projects/map-quiz/src/lib/quiz-builder.ts):\n\n- `createTopoQuiz(...)` for TopoJSON sources such as `us-atlas` and `world-atlas`\n- `createPolygonQuiz(...)` for arbitrary polygon coordinates\n\nThat second helper is the bridge to Sporcle-style image maps. Their state quiz uses a plain HTML image map with polygon coordinates, so those coordinates can be transformed into `points: [[x, y], ...]` inputs without changing the rest of the UI.\n\n## Adding a new quiz\n\nAdd another entry in [src/data/quizzes.ts](/home/imalison/Projects/map-quiz/src/data/quizzes.ts). For a projected TopoJSON source:\n\n```ts\ncreateTopoQuiz({\n  id: 'my-quiz',\n  title: 'My Quiz',\n  description: 'Batch-label the map.',\n  prompt: 'Place every answer before grading.',\n  credit: 'Geometry source here.',\n  timeLimitSeconds: 600,\n  topology,\n  objectName: 'regions',\n  projection: 'equalEarth',\n  aliasesByName: {\n    'United States of America': ['USA', 'United States', 'US'],\n  },\n})\n```\n\nFor raw polygon data:\n\n```ts\ncreatePolygonQuiz({\n  id: 'custom-image-map',\n  title: 'Custom Polygon Map',\n  description: 'Image-map style regions.',\n  prompt: 'Assign labels, then submit.',\n  credit: 'Custom geometry.',\n  timeLimitSeconds: 300,\n  viewBox: { width: 920, height: 569 },\n  regions: [\n    {\n      id: 'alpha',\n      name: 'Alpha',\n      points: [\n        [10, 10],\n        [90, 20],\n        [75, 80],\n      ],\n    },\n  ],\n})\n```\n\n## Interaction model\n\n- Click a region and then a label, or a label and then a region.\n- Placements stay editable until submission.\n- Subset filters can narrow the active answer bank without switching to a separate quiz.\n- Subset filters may overlap, and `Reset view` fits the union of the active subset viewports.\n- The `Disable timer` toggle starts on by default; uncheck it for timed rounds.\n- Search works against names plus aliases and abbreviations.\n- `Grade Map` checks every region at once.\n\n## Notes\n\n- The current sample quizzes are fully local and do not depend on Sporcle assets.\n- The system is intended to be extended to countries, states, provinces, territories, or any other region set that can be represented as polygons.\n- The repository includes a GitHub Actions workflow that builds `.#github-pages` and deploys it to GitHub Pages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fmap-quiz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolonelpanic8%2Fmap-quiz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fmap-quiz/lists"}