niwa-citizen-science-lib
v2.2.0
Published
This project is to use and view data from the NIWA Citizen Science project.
Downloads
23
Readme
NIWA Citizen Science Library
This project is to use and view data from the NIWA Citizen Science project.
It is intended mostly of in house use but 3rd parties are allowed to view data and this library whousl help them.
Usage
npm install niwa-citizen-science-lib
Import the module where you need it
import { NiwaCitizenScienceLibModule } from 'niwa-citizen-science-lib';
Configure the base URL for the library
const citizenScienceConfig: CitizenScienceConfig = {
baseUrl: 'https://citizenscience.niwa.co.nz'
};
Import it into your module
@NgModule({
declarations: [AppComponent],
imports: [
NiwaCitizenScienceLibModule.forRoot(citizenScienceConfig),
...
Options
surveyId: The id of the survey (not the response) that the responses are for
surveyResponseId: The id of the response to display
maxQuestions (optional): The maximum number of questions to display results for, all others are hidden
questionFilter (optional): Comma separated array of questions to display, all others are hidden
Example
<app-survey-response
[surveyId]='1'
[surveyResponseId]='100'
[questionFilter]="['Stream name', 'Upstream photo', 'Structure type' ]"></app-survey-response>