CPD Zones is a small web application showing the different Chattanooga Police Department zones. You can use it to figure out which zone your house is in, and which officers are the main contacts for your zone.
It is based off of a project started by @seabre, @kylegordy, and @juzten. You can see the original project here.
This project uses middleman. You will need a few things to set that up.
At least Ruby 2.2 and Bundler.
You first need to install the project's Ruby dependencies. From the root directory, run:
bundle install
To run the project:
bundle exec middleman
The site will now be available at http://localhost:4567
. Middleman will watch for changes in the project and reload them.
Once the project is setup, you can now deploy the site if you wish. In order to deploy, run bundle exec middleman deploy --build-before
. If you have direct commit access to this repo, it should just work.
Just note that whatever is on your local machine at your current git branch will be deployed. That said, be mindful when you run deployment.
From time to time you will need to update officer informaiton in the application. This most often happend when there are promotions or reassignments within the Chattanooga Police Department. The steps below will show you how to update the officer information when these changes occur.
- Sector Assignment
- Full Title
- Email Address
- Photo
- Rename photos with the last name of the officer, in all lower case.
- Resize photos to 320 pixels wide and crop image to upper body (chest and up) so that the size is 320 wide by 240 high.
- Move folders into the images project folder (cpd-zones/source/images)
- Go to geojson.io in your web browser.
- Load your topojson file (cpd-zones/source/data) either by connecting to your github project or downloading the file and uploading it to the website.
- Update the officer info in the json file (officer name, email and photo name) by clicking on the the sector to update the information.
- Save the file to overwrite the origional in github (you can save a copy of the origional if locally if that makes you nervious) or as a new topojson file to be downloaded, renamed to CPDZones.topojson and use to replace the file in the source folder (cpd-zones/source/data).