Code Monkey home page Code Monkey logo

citygram's Introduction

Citygram Build Status Test Coverage Maintainability

Citygram is a geographic notification platform designed to work with open government data. It allows residents to designate area(s) of a city they are interested in and subscribe to one or more topics. When an event for a desired topic occurs in the subscriber's area of interest, a notification (email, SMS, or webhook) is delivered. Citygram is a Code for America project by the Charlotte and [Lexington] teams for the [2014 fellowship].

Lexington [2014 fellowship]: http://www.codeforamerica.org/geeks/our-geeks/2014-fellows/

Why are we doing this?

We believe that there is an opportunity to help residents better understand what’s going on in their area, when it’s going to happen, and why. By providing timely information to residents in areas that are relevant to them, the city can be proactive instead of reactive, build trust through transparency, and increase civic engagement across the board.

Who is this made by?

See the contributors list.

Technical Overview

Citygram is a web application written in Ruby.

Installation and configuration

Installation

Option 1:

For an OSX setup, you can use vagrant to get up and running quickly with virtual box and homebrew. This option will provide you with a smooth straight forward way of quickly getting you up and running.

# setup homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# setup virtualbox
brew cask install virtualbox

# starts up an ubuntu box and installs postgres and all other dependencies
vagrant up

# login to the box and start the program:
vagrant ssh
cd /vagrant
bundle exec foreman start

Option 2:

First, follow the instructions to install each of the following:

Then, in the command line, run the following to copy the citygram code locally and install all Ruby package dependencies:

git clone https://github.com/codeforamerica/citygram.git
cd citygram
bundle install

Configure Environment

Make sure your PostgreSQL server is running, then in the terminal run:

cp .env.sample .env
rake db:create db:migrate
rake db:create db:migrate DATABASE_URL=postgres://localhost/citygram_test

Running Citygram Website and Services

Basic things you'll want to do with your Citygram server:

Run the server

To boot up the complete application and run background jobs in development:

bundle exec foreman start

You can then open http://localhost:5000/ in your web browser.

Acquiring data

When you can run the application, you're capable of getting some example data.

Before running these commands, ensure foreman is running per the instructions in the previous section!

bundle exec rake publishers:download
bundle exec rake publishers:update

The first command downloads active publishers from Citygram. The second command will update those publishers from open data portals across the country.

Send a digest
rake digests:send
Send a a weekly Digest

For Heroku Scheduler users, there is a task that can be executed multiple times, but will only deliver mail on the environment's DIGEST_DAY.

ENV['DIGEST_DAY'] = 'wednesday'
rake digests:send_if_digest_day

Heroku Scheduler

Developing

As a developer you may want to:

Set up a Single City Installation

If you only need to support a single city you can specify the ROOT_CITY_TAG to bypass the index and load one city.

For example, https://www.citygram.nyc/ is a single city installation with the following environment variable

ROOT_CITY_TAG=new-york
Test the code

Run all tests in the spec/ directory, by running:

rake

citygram's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

citygram's Issues

Delete start button

The start button isn't really necessary or all that useful right now. Maybe get rid of it if we are keeping this as a single page app.

Solicit feed requests as a button

Add another feed as the first or last item requesting what other feeds people would like to see. Could look like existing block titled "Other Feeds" with a "?" for an icon. When clicked, it will take you to a form to collect the following info:

  • City
  • Details
  • Existing data feed?

Post-sign up thank you

Offer to allow more subscriptions (call to action?)

Ex: "You're subscribed to traffic accidents! Would you like to sign up for another topic?"

Email digest options in sign up

Description under email field: "You will get email notifications _______"

  • Default: as they come in
  • Checkbox: once per day
  • Checkbox: once per week

Ways to get people to sign up for Citygram

"It might be better to collect this info through DMV, survey at City tax registration, or put a platform on City website, or use public library system."
-attendee from BETA

Map: Choose your area via address + radius

People have no idea how/that they need to draw on the map.

Possible suggested solutions:

  • Dropdown of neighborhoods/zipcodes/etc
  • Outline of neighborhoods/zipcodes/etc that people can click to add to selection
  • Zoom to address and let them adjust an existing polygon left in edit mode
  • Be more explicit that they need to draw/show a how to video

Also see #15.

Choose multiple topics at once?

To find out:

  • Do users want to select the same addresses and radii for multiple topics? or new ones?
  • Do users want to select multiple areas per topic?

Show:

  • Which topics people have already subscribed to. maybe via checkmark, greyed out, "pushed in", etc.

Alternative map signup methods

Possible tabs:

Select existing polygon on a map

  • Zip codes
  • Census tract/block
  • NPAs

Select shape user has previously drawn

Radius from location

More detail desired for 911 Police Incidents

  • "want to see more detail about the police incidents! some of the categories are vague and hard to understand. any way to link back to a police report or something with more context?" -Reed
  • "i'd like an aggregate view of crime (to help Molly know where to avoid). Patterns are more important, i.e. if there are one-time incidents vs. a bunch of break-ins." -Molly
  • Molly says some of the types of 911 Police Incidents that she's gotten texts about are not exactly relevant to her ("forgery-bad checks", "harassment, threats - by telephone, writing"). If it was, say, home invasion, assaults on the street, etc. might be more relevant.

Revise copy

Sections are too far apart to do the mad-libs copy style.
Revise copy to be more clear.

Publisher UI attributes

  • Topic title
  • Topic description
  • Estimated frequency
  • Time between receiving notification and event
  • Example event notification
  • Who it's published by
  • Icon

Topics: detail view

Figure out the UX of how people can dive into a topic to better understand what it is and decide if they want to subscribe. Include:

  • explanation of topic (one sentence about content covered)
  • an example of message / notification
  • frequency (i.e. number of messages / day or week) -- possibly out of scope

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.