Name: bike-share
Owner: Turing School of Software & Design
Description: null
Forked from: case-eee/bike-share
Created: 2017-01-22 18:11:51.0
Updated: 2017-01-26 22:50:39.0
Pushed: 2017-12-07 07:22:32.0
Homepage: null
Size: 36
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
In this project you'll use Ruby, Sinatra, and Activerecord to build a site that analyzes bike share usage in San Francisco.
This application will collect data in two ways:
At a high level, this project will develop along the following path:
DTR with your group here. One group member should send a link of the forked gist to your anchor as soon as it's complete.
This project must use:
This base repo has already configured those three for you.
You'll want to set up the DatabaseCleaner gem in order to have a clean database each time you run tests. Follow the instructions for setting up the gem. Due to a bug in the most recent version of the gem, you'll need to use this line when you set the strategy in your test helper file:
baseCleaner.strategy = :truncation
See the “Resources” section at the bottom of this page for additional helpful documentation.
The project may not use:
Rails
Iterations 0-9 must be completed in order to consider the project complete. Please TDD throughout. Tests are expected for all features and all models.
Create full CRUD functionality for a station with the following characteristics:
Once you have the Station
model started, finish it off by creating validations for the Station
attributes.
You can use ActiveRecord's validations feature to make sure no record is saved without having all attributes present.
Be sure to have a test for each individual validation.
At the end of this iteration, you should be able to view an index of all stations, view a page for a single station, create a station, edit a station, and delete a station from either the index or the show pages.
Download the dataset available here. This will include all of the CSV files that you will be using in this project. Since these files are large, we have set up your project directory structure and .gitignore
so that when you add these files to the /db/csv/
directory they will not be pushed up to GitHub. However, this also means that each of the members of your team will need to download these files independently. Please note that there are idiosyncracies in the data that are outlined in some detail here. These may not be important to you at this moment, but this will be an important reference as you move through future iterations.
Update the seeds file in your /db
directory and add the station.csv
file to your /db/csv/
directory. When you run rake db:seed
your development database should be populated with the information from the station.csv
file. Your index should include a total of seventy stations.
Create a station dashboard route. When you visit /station-dashboard
you should be shown a page with the following information:
Create full CRUD functionality for a trip with the following characteristics:
Note: Zip Code is a user-provided field, and may not be present on all records. Otherwise, as with Station
's, all attributes of a Trip
need to be present to ensure data integrity. Don't forget your validations and tests for each validation.
As with Iteration 1, be sure that you are working to normalize your database. This may mean using references to existing tables. At the end of this iteration users should be able to visit the following routes:
/trips
/trips/:id
/trips/new
/trips/:id/edit
When a user visits the /trips
path, they should only see the first thirty trips taken organized by date. On that page, there should also be a button to see the next thirty trips. Once a user visits a second page, there should be buttons to move both forward and backward in time.
Additionally, users should be able to delete a trip from the views rendered at both /trips/:id
and /trips
.
Add the trip.csv
file to your db/csv
directory, and update your seed.rb
file so that it also imports the information in trip.csv
. Be sure to adjust your seed file so that when it is run it does not create duplicate data.
Create a trips dashbord route. When you visit /trips-dashboard
users should be shown a page with the following information:
On an individual station show page add the following information:
Create full CRUD functionality for a day's weather conditions with the following characteristics:
At the end of this iteration users should be able to visit the following routes:
/conditions
/conditions/:id
/conditions/new
/conditions/:id/edit
As with /trips
, users should only be shown the weather conditions for thirty days when they visit /conditions
and should be able to navigate to other pages with forward/backward buttons.
Additionally, users should be able to delete a the weather conditions for a particular date from the views rendered at both /conditions/:id
and /conditions
.
Add the weather.csv
file to your db/csv
directory, and update your seed.rb
file so that it also imports the information in weather.csv
. Be sure to adjust your seed file so that when it is run it does not create duplicate data for a specific date. You can scope by a single zip code even though there are multiple zip codes in the data set.
Create a weather dashboard available at /weather-dashboard
that includes the following information:
Add the following information to your trip dashboard:
api/v1/stations/:id
that responds to requests with JSON instead of HTML.