https://github.com/carolinaisslaying/geonet
A Node.js API wrapper for GeoNet β Aotearoa's geological hazard monitoring system
https://github.com/carolinaisslaying/geonet
aotearoa api earthquake earthquake-api earthquakes geonet new-zealand
Last synced: 23 days ago
JSON representation
A Node.js API wrapper for GeoNet β Aotearoa's geological hazard monitoring system
- Host: GitHub
- URL: https://github.com/carolinaisslaying/geonet
- Owner: carolinaisslaying
- License: agpl-3.0
- Created: 2025-01-19T12:53:45.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-06T11:26:22.000Z (3 months ago)
- Last Synced: 2025-05-07T20:18:38.500Z (23 days ago)
- Topics: aotearoa, api, earthquake, earthquake-api, earthquakes, geonet, new-zealand
- Language: TypeScript
- Homepage: https://geonet.js.org/
- Size: 880 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# GeoNet API Wrapper
[](https://github.com/carolinaisslaying/geonet/actions/workflows/compile.yml)
[
](https://discord.gg/VVTJhkKc4G)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
```bash
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
```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
```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
```typescript
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](https://geonet.js.org/).
## 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](https://github.com/carolinaisslaying/geonet/blob/main/CODE_OF_CONDUCT.md).
If you identify a security vulnerability, please read our [Security Policy](https://github.com/carolinaisslaying/geonet/blob/main/SECURITY.md) for information on how to report it, and what versions are supported.
## Development
```bash
# 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](https://github.com/carolinaisslaying/geonet/blob/main/LICENCE) file for details.
## Related Links
- [GeoNet API Documentation](https://api.geonet.org.nz)
- [GeoNet Website](https://www.geonet.org.nz)
- [GeoNet Data Policy](https://www.geonet.org.nz/policy)## Support
- [GitHub Issues](https://github.com/carolinaisslaying/geonet/issues)
- [Discord](https://discord.gg/VVTJhkKc4G)
- [Documentation](https://geonet.js.org/)## Acknowledgments
- [Carolina Mitchell](https://github.com/carolinaisslaying) for creating this package.
- [Khai Dye-Brinkman](https://github.com/khaishea) for contributing to code debugging.
- [GeoNet](https://geonet.org.nz/) for providing the public API.
- [GNS Science](https://www.gns.cri.nz) and [Natural Hazards Commission](https://www.naturalhazards.govt.nz) for operating GeoNet.