Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fracpete committed May 24, 2024
1 parent 11693f8 commit 4740f46
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*~
*.bak
*.swp
*.mdb
*.db
*.db-journal
tmp/
.idea/
*.iml
*.props
output/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# soil-engineering
Diffuse reflectance near infrared spectroscopy and Soil engineering properties data.

This study aimed to assess performance of NIR-PLS for rapid estimation of several soil properties that are
commonly used in materials indices for civil engineering applications using an independent validation data
set drawn from the same geographical area. (2014-12-08)


## Downloads

* [2024.5.24](https://github.com/spectral-datasets/soil-engineering/releases/tag/v2024.5.24)

* [all.zip](https://github.com/spectral-datasets/soil-engineering/releases/download/v2024.5.24/all.zip)

* [raw](https://github.com/spectral-datasets/soil-engineering/releases/tag/raw)

* [dataverse_files.zip](https://github.com/spectral-datasets/soil-engineering/releases/download/raw/dataverse_files.zip)


## Citation


Waruru, B.k.; Shepherd, K.D.; Ndengwa, G.M>; Kamoni, P.T,; Sila, A.M., 2015, "Replication data for: Diffuse reflectance near infrared spectroscopy and Soil engineering properties data", https://doi.org/10.34725/DVN/27989, World Agroforestry (ICRAF), V1, UNF:6:NV7pXWN1OyEZqGsAqlY9WQ== [fileUNF]


## Links

* [Dataset](https://data.worldagroforestry.org/dataset.xhtml?persistentId=doi:10.34725/DVN/27989)


## License

* Dataset: [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/)
* ADAMS flow: [MIT](https://opensource.org/licenses/MIT)
45 changes: 45 additions & 0 deletions convert.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Project: adams
# Date: 2024-05-24 15:20:48
# User: fracpete
# Charset: UTF-8
# Modules: adams-bootstrapp,adams-compress,adams-core,adams-db,adams-event,adams-excel,adams-heatmap,adams-imaging,adams-imaging-boofcv,adams-json,adams-math,adams-matlab,adams-meta,adams-ml,adams-net,adams-odf,adams-pdf,adams-pyro4,adams-python,adams-r,adams-rats-core,adams-rats-net,adams-rats-redis,adams-rats-rest,adams-rats-webservice,adams-redis,adams-rest,adams-security,adams-spectral-2dim-core,adams-spectral-2dim-handheld,adams-spectral-2dim-r,adams-spectral-2dim-rats,adams-spectral-2dim-webservice,adams-spectral-3way-core,adams-spectral-app,adams-spreadsheet,adams-terminal,adams-visualstats,adams-webservice,adams-webservice-core,adams-weka-lts,adams-xml,adams-yaml
#
adams.flow.control.Flow -annotation "Expects two sub-dirs in the same dir as the flow:\\n- raw\\n- output\\nThe raw directory must contain the CSV files." -error-handling ACTORS_DECIDE_TO_STOP_ON_ERROR -flow-execution-listener adams.flow.execution.NullListener -flow-restart-manager adams.flow.control.flowrestart.NullManager
adams.flow.standalone.CallableActors
adams.flow.sink.SpectrumDisplay -name Soil -display-type adams.flow.core.displaytype.Default -writer adams.gui.print.NullWriter -color-provider adams.gui.visualization.core.DefaultColorProvider -paintlet "adams.gui.visualization.spectrum.SpectrumPaintlet -always-show-markers false -anti-aliasing-enabled false" -plot-updater "adams.flow.sink.spectrumdisplay.SimplePlotUpdater -update-interval 50"
adams.flow.standalone.SetVariable -var-name wavenumber_header_row -var-value 1
adams.flow.standalone.SetVariable -name "SetVariable (2)" -var-name wavenumber_regex -var-value n(.*)
adams.flow.standalone.SetVariable -name "SetVariable (3)" -var-name columns_with_wavenumbers -var-value 2-last
adams.flow.standalone.SetVariable -name "SetVariable (5)" -var-name rows_with_samples -var-value 2-last
adams.flow.standalone.SetVariable -name "SetVariable (6)" -var-name columns_with_meta -var-value ""
adams.flow.standalone.SetVariable -name "SetVariable (8)" -var-name row_sample_data_names -var-value 1
adams.flow.standalone.SetVariable -name "SetVariable (9)" -var-name id_column -var-value 1
adams.flow.source.Variable -var-name flow_dir -conversion adams.data.conversion.StringToString
adams.flow.control.Tee -name "Read sample data and put in storage"
adams.flow.transformer.AppendName -suffix "raw/Soil engineering properties_2.csv" -use-forward-slashes true
adams.flow.transformer.SpreadSheetFileReader -reader "adams.data.io.input.CsvSpreadSheetReader -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.DefaultSpreadSheet -no-header true"
adams.flow.transformer.Convert -conversion "adams.data.conversion.SpreadSheetRowsToSampleData -row-sampledata-names 1 -rows-sampledata-values 2-last -cols-sampledata 1-last -col-id 1"
adams.flow.transformer.Convert -name "Convert (2)" -conversion adams.data.conversion.SampleDataArrayToMap
adams.flow.transformer.SetStorageValue -storage-name sampledata_map
adams.flow.control.Tee -name "Read spectra"
adams.flow.transformer.AppendName -suffix raw/Raw_NIR_spectra.csv -use-forward-slashes true
adams.flow.transformer.SpreadSheetFileReader -name "SpreadSheetFileReader (2)" -reader "adams.data.io.input.CsvSpreadSheetReader -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.DefaultSpreadSheet -no-header true"
adams.flow.transformer.Convert -conversion "adams.data.conversion.SpreadSheetRowsToSpectra -row-wave-number @{wavenumber_header_row} -wave-number-regexp @{wavenumber_regex} -cols-amplitude @{columns_with_wavenumbers} -rows-amplitude @{rows_with_samples} -row-sampledata-names @{row_sample_data_names} -cols-sampledata @{columns_with_meta} -col-id @{id_column}"
adams.flow.transformer.ArrayToSequence
adams.flow.control.TryCatch -error-post-processors adams.flow.control.errorpostprocessor.Null
adams.flow.control.SubProcess -name try
adams.flow.transformer.MergeSampleDataFromMap -storage-name sampledata_map
adams.flow.transformer.SetStorageValue -storage-name spectrum
adams.flow.control.Tee -name display -skip true
adams.flow.sink.CallableSink -callable Soil
adams.flow.transformer.InstanceGenerator -generator "adams.data.instances.SimpleInstanceGenerator -add-sample-id true -additional Depth[S] -additional mc[N] -additional CEC[N] -additional tclay[N] -additional PL[N] -additional LL[N] -additional PI[N] -additional LS[N] -additional Ac[N] -additional COLE[N] -no-additional-prefix true -field VS[N] -wave-number-as-suffix true"
adams.flow.transformer.WekaInstanceBuffer
adams.flow.transformer.SetStorageValue -name "SetStorageValue (2)" -storage-name data
adams.flow.control.SubProcess -name catch
adams.flow.control.Tee -name display -skip true
adams.flow.sink.CallableSink -callable Soil
adams.flow.transformer.PassThrough
adams.flow.control.Trigger -name "Save CSV"
adams.flow.standalone.SetVariable -var-name output_file -var-value @{flow_dir}/output/all.csv -expand-value true
adams.flow.source.StorageValue -storage-name data -conversion adams.data.conversion.UnknownToUnknown
adams.flow.sink.WekaFileWriter -output @{output_file} -use-custom true -saver "weka.core.converters.SpreadSheetSaver -writer \"adams.data.io.output.CsvSpreadSheetWriter -always-quote-text true\""

0 comments on commit 4740f46

Please sign in to comment.