Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

socrata/citygram

 
 

Repository files navigation

NearMeDC

NearMeDC 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.

This application is a modification and extension of the Citygram application that is a Code for America project by the Charlotte and Lexington teams for the 2014 fellowship.

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?

This application has been heavily modifed by Socrata

Original Contributors

See the contributors list.

Technical Overview

NearMeDC is a web application written in Ruby.

Installation and configuration

Installation

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

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

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 NearMeDC Website and Services

Basic things you'll want to do with your NearMeDC 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 NearMeDC. 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_DAYS.

ENV['DIGEST_DAYS'] = 'monday,wednesday,friday'
rake digests:send_if_digest_day

Heroku Scheduler

Test the code

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

rake

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 62.4%
  • HTML 26.9%
  • JavaScript 10.2%
  • Other 0.5%