Skip to content

A Node.js API wrapper for GeoNet — Aotearoa's geological hazard monitoring system

License

Notifications You must be signed in to change notification settings

carolinaisslaying/geonet

GeoNet API Wrapper

Compile TypeScript Discord

A Node.js API wrapper for GeoNet — Aotearoa New Zealand's geological hazard monitoring system.

Note: This wrapper has been independently developed by Carolina Mitchell and is not officially affiliated with GeoNet or GNS Science.

Installation

npm install geonet
# or
pnpm add geonet
# or
yarn add geonet

Features

  • 🌋 Volcano monitoring and alert levels
  • 🌊 Earthquake data and intensity measurements
  • 📰 News feed integration
  • 📡 Network sensor data access
  • 📊 Strong motion data
  • 🗺️ GeoJSON format support
  • 🧰 Quality of life utilities
  • ✨ Full TypeScript support
  • 📝 Comprehensive documentation

Quick Start

TypeScript

import { GeoNet } from "geonet";
import { MMI } from "geonet/dist/@types/common";

const geonet = new GeoNet();

// Get recent earthquakes
const quakes = await geonet.getQuakes(MMI.Light);

// Get volcano alert levels
const alerts = await geonet.getVolcanoAlertLevel();

JavaScript

const { GeoNet } = require("geonet");

const geonet = new GeoNet();

// Get recent earthquakes (MMI = 3 for Light intensity)
const quakes = await geonet.getQuakes(3);

// Get volcano alert levels
const alerts = await geonet.getVolcanoAlertLevel();

Error Handling

try {
    const quakes = await geonet.getQuakes(MMI.Light);
} catch (error) {
    console.error("Error fetching quakes: ", error.message);
}

Documentation

For detailed documentation, visit our documentation site.

Contributing

Contributions are welcome! Please read documentation and get familiar with the project code. For details on our code of conduct please see our Code of Conduct.

If you identify a security vulnerability, please read our Security Policy for information on how to report it, and what versions are supported.

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build the package
pnpm build

# See documentation
pnpm docs

# Generate documentation
pnpm run docs

Licence

This project is licensed under the AGPL-3.0 Licence, see the LICENCE file for details.

Related Links

Support

Acknowledgments