{"id":23215919,"url":"https://github.com/civiccc/brigade-maps","last_synced_at":"2025-04-05T13:44:10.450Z","repository":{"id":66211768,"uuid":"54609628","full_name":"civiccc/brigade-maps","owner":"civiccc","description":"Maps of OCD Civic divisons for Brigade","archived":false,"fork":false,"pushed_at":"2019-10-21T19:54:27.000Z","size":972,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T09:51:45.976Z","etag":null,"topics":["web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/civiccc.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}},"created_at":"2016-03-24T02:47:14.000Z","updated_at":"2019-05-01T05:51:05.000Z","dependencies_parsed_at":"2023-02-21T17:15:45.124Z","dependency_job_id":null,"html_url":"https://github.com/civiccc/brigade-maps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civiccc%2Fbrigade-maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civiccc%2Fbrigade-maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civiccc%2Fbrigade-maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civiccc%2Fbrigade-maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/civiccc","download_url":"https://codeload.github.com/civiccc/brigade-maps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345816,"owners_count":20924100,"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","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":["web"],"created_at":"2024-12-18T20:20:45.997Z","updated_at":"2025-04-05T13:44:10.441Z","avatar_url":"https://github.com/civiccc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"brigade-maps\n============================\n\nOCD Division ID (OCDID) Shapefiles\n\n![example map - CA-12](https://raw.githubusercontent.com/tdooner/brigade-maps/master/example.png)\n\n# Installation\n\n1. install node 5.x via nodenv or via some package manager\n2. `npm install`\n   This will download and install mapnik, the map rendering tool.\n3. Install GraphicsMagick (`brew install GraphicsMagick`)\n4. `npm run render`\n\n# Commands\nTo see all available commands, run:\n\n```bash\nexport PATH=$(npm bin):$PATH\njake -T\n```\n\nSome common commands you might find useful:\n\n## Download all the Shapefiles\n```bash\n$(npm bin)/jake shapefiles\n```\n\n## Render everything\n```bash\n$(npm bin)/jake render\n```\n\n## Package GeoJSON for upload\n```bash\n$(npm bin)/jake package-geojson\n\n# then you will want to upload it with something like:\naws s3 cp build/tmp-geojson.tar.gz s3://brigade-development/geojson-districts.tar.gz --acl=public-read\n```\n\n# Adding a New Map\nTo add a new map, follow the instructions [in this commit\nmessage](https://github.com/tdooner/brigade-maps/commit/15b485c1d8c4f2e8ff4fc1542961ab991bf60cbd)\n\n# Uploading to Cloudinary\n\n```\n  node bin/upload.js \u003e cloudinary_images.csv\n  # Recommended: use `jq` to count number of tiles to be uploaded, `pv` to show upload progress:\n  # node bin/upload.js | pv -ls ${ jq ‘. | length’ \u003c build/tiles.json} \u003e cloudinary_images.csv\n```\n\nCopy `cloudinary_images.csv` to a Rails server, and then update the Districts\nwith the appropriate images from a Rails console:\n\n```\nopen('cloudinary_images.csv') do |csv|\n  csv.readline # advance past headers\n  csv.each_line do |row|\n    ocdid, level, version, public_id = row.strip.split(',')\n    District.\n      joins(:civic_division).\n      where(level: level).\n      where(civic_divisions: { ocd_id: ocdid }).\n      update_all(image: \"v#{version}/#{public_id}.png\")\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciviccc%2Fbrigade-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciviccc%2Fbrigade-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciviccc%2Fbrigade-maps/lists"}