# seisplotjs-waveformplot

> Plotting seismic data in miniseed format using d3.

Latest version **1.2.4** (published 2018-07-17) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install seisplotjs-waveformplot
pnpm add seisplotjs-waveformplot
yarn add seisplotjs-waveformplot
bun add seisplotjs-waveformplot
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2018-07-17 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 291.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Philip Crotwell |
| Maintainers | crotwell |
| Keywords | seismology, miniseed, d3, seismogram |

## Links

- npm: https://www.npmjs.com/package/seisplotjs-waveformplot
- Repository: https://github.com/crotwell/seisplotjs-waveformplot
- Issues: https://github.com/crotwell/seisplotjs-waveformplot/issues
- npm.io page: https://npm.io/package/seisplotjs-waveformplot

## Dependencies (4)

- [d3](https://npm.io/package/d3.md) ^5.5.0
- [pikaday](https://npm.io/package/pikaday.md) ^1.7.0
- [seisplotjs-miniseed](https://npm.io/package/seisplotjs-miniseed.md) ^1.2.1
- [seisplotjs-fdsndataselect](https://npm.io/package/seisplotjs-fdsndataselect.md) ^1.1.3

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.2.4 (latest) — 2018-07-17
- 1.2.3 — 2018-01-30
- 1.2.2 — 2018-01-25
- 1.2.1 — 2017-06-19
- 1.2.0 — 2017-05-16
- 1.1.0 — 2016-11-30
- 1.0.1 — 2016-11-10
- 1.0.0 — 2016-10-17

## README

# seisplotjs-waveformplot
Plotting seismic data in miniseed format using d3

A [gist is here](https://gist.github.com/crotwell/27eadb025d22c21b9098f4aeb7d72316)
that can be viewed at [bl.ocks.org](http://bl.ocks.org/crotwell/27eadb025d22c21b9098f4aeb7d72316)

Another example is available at [here](http://www.seis.sc.edu/~crotwell/seisplotjs_demo/seisplotjs-waveformplot/)

Example:

This is for simple usage in a web page. For more complex cases you should probably just use npm with

```
npm install seisplotjs-waveformplot
```

Create html with a div tag with the parameters and a class, in test.html. Also put a script tag at the end of the body. Note, it needs to be at the end so that we are sure the DOM has been loaded before the javascript runs.

```html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="utf-8" />
   <link rel="stylesheet" href="style.css">
</head>
<body>
<div class='myseisplot' net='CO' sta='JSC' loc='00' chan='HHZ' duration='360'>
</div>

<!-- important that this script element is at the end so the DOM exists before it runs. -->
<!-- older browsers ( and maybe current ones) may need to polyfill. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
<script src="http://www.seis.sc.edu/~crotwell/seisplotjs_demo/seisplotjs-waveformplot/example/seisplotjs_waveformplot_1.2.3_standalone.js"></script>
<script>
    seisplotjs_waveformplot.createPlotsBySelector('div.myseisplot');
</script>
</body>
</html>
```

You must set CSS stroke and fill for the path.seisplot elements
in order for the seismogram to display properly. You may also want to set
the height style. The plots are in SVG and so there are many styling attributes you
can apply. In style.css:

```css
div.myseisplot {
  height: 500px;
}

path.seispath {
  stroke: skyblue;
  fill: none;
}
```

Load the html page in your browser and you should end up with a seismogram plot.

**Please note**, you need to be careful with the amount and frequency that you load data. In particular, asking for very long time intervals will take significant time to request and take a lot of memory. Secondly, it is considered rude to repeatedly reload the page to make the display act like a real time display. This will likely cause the [IRIS DMC](http://service.iris.edu/fdsnws/dataselect/docs/1/help/) to block your requests. See the sections
[Considerations](http://service.iris.edu/fdsnws/dataselect/docs/1/help/#considerations)
and [Usage guidelines](http://ds.iris.edu/ds/nodes/dmc/services/usage/)
in the IRIS help pages for more information.

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