civil-analytics-js
v0.1.2
Published
JavaScript SDK for Civil Analytics
Downloads
4
Readme
Civil Analytics | Ideea.io | Full Documentation | NPM
Civil Analytics JS SDK
Civil Analytics is an API built for government and local authorities to collect data on highway assets such as signs, traffic signals, overhead lighting and road markings.
Installation
$ npm install civil-analytics-js
Getting Started
const CA = require('civil-analytics-js')
const fs = require('fs')
var ca = new CA('YOUR_API_KEY')
// Upload Video
ca.videos.upload({
group_id: '00ffedbb-ff29-5138-9b5d-cd1f6ae3bc6b',
video: fs.readFileSync('./dashcam.mp4'),
}).then(function (media) {
// Analyse Video
ca.extraction.create({
group_id: '00ffedbb-ff29-5138-9b5d-cd1f6ae3bc6b',
media_id: media.id,
model: 'uk-road-signs',
}).then(function (extraction) {
console.log(`Asset Extraction started: ${extraction.id}`)
})
})