waterlevel

package
v0.0.0-...-382e8c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package waterlevel provides functions to fetch waterlevel data from the https://luadb.lds.nrw.de website, hosted by LANUV NRW, for all stations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(lastModified string) ([]byte, string, error)

Get raw data and the lastModified date.

func ParseByLocation

func ParseByLocation(input []StationMeasurement) (map[string]Measurement, error)

Types

type Measurement

type Measurement struct {
	Time  time.Time
	Value *float32
}

type StationMeasurement

type StationMeasurement struct {
	StationName string
	Time        time.Time
	Value       *float32
}

StationMeasurement represents one water level measurement on one station.

func Parse

func Parse(data []byte) ([]StationMeasurement, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL