Skip to content

The app is intended to display NOAA real time reporting tide stations in a map rendered by Google maps Javascript API. Once clicked on the map, it should render the last 24 hrs for tide level information retrieved, including current level.

License

Notifications You must be signed in to change notification settings

Joseworks/stranger-tides

Repository files navigation

Maintainability Test Coverage Ruby Style Guide Ruby Style Guide

See the live version: stranger-tides.com

Note: This project is not affiliated with NOAA, COOPS, NWLON, or any government institution. Data is for demonstration only.


Table of Contents


About

This app displays NOAA real-time tide stations on a Google Map. Clicking a station shows the last 24 hours of tide data. Station data is loaded from a text file (see data/station_list.txt) and metadata is parsed and stored in the database.


Quick Start

# Clone the repo
 git clone https://github.com/Joseworks/stranger-tides.git
 cd stranger-tides

# Install dependencies
 bundle install

# Set up the database
 rails db:create db:migrate

# (Optional) Seed or process station data
 rake stations_id_list:process_station_list
 rake station_list:retrieve_all_stations_metadata

# Start the server
 rails server

System Dependencies

  • Ruby 3.3.7
  • Rails 7.0.4.3
  • PostgreSQL
  • Node.js (for JS assets)
  • Puma (web server)
  • Foreman (Procfile manager)
  • gon (JS data sharing)
  • Rspec (testing)
  • CircleCI (CI/CD)

Database

  • Uses PostgreSQL
  • Station metadata is stored as a jsonb column for efficient querying

Usage

  • Visit the app in your browser (default: http://localhost:3000)
  • Click a station on the map to view tide data

Rake Tasks

  • rake stations_delete:delete_station_list — Delete all station info
  • rake stations_id_list:process_station_list — Load station list from file
  • rake station_list:retrieve_all_stations_metadata — Fetch and store station metadata
  • rake highcharts:update — Update HighCharts assets

Testing

  • Run all tests:
    bundle exec rspec
  • Code style:
    rubocop
  • Security:
    bundle audit
    bundle exec brakeman

Deployment

  • Use the provided Rake tasks to prepare data
  • Deploy to your preferred platform (Heroku, Render, etc.)
  • Ensure environment variables and DB are configured

Contributing

  1. Fork the repo and create your branch from main
  2. Run tests and Rubocop before submitting PRs
  3. Open an issue for major changes
  4. All contributions welcome!

License

Copyright (c) 2015 Jose C Fernandez — MIT License


Stargazers over time

Stargazers over time

About

The app is intended to display NOAA real time reporting tide stations in a map rendered by Google maps Javascript API. Once clicked on the map, it should render the last 24 hrs for tide level information retrieved, including current level.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •