Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haoliangyu/koop-provider-opendatasoft
a Koop provider plugin for OpenDataSoft
https://github.com/haoliangyu/koop-provider-opendatasoft
koop opendatasoft plugin provider
Last synced: 27 days ago
JSON representation
a Koop provider plugin for OpenDataSoft
- Host: GitHub
- URL: https://github.com/haoliangyu/koop-provider-opendatasoft
- Owner: haoliangyu
- License: mit
- Created: 2019-07-30T19:54:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T16:34:16.000Z (over 1 year ago)
- Last Synced: 2024-10-08T12:07:13.837Z (about 1 month ago)
- Topics: koop, opendatasoft, plugin, provider
- Language: JavaScript
- Homepage:
- Size: 967 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# koop-provider-opendatasoft
[![npm](https://img.shields.io/npm/v/koop-provider-opendatasoft)](https://www.npmjs.com/package/koop-provider-opendatasoft) [![Build Status](https://travis-ci.org/haoliangyu/koop-provider-opendatasoft.svg?branch=master)](https://travis-ci.org/haoliangyu/koop-provider-opendatasoft)
A [Koop](https://koopjs.github.io/) provider plugin to load data from a [OpenDataSoft](https://www.opendatasoft.com) data portal or the [Data Network](https://data.opendatasoft.com/explore) for public datasets.
This provider uses the [OpenDataSoft V2 API](https://data.opendatasoft.com/api/v2/console) to request raw data in GeoJSON format.
No configuration is required.
## Installation
```bash
npm install koop-provider-opendatasoft
```## Use
Register the provider into your Koop app
```javascript
const Koop = require("koop");
const opendatasoft = require("koop-provider-opendatasoft");const koop = new Koop();
koop.register(opendatasoft);
koop.server.listen(8080);
```For example, with the default [Geoservices](https://github.com/koopjs/koop-output-geoservices) output, the OpenDataSoft data is available in every route like:
```
"Geoservices" output routes for the "opendatasoft" provider Methods
------------------------------------------------------------------ ---------
/opendatasoft/:host/:id/FeatureServer/:layer/:method GET, POST
/opendatasoft/:host/:id/FeatureServer/layers GET, POST
/opendatasoft/:host/:id/FeatureServer/:layer GET, POST
```## Parameters
This provider requires two parameters in the route URL.
### host
The `host` parameter is the host name of the data repository. It could be your portal or OpenDataSoft's public dataset repository (`data.opendatasoft.com`).
### id
The `id` parameter is the dataset identifier of each OpenDatasoft dataset. It is available at the dataset's information page, for example, like [this](https://data.opendatasoft.com/explore/dataset/centres-pmi%40montreuil/information/).
### Query
The following query parameters are supported:
- token
- where
- outFields
- resultOffset
- resultRecordCount## Example
Get all records from the dataset [Local Air Quality @ Town of Chapel Hill](https://data.opendatasoft.com/explore/dataset/local-air-quality%40townofchapelhill) from the [Data Network](https://data.opendatasoft.com/explore/)
```
GET http://localhost:8080/opendatasoft/rest/services/data.opendatasoft.com/local-air-quality@townofchapelhill/FeatureServer/0/query
```## License
MIT