-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The soil sample importer enables you to load a FarmData JOSN and import soil sample results in to it.
This module has the capability to average out values ovaer paddocks, if there is more than one sample result associated with a paddock. FarmData block could contain paddock groups. This paddock groups allows user to group paddocks. For more details of manipulating paddock groups please refer farmbuild-wep-mapping. The soils sample importer is capable of averaging out values across these paddock groups as well.
Range based classification is also part of the API functions. Using two JSON files its possible to define which fields are mandatory to import and the classification information of those fields. These two files are explained in detail below. These two files are fully customizable, but the keys seen in these JSON files are esseintail.
- FarmData JSON. Refer to farmbuild-farmdata component wiki for more details of the contents of the JSON.
- CSV file containing the soil sample results of the farm. The CSV file should contain the headers of each column as the first row.
- FarmData JSON with the the soil sample results information included.
There are two JSON files required to carry out the sample result importing. These files are fully customizable.
- Import Field Defaults
This file defines the set of mandatory fields the user has to pick from the columns in the CSV file. These will be seen as the dropdown selections when user is matching the columns. The objects in this JSON file has several mandatory keys. These are described below- name : The name user would see in the drop down for the column selection in the example.
- soilClassificationName: name of the object defined in soil classification defaults file. If no classification leave as undefined.
- hasAverage: If it is possible to average the field values or not.
The default file been used in these examples can be found at /src/import-field-definition/defaults.conf.src.js .
- Soil Classification Defaults
This file describes the range classifications for the import fields defined in the above mentioned import field defaults file. All the import fields need not have a range classification. A range classification of a single field currently has the following keys.- name : The name used to map the soilClassificationName in the import fields defaults file.
- ranges :
- name: Name visible to the user when the classification is done.
- min : Min value of the range
- max : Max value of the range.
- defaultColor : The color code for each range.
Complex range classifications, ranges based on other range values, has not yet been implemented in the current farmbuil-soil-sample-importer component. The default file been used in these examples can be found at /src/soil-classification/defaults.conf.src.js.