Skip to content
a Koop provider plugin for OpenDataSoft
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src support pass-through query Aug 5, 2019
test
.gitignore Initial commit Jul 30, 2019
.travis.yml initial release Aug 1, 2019
CHANGELOG support pass-through query Aug 5, 2019
LICENSE
README.md Merge branch 'master' of github.com:haoliangyu/koop-provider-opendata… Aug 5, 2019
koop.json initial release Aug 1, 2019
package-lock.json 0.2.0 Aug 5, 2019
package.json

README.md

koop-provider-opendatasoft

npm Build Status

A Koop provider plugin to load data from a OpenDataSoft data portal or the Data Network for public datasets.

This provider uses the OpenDataSoft V2 API to request raw data in GeoJSON format.

No configuration is required.

Installation

npm install koop-provider-opendatasoft

Use

Register the provider into your Koop app

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 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.

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 from the Data Network

GET http://localhost:8080/opendatasoft/rest/services/data.opendatasoft.com/local-air-quality@townofchapelhill/FeatureServer/0/query

License

MIT

You can’t perform that action at this time.