Releases: uihilab/HydroLang
Releases · uihilab/HydroLang
v1.1.1
v1.1.1
Highlights
- Addition of HydroLang CSDMS BMI compliant version with steering files and examples
- Updates on overall code's variable definition using multiple declarations at the initial stages of each function
function (args) {
var myVar1, myVar2, myVar3;
...
}
- updates on analyze module
- updates on visualization options.
- addition of code of conduct and contributing, issue and feature requests, and pull requests templates.
data
- modified retrieve function to include SOAP, XML.
- added recursiveSearch function, available through the hydroLang object call.
analyze
stats
- equationSystemSolver: solves a linear equation in the form Ax=b.
maps
visualize
External Library Dependencies
Data Sources
- update on the type of request (soap, json, xml, csv, tabular...) and the method (GET, POST, DELETE...)
- added SOAP1.1 envelope attached to requests done to different endpoints.
Additions
- EPA: main precipitation NLDAS endpoint, but can be modified in the configuration object.
- IFIS: all available endpoints in XML format.
- CUAHSI: added REST APIs WaterOneFlow, HydroShare, and HIS Central. For the WaterOneFlow the following endpoints have been implemented. Initial 25 endpoints added, more to come in following updates.
Removals
- SMHI
v1.1.0
v1.1.0
Highlights
- updates on parameter destructuring to every function within the framework having the following structure:
hydro[module][function]({params:{}, args:{}, data: []})
- removal of initial configuration for metric system in the core class function.
- logo updates.
- additional data sources available.
- updates on versions of external sources.
- updates on visualization options.
- updates on code, adopting more ES6 standard throughout the framework.
data
- modified retrieve function to include SOAP, XML.
- added recursiveSearch function, available through the hydroLang object call.
analyze
hydro
- equationSystemSolver: solves a linear equation in the form Ax=b.
maps
- all functions are now accessed through the loader, Layers, and renderMap functions.
visualize
- all visualizing options are now accessed through the draw function, with each request done through the specification on the parameters to the function.
- added functions for dynamically adding scripts, forms, divs into the DOM.
External Library Dependencies
- Google Charts: removal of the 2009 version and instead connect through most stable external available CDN.
Data Sources
- update on the type of request (soap, json, xml, csv, tabular...) and the method (GET, POST, DELETE...)
- added SOAP1.1 envelope attached to requests done to different endpoints.
Additions
- EPA: main precipitation NLDAS endpoint, but can be modified in the configuration object.
- IFIS: all available endpoints in XML format.
- CUAHSI: added REST APIs WaterOneFlow, HydroShare, and HIS Central. For the WaterOneFlow the following endpoints have been implemented. Initial 25 endpoints added, more to come in following updates.
Removals
- SMHI
v1.0.0
Initial Release
Highlights
- 4 modules created including (click on each for function documentation): Data, Analyze, Visualize, Maps.
- Functions accessed through dot or object notation(i.e.
hydro.module.function(args)
orhydro[module][function](args)
) - Function arguments need to be explicitly passed as established in the documentation of each function.
- Library needs to be served into an HTML page by either a local server (i.e. VSCode live server) or by the user's available infrastructure.
data
- retrieve : depending on the types of request required (please refer to the data sources for specifics on the data requests).
- transform: changes data into different formats (JS Array, JSON, CSV, XML initial implementation).
- upload: uploads data in specific types (JS Array, JSON, CSV) modifying the type of data to be used.
- download: downloads files in different formats (JSON, CSV) from other formats (JS Array, JSON, CSV).
analyze
hydro
- arithmetic: calculates the aerial mean precipitation for a storm event.
- thiessen: calculates the average precipitation considering the Thiessen polygonal distribution.
- syntheticalc: calculates a unit hydrograph for using several methods (SCS, Snyder Unit Hydrograph).
- dimunithydro: creates a dimensionless unit hydrograph using the gamma distribution for calculating Q/Qp. For selection of the peak rate factor, consider that a PRF of 100 is for less flat areas while a PRF of 600 is for very steep terrain.
- unithydrocons: unit hydrograph constructor NRCS constructor depending on the physical characteristics of a regularly shaped basin.
- floodhydro: flooding hydrograph generator using a unit hydrograph, precipitation data and SCS metrics for runoff calculation. If the observed hydrograph option is selected, the precipitation must be divided in blocks of rainfall in as a 2D array [[date, date, date], [rainf, rainf, rainf]]
- bucketmodel: simple rainfall-runoff analyses over a rainfall dataset given landuse, baseflow and infiltration capacity.
- ground1d: solves 1d groundwater steady simulation using gaussian elimination.
- rainaggr: aggregates or dissaggregates rainfall data depending on what the user requires.
- totalprec: sums precipitation values fed as a single array.
- move: used to move arrays from one location to another without copying.
- matrix: creates an mxn matrix filled with whatever the user requires.
NN (neural nets)
- createModel: creates a sequential model with a specified number of inputs, neurons, and outputs.
- converToTensor: grabs data served as input and converts to input for training, or calculations as TensorFlow tensors.
- trainModel: trains a model given inputs and outputs of training data, generating weights for the expected model output. The model can be saved and downloaded.
- prediction: use a trained model to calculate outputs based on raw data.
stats
- copydata: creates a deep copy of an n-d array.
- onearray: retrieves 1-d array from data.
- datagaps: identifies the number of data gaps within an array of numbers.
- gapremoval: removes gaps in array with the option of dropping the index.
- timegaps: identifities the gaps found within a 1d JStime data array, assuming continuity in the array.
- gapfiller: fills data gaps(either missing time or missing data), unfinished.
- sum: non-native data array summation.
- mean: non-native data array mean.
- median: non-native data array median.
- stddev: calculates the standard deviation of an array of data.
- variance: calculates the variance of an array of data.
- sumsqrd: returns the square sum of an array of data.
- min: non-native data array min.
- max: non-native data array max.
- unique: returns all the unique values found in array of data.
- frequency: returns the frequency bins of an array of data.
- standardize: uses mean and standard deviation to standardize an array of data.
- quantile: returns the quantile distribution for a given dataset.
- interoutliers: identifies outliers in a dataset using interquartile range.
- normoutliers: identifies outliers in a dataset by normalizing the data given minmax thresholds.
- outremove: removes outliers from a dataset.
- correlation: calculates Pearson coefficient from bivariate analysis.
- fastfourier: calculates a fast Fourier analysis over a dataset.
- basicstats: returns basic statistics (min, max,sum...) for a given dataset.
- joinarray: table data preprocessing utility.
- flatenise: flatenises an n-d array into a 1-d array.
- numerise: parsing strings to numbers for n-d arrays.
- cleaner: filters items in an array classified with undefined, NaN, null, "...
- itemfilter: filters items in an array based on another array.
- dateparser: changes a date array into local strings.
- arrchange: transposes a matrix.
- push: pushes an array into subsequent array.
maps
- loader: loads the map loader library previous to rendering on screen.
- Layers: layer function for appending tiles, georeferenced data, markers, kml data types or drawing tools.
- renderMap: rendering function depending on the type of engine used (Google Maps, Leaflet).
- geoJSON: creates a specific type of marker depending on the requirements from a single feature geoJSON format.
- kml: creates kml data layer passed as an object appended to a map.
- addMarker: adds a new marker to a given map, given coordinates, map type and marker type.
- markerstyles: creates different types of markers in different formats.
- draw: adds a drawing tool into a map.
visualize
- chart: creates a chart (column, line, scatter, boxplot, etc.).
- table: creates a table using n-d data.
- styles: presetting styles for charts and tables.
- ensureGoogleChartsIsSet: calls the google chart library, allowing usage.
External Library Dependencies
- D3 v5.16.0, minified external CDN.
- Google Charts 2009 release, library file saved in the framework.
- JQuery v3.5.1, external CDN.
- Google Maps, external library call.
- Leaflet, v1.6.0, external CDN with KML plugin.
- TensorFlow, v1.0.2, external CDN.
Available Data Sources
All data sources require specific sent request formats. The user needs to verify that the requirements for each are fulfilled previous to use the retrieve functions. The source have several endpoints added, and will be expanded in future releases. This version supports JSON format calls.
- USGS (United States Geological Survey)
- World Bank
- NOAA (National Oceanographic and Atmospheric Agency)
- SMHI (Swedish Meteorological Observations)
- AEMET (Spanish Meteorological Service)
- MeteoIT (Italian Meteorological Network)
- EAUK (UK Government Data Services)
- FEMA (Federal Emergency Management Agency)
- MeteoStat (Public data repository)