A website to display dam waterlevels in Cape Town's 6 major dams.
Original data is sourced from the Cape Town Open Data Portal, and is parsed and converted into an easily digestable JSON API .
- Download the repository
bundle install
Run as a Docker container:
docker-compose build
docker-compose run web rake db:reset
docker-compose run web waterlevel:import
docker-compose up -d
- visit localhost:3000
docker-compose down
to kill the container
Note: run specs within the docker container: docker-compose run web rake spec
Start Postgres and Rails with foreman start -f Procfile.dev
Start Postgres
Start rails server bundle exec rails s
- this will run an API server at http://localhost:3000
Start NPM development server - a browser window will open at http://localhost:8000
Import the latest data by running rake waterlevel:import
.
- Nest API behind
api/v1/
path - Investigate automatic data imports
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Waterlevels is released under the MIT License.