npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

geoglows

v2.0.8

Published

This is an npm package that helps to use the Geoglows API

Downloads

10

Readme

GEOGloWS-JavaScript-Package

|

This is a version for the npm package for the API that is held for the GEOGloWS project, which uses the ERA-5 dataset from ECMWF. The application retrieves different plots using Plotly.js. This plots belong to a particular reach_id from a river, so plots are linked to a reach_id. The provided plots are:

A demo application was prepared to show that the forecast, historical and seasonal data plots can be retrieved for any reach_id. The following codePen shows an application that contains all the streams for the country of Peru. The plots are retrieved when one clicks on an stream. Hydroviewer Peru

Documentation-use

GEOGloWS

The GEOGloWS object contains the functions that retrieve plots for the forecast, historical, seasonal average of a reach_id of a given stream. Therefore, it contains three Properties: Forecast, Historical, and Seasonal. In order to invoke the GEOGloWS object, you can do it in two ways: using the CDN in the HTML or installing it via NPM.

If the CDN link is going to be used it is necesarry to use the following structure: GEOGloWS.forecast, GEOGloWS.historical, GEOGloWS.seasonal. After, the methods for each one of the different objects can be used. For example, GEOGloWS.forecast.graph_fr() will call the function graph_fr that will retrieve the forecast records.

If the NPM isntallation is going to be use then a simple require will work.

Forecast

The FORECAST object contains the functions that are realted to the forcast of a reach_id of a given stream.

Type: Object

Properties

  • graph_fr Function Gives a Plot of the forecast Records for a given reach_id of an stream
  • graph_emsembles Function Gives a Plot of the forecast ensembles for a given reach_id of an stream. It gives 52 ensembles.
  • graph_stats Function Gives a Plot of the forecsast statistics and the last week of the forecast records.

graph_fr

Retrieves a plot of the forecast Records for a given reach_id of an stream. It gives 2 weeks of the forecst records. In addition, the function lets customize the width, heigh, and title of the graph if needed. The retrieved plots are plotted using Plotly, so a button to download data has been added to the plots

Parameters

  • reachid number reach_id of an specific stream
  • htmlElement string It is the id of the HTML element.
  • title string it is the title of the grah (optional).
  • rp boolean -Tells the function to add the return periods to the plot of the Forecast Records.(optional).
  • width string Especifies the width of the plot.(optional).
  • height string Especifies the height of the plot.(optional).

graph_emsembles

Retrieves a plot of the forecast ensembles for a given reach_id of an stream. It gives 52 ensembles. The ensemble 52 is the only one that comes in high resolution. In addition, You can especify which ensembles do you want. For exmaple, the array [2,4,6,7] will give you the ensembles 2,4,6, and 7. The default is to give all all the ensembles. The function also lets customize the width, heigh, and title of the graph if needed. The retrieved plots are plotted using Plotly, so a button to download data has been added to the plots

Parameters

  • reachid number reach_id of an specific stream
  • htmlElement string It is the id of the HTML element.
  • arrayEnsemble array It is the array that contains the number of ensembles that will be given (optional).
  • title string it is the title of the grah (optional).
  • width string Especifies the width of the plot.(optional).
  • height string Especifies the height of the plot.(optional).

graph_stats

Retrieves a plot of the forecast statisitics of the given reach_id. These statistcis are Maximun, Minimun, 25% percentile, 75% percentile, and Mean. The function also lets customize the width, heigh, and title of the graph if needed. The retrieved plots are plotted using Plotly, so a button to download data has been added to the plots

Parameters

  • reachid number reach_id of an specific stream
  • htmlElement string It is the id of the HTML element.
  • title string it is the title of the grah (optional).
  • rp boolean -Tells the function to add the return periods to the plot of the Forecast Records.(optional).
  • width string Especifies the width of the plot.(optional).
  • height string Especifies the height of the plot.(optional).

Historical

The HISTORICAL object contains the functions that are related to the Historical data of a reach_id of a given stream.

Type: Object

Properties

  • graph Function Retrieves a plot of the historical data of the given reach_id.

graph

Retrieves the plot related to the Historical Records for a given reach_id of an stream. In addition, the function lets customize the width, heigh, and title of the graph if needed. The retrieved plots are plotted using Plotly, so a button to download data has been added to the plots

Parameters

  • reachid number reach_id of an specific stream
  • htmlElement string It is the id of the HTML element.
  • title string it is the title of the grah (optional).
  • rp boolean -Tells the function to add the return periods to the plot of the Forecast Records.(optional).
  • width string Especifies the width of the plot.(optional).
  • height string Especifies the height of the plot.(optional).

Seasonal

The SEASONAL object contains the functions that are related to the plots of the Seasonal average data of a reach_id of a given stream.

Type: Object

Properties

  • graph Function Retrieves a plot of the historical data of the given reach_id.

graph

Retrieves the plot related to the Seasonal Average Data for a given reach_id of an stream. In addition, the function lets customize the width, heigh, and title of the graph if needed. The retrieved plots are plotted using Plotly, so a button to download data has been added to the plots

Parameters

  • reachid number reach_id of an specific stream
  • htmlElement string It is the id of the HTML element.
  • title string it is the title of the grah (optional).
  • width string Especifies the width of the plot.(optional).
  • height string Especifies the height of the plot.(optional).