{"id":21238784,"url":"https://github.com/splitgraph/socrata-roulette","last_synced_at":"2026-04-29T19:01:48.010Z","repository":{"id":114333762,"uuid":"573940341","full_name":"splitgraph/socrata-roulette","owner":"splitgraph","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-09T13:14:20.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-01T23:17:38.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/splitgraph.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":"2022-12-03T22:55:22.000Z","updated_at":"2022-12-09T12:45:55.000Z","dependencies_parsed_at":"2023-06-01T21:16:23.382Z","dependency_job_id":null,"html_url":"https://github.com/splitgraph/socrata-roulette","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/splitgraph/socrata-roulette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsocrata-roulette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsocrata-roulette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsocrata-roulette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsocrata-roulette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitgraph","download_url":"https://codeload.github.com/splitgraph/socrata-roulette/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsocrata-roulette/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-21T00:38:28.942Z","updated_at":"2026-04-29T19:01:48.000Z","avatar_url":"https://github.com/splitgraph.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socrata Roulette\n\nA random query generator for Socrata open government datasets indexed by [Splitgraph](https://www.splitgraph.com/explore), built with [Yew](https://yew.rs/).\n\nSee it in action on https://splitgraph.github.io/socrata-roulette.\n\n## How does it work?\n\nWe first pick a random Socrata dataset (by sending a query to Splitgraph like `SELECT * FROM \"splitgraph/socrata\".datasets ORDER BY random() LIMIT 1`).\n\nThen we go through its columns and classify them as:\n\n- Measures (something that can be counted/calculated, like an `AVG(integer_column)`, `SUM(some_price_column)` etc)\n- Dimensions (something that can be aggregated on, like a timestamp, an ID or a text column)\n\nThen we pick a subset of random measures and dimensions to get and order on. We generate a query:\n\n```sql\nSELECT\n  (selected dimensions),\n  (selected measures)\nFROM (source table)\nGROUP BY (selected dimensions)\nORDER BY (some subset of measures and dimensions)\nLIMIT 100\n```\n\nand render a Splitgraph query embed with that query prefilled. Splitgraph translates the query to [SoQL](https://dev.socrata.com/docs/queries/) and sends it off to the relevant Socrata data portal.\n\n## FAQ\n\n### I don't see anything?\n\nThis uses Yew and works as a client-side WebAssembly app, so is not supported by some browsers like IE 11.\n\n### Sometimes the query times out\n\nAggregation queries can be rather heavyweight, since they require scanning through the whole dataset. Sometimes Splitgraph can't ship the whole query to the data source, so it has to load the whole dataset from the upstream and run the query locally.\n\nTry a different one! It'll probably work better.\n\n### Sometimes I get an `error` message\n\nIt happens if the upstream data portal is having some issues (since Splitgraph proxies the queries to it).\n\nTry a different one! It'll probably work better.\n\n### This doesn't work in an incognito Chrome instance\n\nThis is because the Splitgraph query embed is third-party (hosted on a different domain than `splitgraph.github.io`) and tries to use the browser's local storage to store the query text. Try a non-incognito mode for now, or a different browser like Firefox.\n\n### I get a Splitgraph sign-in screen instead?\n\nThis is a known bug if you're already a Splitgraph user (not a fresh visitor). Log in as yourself or clean your cookies for `splitgraph.com`.\n\n### Why?!\n\nIt's fun! We're also planning on using this feature in some future demos of Splitgraph.\n\n## Development\n\n```bash\n# Install prerequisites\nrustup target add wasm32-unknown-unknown\ncargo install --locked trunk\n\n# Rebuild Tailwind CSS (done automatically by Trunk)\n./build_tailwind.sh\n\n# Dev mode\ntrunk serve --open\n\n# Optimized release build in dist/\ntrunk build --release --public-url socrata-roulette/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitgraph%2Fsocrata-roulette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitgraph%2Fsocrata-roulette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitgraph%2Fsocrata-roulette/lists"}