Saturday, January 25, 2014

From the top: Ruby and Frameworks: Divvy Neighborhoods

I want to create a Ruby web app, just to become familiar with the syntax
and to see what my options are out there. Every framework has its own approach
to web apps.

I have minmal, old experience with Ruby on Rails, so for now I’m going to look past
it. An outline of what I want to do goes something like this…

Divvy Neighborhoods

Summary Page

  • Aggregates station information
  • Associates it with neighborhoods
  • Displays overall availability on a per-neighborhood basis

It would be nice if the aggregation took place at the server level, so that the only thing
passed to the front-end was some JSON that looks like this…

someDebugging: {},
neighborhoodSummary: [
    {
        neighborhood: 'River North',
        stations: 12,
        availableBikes: 100,
        totalBikes: 150,
    },
    ...
    {
        ...
    }
]

Since stations appear and disappear all the time, it would be nice to have a way to associate
stations with neighborhoods that didn’t require keeping a file up-to-date in the git repository.

History Page

A big goal of this is to track neighborhood-level changes in station availability over time. This
seems to call for a conventional transactional database.

With the historical changes, you can do some interesting stuff.

  • Track the broad availability of bicycles
  • Track the average availability (available / total bikes) of bikes
  • Compare the changes of availability in a given neighborhood, versus the changes in average income in a neighborhood.

Timeline

I don’t have the faintest idea when this will be done, but I do plan on having the code open-sourced
and available on GitHub. Suggestions would be appreciated!

No comments:

Post a Comment