Giter VIP home page Giter VIP logo

joseworks / stranger-tides Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 37.47 MB

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.

Home Page: https://www.stranger-tides.com/

License: MIT License

Ruby 74.37% Makefile 1.30% JavaScript 11.15% CSS 0.81% HTML 8.28% SCSS 4.04% Procfile 0.05%
noaa tide-stations stations-metadata ruby-on-rails ruby national-data-buoy-center national-weather-service reporting-stations national-ocean-observing-system

stranger-tides's Introduction

Maintainability

Test Coverage

Ruby Style Guide

Ruby Style Guide

Note: Specs, testing and development still in progress. This code/site/code has no affiliation whatsoever with NOAA, COOPS (Center for Operational Oceanographic Products and Services), NWLON (National Water Level Observation Network ) or any other government institutions.

  • Ruby version 3.2.1

  • Rails version 7.0.4.3

  • System dependencies

  • Puma as a web server
  • Foreman as a manager for Procfile-based applications
  • Lazy high charts
  • gon
  • Rspec
  • Travis CI for continuous integration testing.
  • Database
  • PostgreSQL
  • How to run the test suite
  • rspec spec

Please feel free to use a different markup language if you do not plan to run rake doc:app.

  • Scope: 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.

In order to achieve that, a rake process will read all the current tide stations from a txt file ( station_list.txt). This is necessary because at the time the app is being written NOAA does not provide an online service or list that can be retrieved in any other way than 'scraping' the information of a website. I am considering to write an small JSON API to hold this data.

There are three rake tasks:

  • rake station_list:delete_station_list Delete all of the stations information from the database

  • rake station_list:process_station_list Reads the list of all stations from station_list.txt, and saves a single row in the database with a tide_info array of text containing all of the reporting stations id's:

SELECT "stations".* FROM "stations" ORDER BY "stations"."id" DESC LIMIT 1 => ["9461380", "9461710",...]

  • rake station_list:retrieve_all_stations_metadata # Run Process

Reads the list of all stations from station_list.txt, and appends to the record saved by the above process another single row with a JSON field (metadata) that stores all of the stations metadata, eg:

{"station_id"=>"9461380", "station_name"=>"Adak Island", "latitude"=>"51.8633", "longitude"=>"-176.6320"}

This rake task uses the TideParsingService, and prevents inconsistent data if an station in particular is not reporting tide levels. It also parses the parameters 's' and the timestamps for this readings.

  • Deployment instructions rake stations_delete:delete_station_list # Delete Station List rake stations_id_list:process_station_list # Station List rake station_list:retrieve_all_stations_metadata # Process metadata

Note from NOAA: These raw data have not been subjected to the National Ocean Service's quality control or quality assurance procedures and do not meet the criteria and standards of official National Ocean Service data. They are released for limited public use as preliminary data to be used only with appropriate caution. Source: NOAA Tides and Currents

Update HighCharts

rake highcharts:update

Copyright (c) 2015 Jose C Fernandez released under the MIT license

stranger-tides's People

Contributors

dependabot[bot] avatar joseworks avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.