# metnotimeseries2

> GeoWeb timeseries library for the opengeoweb project

Latest version **2.15.0** (published 2022-08-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install metnotimeseries2
pnpm add metnotimeseries2
yarn add metnotimeseries2
bun add metnotimeseries2
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.15.0 |
| Published | 2022-08-03 |
| First published | 2022-08-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 33 |
| Unpacked size | 187.7 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | flaten |

## Links

- npm: https://www.npmjs.com/package/metnotimeseries2
- Repository: https://gitlab.com/opengeoweb/opengeoweb
- Homepage: https://gitlab.com/opengeoweb/opengeoweb#readme
- Issues: https://gitlab.com/opengeoweb/opengeoweb/issues
- npm.io page: https://npm.io/package/metnotimeseries2

## Dependencies (33)

- [axios](https://npm.io/package/axios.md) ^0.25.0
- [immer](https://npm.io/package/immer.md) ^9.0.15
- [proj4](https://npm.io/package/proj4.md) ^2.6.2
- [react](https://npm.io/package/react.md) ^17.0.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [moment](https://npm.io/package/moment.md) ^2.29.0
- [echarts](https://npm.io/package/echarts.md) ^5.2.1
- [@mui/lab](https://npm.io/package/@mui/lab.md) ^5.0.0-alpha.64
- [@turf/turf](https://npm.io/package/@turf/turf.md) ^5.1.6
- [react-intl](https://npm.io/package/react-intl.md) ^5.17.5
- [redux-saga](https://npm.io/package/redux-saga.md) ^1.1.3
- [sortablejs](https://npm.io/package/sortablejs.md) ^1.14.0
- [@mui/styles](https://npm.io/package/@mui/styles.md) ^5.2.3
- [react-redux](https://npm.io/package/react-redux.md) 7.2.2
- [re-resizable](https://npm.io/package/re-resizable.md) ^6.9.0
- [@mui/material](https://npm.io/package/@mui/material.md) ^5.2.8
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.7.1
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.6.0
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.31
- [react-draggable](https://npm.io/package/react-draggable.md) ^4.4.3
- [react-hook-form](https://npm.io/package/react-hook-form.md) ^6.12.1
- [@opengeoweb/core](https://npm.io/package/@opengeoweb/core.md) 2.10.0
- [@reduxjs/toolkit](https://npm.io/package/@reduxjs/toolkit.md) ^1.8.3
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.5.0
- [react-sortablejs](https://npm.io/package/react-sortablejs.md) ^6.0.0
- [@opengeoweb/theme](https://npm.io/package/@opengeoweb/theme.md) 2.10.0
- [echarts-for-react](https://npm.io/package/echarts-for-react.md) ^3.0.1
- [throttle-debounce](https://npm.io/package/throttle-debounce.md) ^3.0.1
- [@opengeoweb/shared](https://npm.io/package/@opengeoweb/shared.md) 2.10.0
- [@opengeoweb/webmap](https://npm.io/package/@opengeoweb/webmap.md) 2.10.0
- [redux-dynamic-modules](https://npm.io/package/redux-dynamic-modules.md) ^5.2.0
- [@opengeoweb/form-fields](https://npm.io/package/@opengeoweb/form-fields.md) 2.10.0
- [redux-dynamic-modules-saga](https://npm.io/package/redux-dynamic-modules-saga.md) ^5.2.0

## Recent versions

- 2.15.0 (latest) — 2022-08-03
- 2.14.0 — 2022-08-03
- 2.13.0 — 2022-08-03
- 2.12.0 — 2022-08-03
- 2.11.0 — 2022-08-03
- 2.10.0 — 2022-08-03

## README

![current version](https://img.shields.io/badge/dynamic/json?color=blue&label=version&query=version&url=https://gitlab.com/opengeoweb/opengeoweb/raw/master/libs/timeseries/package.json)
![coverage](https://gitlab.com/opengeoweb/opengeoweb/badges/master/coverage.svg?job=test-timeseries)

# Timeseries

This is a Beta release of the timeseries library.
There is a chance for breaking changes with newer versions.

React component library with Timeseries components for the opengeoweb project.
This library was generated with [Nx](https://nx.dev).

## Installation

```
npm install @opengeoweb/timeseries
```

## Use

Timeseries can be used with or without a map component. In the latter case, there needs to be set a location variable set in the presets object.

```javascript
import React from 'react';
import { lightTheme, ThemeWrapper } from '@opengeoweb/theme';
import { Types, TimeSeriesView } from "@opengeoweb/timeseries";

const plotPreset = {
  mapId: 'TimeseriesMap',
  location: {
    lat: 60,
    lon: 10,
  },
  plots: [
    {
      title: 'Plot 1',
      plotId: 'Plot_1',
    },
    {
      title: 'Plot 2',
      plotId: 'Plot_2',
    },
  ],
  services: [
    {
      parameters: [
        {
          plotId: 'Plot_1',
          unit: 'C',
          propertyName: 'Temperature',
          plotType: 'line',
        },
        {
          plotId: 'Plot_1',
          unit: 'C',
          propertyName: 'DewPoint',
          plotType: 'line',
        },
        {
          plotId: 'Plot_2',
          unit: '%',
          propertyName: 'Humidity',
          plotType: 'line',
        },
      ],
      serviceUrl: 'url to ogc api features service',
    },
  ],
};

export const App: React.FC = () => (
  <ThemeWrapper theme={lightTheme}>
   <TimeSeriesView
      plotPreset={plotPreset as Types.PlotPreset}
      selectedLocation={{ lat: 61.2, lon: 5.6 }}
    />
  </ThemeWrapper>
);
```

## Running unit tests

Run `nx test timeseries` to execute the unit tests via [Jest](https://jestjs.io).

## Preset locations

You can provide a list of preset locations in the format shown below.

```
[
  {
    "lat": 59.911491,
    "lon": 10.757933,
    "name": "Oslo"
  },
  {
    "lat": 52.377956,
    "lon": 4.89707,
    "name": "Amsterdam"
  }
]
```

Each name in the locations needs to be unique. If two locations have the same name you have to seperate them by giving some extra information, for example "Amsterdam1" and "Amsterdam2.

---
_Source: https://npm.io/package/metnotimeseries2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
