{"id":21007993,"url":"https://github.com/caged/portlandcrime","last_synced_at":"2025-05-15T02:31:45.474Z","repository":{"id":2028130,"uuid":"977803","full_name":"caged/portlandcrime","owner":"caged","description":"portland crime mapping","archived":false,"fork":false,"pushed_at":"2022-07-21T22:31:01.000Z","size":4161,"stargazers_count":66,"open_issues_count":9,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-15T14:17:01.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://portlandcrime.com","language":"Ruby","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/caged.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}},"created_at":"2010-10-11T05:23:33.000Z","updated_at":"2023-12-26T17:25:48.000Z","dependencies_parsed_at":"2022-08-29T16:01:08.069Z","dependency_job_id":null,"html_url":"https://github.com/caged/portlandcrime","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/caged%2Fportlandcrime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caged%2Fportlandcrime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caged%2Fportlandcrime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caged%2Fportlandcrime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caged","download_url":"https://codeload.github.com/caged/portlandcrime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324165,"owners_count":17456460,"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":[],"created_at":"2024-11-19T09:11:05.790Z","updated_at":"2024-11-19T09:11:06.409Z","avatar_url":"https://github.com/caged.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nPortlandCrime is an experiment in crime mapping for Portland, OR.  You can see it live at http://portlandcrime.com or http://pdxcrime.com.\n\n## Setup\nRequires Ruby 1.9.2 and MongoDb\n\n1. **Create DB \u0026 load offenses:** `rake db:seed`\n2. **Import crime:** `rake crime:import`.  This will import the current year, providing `YEAR=2009 rake crime:import`.  \n   You should at least import this year and last year.\n3. **Run reports:**\n    \n        rake crime:reports:all\n4. **Import trimet stops and routes**:\n\n        rake trimet:import:routes  # Import Trimet Bus, Max, and Streetcar Routes\n        rake trimet:import:stops   # Import Trimet Bus, Max, and Streetcar Stops\n5. (And I apologize for this) **Run Migration to import Neighborhood geo data and normalize names:**\n\n        rake migrations:one_normalize_neighborhood_names\n        rake migrations:four_flag_non_portland_neighborhoods\n        \n6. Get a CloudMade API key: http://cloudmade.com/register.  Add it to line 20 of public/javascripts/map.js.\n\n\n## Deploying\nI run portlandcrime.com on Linode (http://linode.com) and deploy with capistrano. Here is a sample of the \nconfiguration I'm using: https://gist.github.com/d683cb464874f4ab33ee.\n\nAssets use Jammit (http://documentcloud.github.com/jammit) which is great for compression.\n\nCheck out config/schedule.rb for a sweet ruby DSL to cron that run reports.\n\nThe library that generates visualizations is pretty hefty, so it's a VERY good idea to precache assets with Jammit and \nuse Nginx's gzip_static module. It's the single best thing you can do to increase page load times.\n\n## Demographics\nThere are neighborhood demographics in db/data/neighborhood-demographics.csv and supporting models for those demographics, however, \nI found them to be outdated and questionable so I chose not to use them.  I've asked the city about updating these statistics and was \ninformed that they haven't received budget approval for such a project, but they gave me the census block data they used to correlate neighborhoods to census blocks.\nI hope I can use this data to upgrade neighborhood demographics for the new American Community Survey.\n\nIf you want to import demographics anyway, run `rake migrations:three_import_neighborhood_demographics`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaged%2Fportlandcrime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaged%2Fportlandcrime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaged%2Fportlandcrime/lists"}