{"id":16884539,"url":"https://github.com/timwis/soda-postgres","last_synced_at":"2025-08-08T12:07:24.261Z","repository":{"id":35891939,"uuid":"40178237","full_name":"timwis/soda-postgres","owner":"timwis","description":"Use Socrata's SODA2 API to query a postgres database","archived":false,"fork":false,"pushed_at":"2015-08-18T10:03:34.000Z","size":192,"stargazers_count":4,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T04:32:59.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timwis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-04T10:25:53.000Z","updated_at":"2019-05-31T00:25:48.000Z","dependencies_parsed_at":"2022-08-30T14:41:40.536Z","dependency_job_id":null,"html_url":"https://github.com/timwis/soda-postgres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timwis/soda-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwis%2Fsoda-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwis%2Fsoda-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwis%2Fsoda-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwis%2Fsoda-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timwis","download_url":"https://codeload.github.com/timwis/soda-postgres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwis%2Fsoda-postgres/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269417453,"owners_count":24413379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":"2024-10-13T16:29:07.888Z","updated_at":"2025-08-08T12:07:24.235Z","avatar_url":"https://github.com/timwis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# soda-postgres\nUses [node-soda2-parser](https://github.com/timwis/node-soda2-parser) to provide a Socrata-style SODA2 API in front of a postgres database\n\n# Installation\n1. Clone the repo\n2. Install dependencies via `npm install`\n3. Create a copy of `.env.sample` named `.env` and fill in the values, pointing it to a postgres database with postgis enabled\n\n# Usage\nTo run a SODA2 API server, use `node index.js` Then query the API using SODA2 calls, ie. `http://localhost:8080/resource/table_name?$select=*\u0026zip_code=19141`\n\n# Examples\nA demo server with the [Heart Healthy Screening Sites](https://www.opendataphilly.org/dataset/heart-healthy-screening-sites/resource/2c0d8231-e6b8-4598-8089-d1bcaf1bdaa6) dataset provides the following examples.\n* [$select=zip_code, screening_type, geom](http://104.236.214.217/resource/sites?$select=zip_code, screening_type, geom)\n* [$select=zip_code, count(*)\u0026$group=zip_code](http://104.236.214.217/resource/sites?$select=zip_code,count(*)\u0026$group=zip_code)\n* [$select=convex_hull(geom) AS hull\u0026zip_code=19146](http://104.236.214.217/resource/sites?$select=convex_hull(geom) AS hull\u0026zip_code=19146)\n* [$where=within_box(geom, -75.182324, 39.949259, -75.170769, 39.934494)](http://104.236.214.217/resource/sites?$where=within_box(geom,-75.182324,39.949259,-75.170769,39.934494))\n* [$where=within_circle(geom, -75.163406, 39.952503, 1000)](http://104.236.214.217/resource/sites?$where=within_circle(geom,-75.163406,39.952503,1000))\n* [$where=within_polygon(geom, 'MULTIPOLYGON (((-75.184290 39.926206,-75.168267 39.930942,-75.159473 39.923000,-75.171159 39.917874,-75.184290 39.926206)))')](http://104.236.214.217/resource/sites?$where=within_polygon(geom,%27MULTIPOLYGON%20(((-75.184290%2039.926206,-75.168267%2039.930942,-75.159473%2039.923000,-75.171159%2039.917874,-75.184290%2039.926206)))%27))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwis%2Fsoda-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimwis%2Fsoda-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwis%2Fsoda-postgres/lists"}