imerss-bioinfo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +156 -0
  2. package/build.js +196 -0
  3. package/docs/css/imerss-viz-all.css +1227 -0
  4. package/docs/css/imerss-viz-wp-overrides.css +70 -0
  5. package/docs/css/pepiowelh.css +76 -0
  6. package/docs/css/xetthecum-external.css +47 -0
  7. package/docs/css/xetthecum-shared.css +80 -0
  8. package/docs/css/xetthecum.css +526 -0
  9. package/docs/js/imerss-viz-all.js +58 -0
  10. package/docs/js/imerss-viz-all.js.map +1 -0
  11. package/docs/js/jquery.js +10881 -0
  12. package/index.html +81 -0
  13. package/index.js +7 -0
  14. package/indexWithJustMap.html +92 -0
  15. package/indexWithMap.html +79 -0
  16. package/indexWithMapHoweSound.html +91 -0
  17. package/indexWithMapPepiowelh.html +119 -0
  18. package/indexWithMapValdes.html +90 -0
  19. package/indexWithMapXetthecum.html +90 -0
  20. package/package.json +50 -0
  21. package/src/WoRMS/taxonAPI.js +13 -0
  22. package/src/arphify.js +662 -0
  23. package/src/assignNames.js +103 -0
  24. package/src/auxBuild/restoreJQuery.js +1 -0
  25. package/src/buildSource/Comprehensive Lists.html +42 -0
  26. package/src/buildSource/Data Paper Part I Visualisation.html +50 -0
  27. package/src/buildSource/Galiano Life List.html +43 -0
  28. package/src/buildSource/Metchosin/index.html +22 -0
  29. package/src/buildSource/Pe'pi'ow'elh.html +72 -0
  30. package/src/buildSource/Squamish Life List.html +48 -0
  31. package/src/buildSource/Valdes Island Biodiversity.html +64 -0
  32. package/src/buildSource/Xetthecum.html +40 -0
  33. package/src/buildSource/dataPaperSunburstAndMap.html +30 -0
  34. package/src/buildSource/index.html +224 -0
  35. package/src/client/css/imerss-viz-wp-overrides.css +70 -0
  36. package/src/client/css/imerss-viz.css +531 -0
  37. package/src/client/css/pepiowelh.css +76 -0
  38. package/src/client/css/xetthecum-external.css +47 -0
  39. package/src/client/css/xetthecum-shared.css +80 -0
  40. package/src/client/css/xetthecum.css +526 -0
  41. package/src/client/html/imerss-viz-map-only.html +75 -0
  42. package/src/client/html/imerss-viz-map-pepi.html +77 -0
  43. package/src/client/html/imerss-viz-map-xetthecum.html +90 -0
  44. package/src/client/html/imerss-viz-map.html +75 -0
  45. package/src/client/html/imerss-viz.html +58 -0
  46. package/src/client/html/importing Xetthecum patterns.txt +10 -0
  47. package/src/client/html/xetthecum-patterns.html +27 -0
  48. package/src/client/img/Animalia_2.svg +1 -0
  49. package/src/client/img/Animalia_Annelida.svg +655 -0
  50. package/src/client/img/Animalia_Chaetognatha.svg +72 -0
  51. package/src/client/img/Animalia_Cnidaria.svg +173 -0
  52. package/src/client/img/Animalia_Ctenophora.svg +298 -0
  53. package/src/client/img/Animalia_Nemertea.svg +54 -0
  54. package/src/client/img/Animalia_Phoronida.svg +271 -0
  55. package/src/client/img/Animalia_Platyhelminthes.svg +58 -0
  56. package/src/client/img/Animalia_Porifera.svg +220 -0
  57. package/src/client/img/Animalia_Sipuncula.svg +155 -0
  58. package/src/client/img/Arachnoidiscus_schmidtii_web_1-2-scaled.webp +0 -0
  59. package/src/client/img/Arrow-down.svg +11 -0
  60. package/src/client/img/Arrow-up.svg +6 -0
  61. package/src/client/img/Chromista.svg +1 -0
  62. package/src/client/img/Pepiowelh/BlackNoWe2-wb-bb.png +0 -0
  63. package/src/client/img/Pepiowelh/BlackNoWe2-wb.png +0 -0
  64. package/src/client/img/Pepiowelh/BlackNoWe2.png +0 -0
  65. package/src/client/img/Pepiowelh/Ecocultural Mapping Banner.svg +1 -0
  66. package/src/client/img/Plankton.jpg +0 -0
  67. package/src/client/img/Plantae.svg +1 -0
  68. package/src/client/img/Plantae_2.svg +1 -0
  69. package/src/client/img/Protista.svg +1 -0
  70. package/src/client/img/Valdes/Valdes Island Conservancy.jpg +0 -0
  71. package/src/client/img/Xetthecum/Agricultural.jpg +0 -0
  72. package/src/client/img/Xetthecum/Anthropogenic_banner.jpg +0 -0
  73. package/src/client/img/Xetthecum/Broad_Leaf.jpg +0 -0
  74. package/src/client/img/Xetthecum/Caves.jpg +0 -0
  75. package/src/client/img/Xetthecum/Coastal_Bluffs.jpg +0 -0
  76. package/src/client/img/Xetthecum/Conifer_Pole_Sapling.jpg +0 -0
  77. package/src/client/img/Xetthecum/Developed.jpg +0 -0
  78. package/src/client/img/Xetthecum/Dock.jpg +0 -0
  79. package/src/client/img/Xetthecum/Eelgrass.jpg +0 -0
  80. package/src/client/img/Xetthecum/Forests_banner.jpg +0 -0
  81. package/src/client/img/Xetthecum/Freshwater_banner.jpg +0 -0
  82. package/src/client/img/Xetthecum/Greig_Creek.jpg +0 -0
  83. package/src/client/img/Xetthecum/Intertidal.jpg +0 -0
  84. package/src/client/img/Xetthecum/Laughlin_Lake.jpg +0 -0
  85. package/src/client/img/Xetthecum/Marine_banner.jpg +0 -0
  86. package/src/client/img/Xetthecum/Mature_Conifer_Forest.jpg +0 -0
  87. package/src/client/img/Xetthecum/Porlier_Pass_Road.jpg +0 -0
  88. package/src/client/img/Xetthecum/Riparian.jpg +0 -0
  89. package/src/client/img/Xetthecum/Rural.jpg +0 -0
  90. package/src/client/img/Xetthecum/Subtidal.jpg +0 -0
  91. package/src/client/img/Xetthecum/Wetland.jpg +0 -0
  92. package/src/client/img/Xetthecum/Woodland.jpg +0 -0
  93. package/src/client/img/Xetthecum/Woodland_banner.jpg +0 -0
  94. package/src/client/img/Xetthecum/Xetthecum.jpg +0 -0
  95. package/src/client/img/Xetthecum/Young_Conifer_Forest.jpg +0 -0
  96. package/src/client/img/Xetthecum/Young_Mixed_Forest.jpg +0 -0
  97. package/src/client/img/Xetthecum/food.svg +38 -0
  98. package/src/client/img/Xetthecum/indicator.svg +52 -0
  99. package/src/client/img/Xetthecum/material.svg +186 -0
  100. package/src/client/img/Xetthecum/medicinal.svg +62 -0
  101. package/src/client/img/Xetthecum/missing-value.svg +3 -0
  102. package/src/client/img/Xetthecum/spiritual.svg +13 -0
  103. package/src/client/img/Xetthecum/trade.svg +74 -0
  104. package/src/client/img/audio.svg +5 -0
  105. package/src/client/img/external-link.svg +3 -0
  106. package/src/client/img/selected-eye.svg +4 -0
  107. package/src/client/img/selected-tick.svg +3 -0
  108. package/src/client/img/thumbs/BCLeps.jpg +0 -0
  109. package/src/client/img/thumbs/Checklist.jpg +0 -0
  110. package/src/client/img/thumbs/Data-Paper-Figma.jpg +0 -0
  111. package/src/client/img/thumbs/Galiano-Data-Paper.jpg +0 -0
  112. package/src/client/img/thumbs/Galiano.jpg +0 -0
  113. package/src/client/img/thumbs/Maxwell.jpg +0 -0
  114. package/src/client/img/thumbs/Squamish.jpg +0 -0
  115. package/src/client/img/thumbs/Valdes.jpg +0 -0
  116. package/src/client/img/thumbs/Xetthecum.jpg +0 -0
  117. package/src/client/img/up-arrow.svg +4 -0
  118. package/src/client/js/autocomplete.js +53 -0
  119. package/src/client/js/checklist.js +179 -0
  120. package/src/client/js/colour.js +139 -0
  121. package/src/client/js/datasetControls.js +212 -0
  122. package/src/client/js/imerss-viz.js +1397 -0
  123. package/src/client/js/leafletMap.js +357 -0
  124. package/src/client/js/leafletMapWithGrid.js +337 -0
  125. package/src/client/js/leafletMapWithRegions.js +381 -0
  126. package/src/client/js/renderSVG.js +108 -0
  127. package/src/client/js/tabs.js +53 -0
  128. package/src/client/js/xetthecum.js +106 -0
  129. package/src/client/json/emptyPhyloMap.json +1 -0
  130. package/src/client/json/kingdomPhyloMap.json +17 -0
  131. package/src/client/json/phyloMap.json +58 -0
  132. package/src/compare.js +97 -0
  133. package/src/compilecsv.js +47 -0
  134. package/src/dataProcessing/LZ4.js +27 -0
  135. package/src/dataProcessing/coordinatePatch.js +151 -0
  136. package/src/dataProcessing/readCSV.js +107 -0
  137. package/src/dataProcessing/readCSVwithMap.js +90 -0
  138. package/src/dataProcessing/readCSVwithoutMap.js +25 -0
  139. package/src/dataProcessing/readJSON.js +23 -0
  140. package/src/dataProcessing/sqlite.js +174 -0
  141. package/src/dataProcessing/summarise.js +122 -0
  142. package/src/dataProcessing/taxonScrape.js +14 -0
  143. package/src/dataProcessing/worker.js +31 -0
  144. package/src/dataProcessing/writeCSV.js +34 -0
  145. package/src/dataProcessing/writeJSON.js +15 -0
  146. package/src/dbtaxa.js +96 -0
  147. package/src/deAuthorise.js +48 -0
  148. package/src/deqgis.js +148 -0
  149. package/src/expressions/expr.js +65 -0
  150. package/src/expressions/jsep.js +925 -0
  151. package/src/filterFirst.js +51 -0
  152. package/src/geom/geoJSON.js +121 -0
  153. package/src/iNaturalist/examples/api.inaturalist.org-v1-taxa!q=Acmispon americanus americanus.json +200 -0
  154. package/src/iNaturalist/examples/api.inaturalist.org-v1-taxa!q=Flabellina japonica.json +61 -0
  155. package/src/iNaturalist/examples/www.inaturalist.org-taxa-877359.json +132 -0
  156. package/src/iNaturalist/iNatUrls.js +17 -0
  157. package/src/iNaturalist/obsAPI.js +150 -0
  158. package/src/iNaturalist/taxonAPI.js +460 -0
  159. package/src/inatObs.js +120 -0
  160. package/src/inattify.js +123 -0
  161. package/src/intersect.js +80 -0
  162. package/src/intersectFilter.js +48 -0
  163. package/src/landlocked.js +137 -0
  164. package/src/lib/jquery.binarytransport.js +51 -0
  165. package/src/lib/lz4-commentary.txt +9 -0
  166. package/src/lib/lz4.js +73 -0
  167. package/src/lib/point-in-polygon.js +36 -0
  168. package/src/lz4.js +40 -0
  169. package/src/marmalise.js +333 -0
  170. package/src/materialise.js +68 -0
  171. package/src/reintegrate.js +71 -0
  172. package/src/taxonomise.js +615 -0
  173. package/src/unscrewGBIF.js +44 -0
  174. package/src/utils/dataSource.js +173 -0
  175. package/src/utils/settleStructure.js +62 -0
  176. package/src/utils/utils.js +92 -0
  177. package/src/viz/plethify.js +39 -0
  178. package/src/wormify.js +154 -0
  179. package/src/xetthecum/xetthecumFilters.js +126 -0
  180. package/test/testDataSource.js +182 -0
  181. package/test/testiNatObsSource.js +38 -0
  182. package/test/testiNatSource.js +50 -0
@@ -0,0 +1,51 @@
1
+ /* eslint-env node */
2
+
3
+ "use strict";
4
+
5
+ var fluid = require("infusion");
6
+ var minimist = require("minimist");
7
+
8
+ require("./dataProcessing/readCSV.js");
9
+ require("./dataProcessing/summarise.js");
10
+
11
+ var hortis = fluid.registerNamespace("hortis");
12
+
13
+ fluid.defaults("hortis.summarise.csvReader", {
14
+ gradeNames: "hortis.summarise",
15
+ outputFile: null,
16
+ listeners: {
17
+ "onHeaders.validateHeaders": {
18
+ funcName: "hortis.summarise.validateHeaders",
19
+ args: ["{that}.headers", "{that}.options.dateField", "{that}.options.uniqueField", "{that}.events.onError"]
20
+ },
21
+ "onRow.storeRow": "{that}.storeRow",
22
+ "onCompletion.writeCSV": {
23
+ funcName: "hortis.imerss.writeCSV",
24
+ args: ["{that}.options.outputFile", "{that}.headers", "{that}.uniqueRows", "{that}.completionPromise"]
25
+ }
26
+ }
27
+ });
28
+
29
+ hortis.summarise.validateHeaders = function (headers, dateField, uniqueField, onError) {
30
+ if (!headers.includes(dateField)) {
31
+ onError.fire("Date field " + dateField + " not found in headers ", headers);
32
+ }
33
+ if (!headers.includes(uniqueField)) {
34
+ onError.fire("Unique filter field " + uniqueField + " not found in headers ", headers);
35
+ }
36
+ };
37
+
38
+ var parsedArgs = minimist(process.argv.slice(2));
39
+
40
+ var outputFile = parsedArgs.o || "filtered.csv";
41
+
42
+ var that = hortis.summarise.csvReader({
43
+ uniqueField: "Taxon name",
44
+ dateField: "Date observed",
45
+ inputFile: "data/Galiano/Galiano_marine_species_catalogue.csv",
46
+ outputFile: outputFile
47
+ });
48
+
49
+ that.completionPromise.then(null, function (error) {
50
+ console.error(error);
51
+ });
@@ -0,0 +1,121 @@
1
+ /* eslint-env node */
2
+
3
+ "use strict";
4
+
5
+ const fluid = require("infusion");
6
+
7
+ require("../lib/point-in-polygon.js");
8
+
9
+ const hortis = fluid.registerNamespace("hortis");
10
+
11
+ hortis.countTrue = function (array) {
12
+ return array.reduce(function (a, c) {return a + c;}, 0);
13
+ };
14
+
15
+ hortis.intersections = 0;
16
+
17
+ hortis.intersectsFeature = function (feature, mappedRow) {
18
+ if (!hortis.isPoint(mappedRow.point)) {
19
+ return false;
20
+ } else {
21
+ var reject = function (message) {
22
+ fluid.fail(message + " for feature ", feature);
23
+ };
24
+ var intersectPolygon = function (polyPolygon) {
25
+ var intersects = polyPolygon.map(function (polygon) {
26
+ ++hortis.intersections;
27
+ return hortis.pointInPolygon(mappedRow.point, polygon);
28
+ });
29
+ var count = hortis.countTrue(intersects);
30
+ return count % 2;
31
+ };
32
+ var geometry = feature.geometry;
33
+ // Stupid export of Galiano polygon has the latter type
34
+ if (geometry.type !== "MultiPolygon" && geometry.type !== "MultiLineString") {
35
+ reject("Cannot handle feature type " + geometry.type);
36
+ } else {
37
+ var coords = geometry.coordinates;
38
+ var intersects = false;
39
+ if (geometry.type === "MultiLineString") {
40
+ intersects = intersectPolygon(coords);
41
+ } else {
42
+ intersects = coords.some(function (polyPolygon) {
43
+ return intersectPolygon(polyPolygon);
44
+ });
45
+ }
46
+ return intersects;
47
+ }
48
+ }
49
+ };
50
+
51
+ hortis.intersectsAnyFeature = function (features, row) {
52
+ const intersects = features.map(function (feature) {
53
+ return hortis.intersectsFeature(feature, row);
54
+ });
55
+ const intersectCount = hortis.countTrue(intersects);
56
+ return intersectCount > 0;
57
+ };
58
+
59
+ hortis.rowToLoggable = function (row) {
60
+ return fluid.filterKeys(row, ["iNaturalistTaxonName", "observationId", "placeName", "latitude", "longitude"]);
61
+ };
62
+
63
+ hortis.makeFeatureRowFilter = function (feature, options) {
64
+ options = options || {};
65
+ return function (rows) {
66
+ let rejections = 0;
67
+ const togo = rows.filter(function (row) {
68
+ row.point = [hortis.parseFloat(row.longitude), hortis.parseFloat(row.latitude)];
69
+ const accept = hortis.intersectsAnyFeature(feature, row);
70
+ if (!accept) {
71
+ ++rejections;
72
+ if (options.logRejection) {
73
+ const tolog = hortis.rowToLoggable(row);
74
+ console.log("Rejecting observation ", tolog, " as lying outside polygon " + options.featureName);
75
+ }
76
+ }
77
+ return accept;
78
+ });
79
+ console.log("Rejecting " + rejections + " observations as lying outside polygon " + options.featureName);
80
+ return togo;
81
+ };
82
+ };
83
+
84
+ hortis.processRegionFilter = function (resolved, patch, key) {
85
+ const filter = hortis.makeFeatureRowFilter(patch.patchData.features, {
86
+ logRejection: patch.logRejection,
87
+ featureName: key
88
+ });
89
+ // TODO: MATT-based immutable filtering!
90
+ resolved.obsRows = filter(resolved.obsRows);
91
+ };
92
+
93
+ hortis.processAssignFeature = function (resolved, patch) {
94
+ const extraCols = {};
95
+ const features = patch.patchData.features;
96
+ const last = Date.now();
97
+ resolved.obsRows.forEach(function (row) {
98
+ row.point = [hortis.parseFloat(row.longitude), hortis.parseFloat(row.latitude)];
99
+ const intersects = features.filter(function (feature) {
100
+ return hortis.intersectsFeature(feature, row);
101
+ });
102
+ if (intersects.length === 0) {
103
+ console.log("Warning: row ", hortis.rowToLoggable(row), " did not intersect any feature");
104
+ } else {
105
+ if (intersects.length > 1) {
106
+ const allProps = fluid.getMembers(intersects, "properties");
107
+ console.log("Warning: row ", hortis.rowToLoggable(row), " intersected multiple features: ", allProps);
108
+ }
109
+ const props = intersects[0].properties;
110
+ fluid.extend(row, props);
111
+ fluid.extend(extraCols, props);
112
+ }
113
+ });
114
+ console.log("Intersected " + resolved.obsRows.length + " observations in " + (Date.now() - last) + " ms");
115
+ const extraOutMap = {
116
+ columns: fluid.transform(extraCols, function (junk, key) {
117
+ return key;
118
+ })
119
+ };
120
+ resolved.combinedObsOutMap = hortis.combineMaps([resolved.combinedObsOutMap, extraOutMap], true);
121
+ };
@@ -0,0 +1,200 @@
1
+ {
2
+ "total_results": 4,
3
+ "page": 1,
4
+ "per_page": 30,
5
+ "results": [
6
+ {
7
+ "observations_count": 3409,
8
+ "taxon_schemes_count": 2,
9
+ "ancestry": "48460/47126/211194/47125/47124/47123/47122/507502/533443/64336",
10
+ "is_active": true,
11
+ "flag_counts": {
12
+ "unresolved": 0,
13
+ "resolved": 0
14
+ },
15
+ "wikipedia_url": "http://en.wikipedia.org/wiki/Acmispon_americanus",
16
+ "current_synonymous_taxon_ids": null,
17
+ "iconic_taxon_id": 47126,
18
+ "rank_level": 10,
19
+ "taxon_changes_count": 3,
20
+ "atlas_id": null,
21
+ "complete_species_count": null,
22
+ "parent_id": 64336,
23
+ "name": "Acmispon americanus",
24
+ "rank": "species",
25
+ "extinct": false,
26
+ "id": 57049,
27
+ "default_photo": {
28
+ "square_url": "https://inaturalist-open-data.s3.amazonaws.com/photos/78383082/square.jpeg",
29
+ "attribution": "(c) Jim Frisinger, some rights reserved (CC BY-NC), uploaded by Jim Frisinger",
30
+ "flags": [],
31
+ "medium_url": "https://inaturalist-open-data.s3.amazonaws.com/photos/78383082/medium.jpeg",
32
+ "id": 78383082,
33
+ "license_code": "cc-by-nc",
34
+ "original_dimensions": {
35
+ "width": 987,
36
+ "height": 1318
37
+ },
38
+ "url": "https://inaturalist-open-data.s3.amazonaws.com/photos/78383082/square.jpeg"
39
+ },
40
+ "ancestor_ids": [
41
+ 48460,
42
+ 47126,
43
+ 211194,
44
+ 47125,
45
+ 47124,
46
+ 47123,
47
+ 47122,
48
+ 507502,
49
+ 533443,
50
+ 64336,
51
+ 57049
52
+ ],
53
+ "matched_term": "Acmispon americanus",
54
+ "iconic_taxon_name": "Plantae",
55
+ "preferred_common_name": "Spanish clover"
56
+ },
57
+ {
58
+ "observations_count": 236,
59
+ "taxon_schemes_count": 3,
60
+ "ancestry": "48460/47126/211194/47125/47124/47123/47122/507502/533443/64336/57049",
61
+ "is_active": true,
62
+ "flag_counts": {
63
+ "unresolved": 0,
64
+ "resolved": 0
65
+ },
66
+ "wikipedia_url": "http://en.wikipedia.org/wiki/Acmispon_americanus",
67
+ "current_synonymous_taxon_ids": null,
68
+ "iconic_taxon_id": 47126,
69
+ "rank_level": 5,
70
+ "taxon_changes_count": 2,
71
+ "atlas_id": null,
72
+ "complete_species_count": null,
73
+ "parent_id": 57049,
74
+ "name": "Acmispon americanus americanus",
75
+ "rank": "variety",
76
+ "extinct": false,
77
+ "id": 57053,
78
+ "default_photo": {
79
+ "square_url": "https://inaturalist-open-data.s3.amazonaws.com/photos/997642/square.jpg",
80
+ "attribution": "(c) Todd Plummer, some rights reserved (CC BY-NC-SA)",
81
+ "flags": [],
82
+ "medium_url": "https://inaturalist-open-data.s3.amazonaws.com/photos/997642/medium.jpg",
83
+ "id": 997642,
84
+ "license_code": "cc-by-nc-sa",
85
+ "original_dimensions": {
86
+ "width": 2048,
87
+ "height": 1568
88
+ },
89
+ "url": "https://inaturalist-open-data.s3.amazonaws.com/photos/997642/square.jpg"
90
+ },
91
+ "ancestor_ids": [
92
+ 48460,
93
+ 47126,
94
+ 211194,
95
+ 47125,
96
+ 47124,
97
+ 47123,
98
+ 47122,
99
+ 507502,
100
+ 533443,
101
+ 64336,
102
+ 57049,
103
+ 57053
104
+ ],
105
+ "matched_term": "Acmispon americanus americanus",
106
+ "iconic_taxon_name": "Plantae",
107
+ "preferred_common_name": "Spanish clover"
108
+ },
109
+ {
110
+ "observations_count": 9,
111
+ "taxon_schemes_count": 1,
112
+ "ancestry": "48460/47126/211194/47125/47124/47123/47122/507502/533443/64336",
113
+ "is_active": true,
114
+ "flag_counts": {
115
+ "unresolved": 0,
116
+ "resolved": 0
117
+ },
118
+ "wikipedia_url": null,
119
+ "current_synonymous_taxon_ids": null,
120
+ "iconic_taxon_id": 47126,
121
+ "rank_level": 10,
122
+ "taxon_changes_count": 1,
123
+ "atlas_id": null,
124
+ "complete_species_count": null,
125
+ "parent_id": 64336,
126
+ "name": "Acmispon helleri",
127
+ "rank": "species",
128
+ "extinct": false,
129
+ "id": 311602,
130
+ "default_photo": {
131
+ "square_url": "https://static.inaturalist.org/photos/51103129/square.jpg",
132
+ "attribution": "(c) Lenny Lampel, all rights reserved, uploaded by Lenny Lampel",
133
+ "flags": [],
134
+ "medium_url": "https://static.inaturalist.org/photos/51103129/medium.jpg",
135
+ "id": 51103129,
136
+ "license_code": null,
137
+ "original_dimensions": {
138
+ "width": 2048,
139
+ "height": 1535
140
+ },
141
+ "url": "https://static.inaturalist.org/photos/51103129/square.jpg"
142
+ },
143
+ "ancestor_ids": [
144
+ 48460,
145
+ 47126,
146
+ 211194,
147
+ 47125,
148
+ 47124,
149
+ 47123,
150
+ 47122,
151
+ 507502,
152
+ 533443,
153
+ 64336,
154
+ 311602
155
+ ],
156
+ "matched_term": "Acmispon americanus helleri",
157
+ "iconic_taxon_name": "Plantae",
158
+ "preferred_common_name": "Carolina prairie trefoil"
159
+ },
160
+ {
161
+ "observations_count": 1,
162
+ "taxon_schemes_count": 1,
163
+ "ancestry": "48460/47126/211194/47125/47124/47123/47122/507502/533443/64336/57049",
164
+ "is_active": true,
165
+ "flag_counts": {
166
+ "unresolved": 0,
167
+ "resolved": 0
168
+ },
169
+ "wikipedia_url": "http://en.wikipedia.org/wiki/Acmispon_americanus",
170
+ "current_synonymous_taxon_ids": null,
171
+ "iconic_taxon_id": 47126,
172
+ "rank_level": 5,
173
+ "taxon_changes_count": 2,
174
+ "atlas_id": null,
175
+ "complete_species_count": null,
176
+ "parent_id": 57049,
177
+ "name": "Acmispon americanus helleri",
178
+ "rank": "variety",
179
+ "extinct": false,
180
+ "id": 57052,
181
+ "default_photo": null,
182
+ "ancestor_ids": [
183
+ 48460,
184
+ 47126,
185
+ 211194,
186
+ 47125,
187
+ 47124,
188
+ 47123,
189
+ 47122,
190
+ 507502,
191
+ 533443,
192
+ 64336,
193
+ 57049,
194
+ 57052
195
+ ],
196
+ "matched_term": "Acmispon americanus helleri",
197
+ "iconic_taxon_name": "Plantae"
198
+ }
199
+ ]
200
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "total_results":1,
3
+ "page":1,
4
+ "per_page":30,
5
+ "results":[
6
+ {
7
+ "observations_count":11,
8
+ "taxon_schemes_count":1,
9
+ "ancestry":"48460/1/47115/47114/551391/775797/775799/775801/47113/801475/500752/603234/603236",
10
+ "is_active":true,
11
+ "flag_counts":{
12
+ "unresolved":0,
13
+ "resolved":0
14
+ },
15
+ "wikipedia_url":"https://en.wikipedia.org/wiki/Ziminella_japonica",
16
+ "current_synonymous_taxon_ids":null,
17
+ "iconic_taxon_id":47115,
18
+ "rank_level":10,
19
+ "taxon_changes_count":1,
20
+ "atlas_id":null,
21
+ "complete_species_count":null,
22
+ "parent_id":603236,
23
+ "name":"Ziminella japonica",
24
+ "rank":"species",
25
+ "extinct":false,
26
+ "id":877359,
27
+ "default_photo":{
28
+ "square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg",
29
+ "attribution":"(c) Sara Thiebaud, some rights reserved (CC BY-NC)",
30
+ "flags":[
31
+ ],
32
+ "medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/medium.jpeg",
33
+ "id":88409951,
34
+ "license_code":"cc-by-nc",
35
+ "original_dimensions":{
36
+ "width":1886,
37
+ "height":1084
38
+ },
39
+ "url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg"
40
+ },
41
+ "ancestor_ids":[
42
+ 48460,
43
+ 1,
44
+ 47115,
45
+ 47114,
46
+ 551391,
47
+ 775797,
48
+ 775799,
49
+ 775801,
50
+ 47113,
51
+ 801475,
52
+ 500752,
53
+ 603234,
54
+ 603236,
55
+ 877359
56
+ ],
57
+ "matched_term":"Flabellina japonica",
58
+ "iconic_taxon_name":"Mollusca"
59
+ }
60
+ ]
61
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "id":877359,
3
+ "name":"Ziminella japonica",
4
+ "rank":"species",
5
+ "source_id":15907,
6
+ "created_at":"2019-03-28T02:07:43.786Z",
7
+ "updated_at":"2021-10-29T21:05:17.230Z",
8
+ "iconic_taxon_id":47115,
9
+ "is_iconic":false,
10
+ "name_provider":null,
11
+ "observations_count":11,
12
+ "listed_taxa_count":32,
13
+ "rank_level":10.0,
14
+ "wikipedia_summary":"\u003ci\u003e\u003cb\u003eZiminella japonica\u003c/b\u003e\u003c/i\u003e is a species of sea slug, an aeolid nudibranch, a marine heterobranch mollusc in the family Paracoryphellidae.",
15
+ "wikipedia_title":"",
16
+ "ancestry":"48460/1/47115/47114/551391/775797/775799/775801/47113/801475/500752/603234/603236",
17
+ "is_active":true,
18
+ "taxon_framework_relationship_id":551743,
19
+ "uuid":"6552ecc9-0a88-4c15-8804-d0703da9b2c8",
20
+ "photos_locked":false,
21
+ "default_name":{
22
+ "id":1537885,
23
+ "name":"Ziminella japonica",
24
+ "is_valid":true,
25
+ "lexicon":"Scientific Names"
26
+ },
27
+ "photo_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg",
28
+ "iconic_taxon_name":"Mollusca",
29
+ "conservation_status_name":null,
30
+ "common_name":null,
31
+ "image_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg",
32
+ "taxon_range_kml_url":null,
33
+ "html":null,
34
+ "default_photo":{
35
+ "id":88409951,
36
+ "user_id":3418777,
37
+ "native_photo_id":null,
38
+ "created_at":"2020-08-05T18:40:31.068Z",
39
+ "updated_at":"2020-08-05T18:40:31.068Z",
40
+ "native_page_url":null,
41
+ "native_username":null,
42
+ "native_realname":null,
43
+ "license":2,
44
+ "subtype":null,
45
+ "native_original_image_url":null,
46
+ "uuid":"75d5407f-aa9e-4c0d-9dcd-5028a9a0e09f",
47
+ "file_extension_id":2,
48
+ "file_prefix_id":1,
49
+ "width":1886,
50
+ "height":1084,
51
+ "license_code":"CC-BY-NC",
52
+ "license_name":"Creative Commons Attribution-NonCommercial License",
53
+ "license_url":"http://creativecommons.org/licenses/by-nc/4.0/",
54
+ "attribution":"(c) Sara Thiebaud, some rights reserved (CC BY-NC), uploaded by Sara Thiebaud",
55
+ "type":"LocalPhoto",
56
+ "square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg",
57
+ "thumb_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/thumb.jpeg",
58
+ "small_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/small.jpeg",
59
+ "medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/medium.jpeg",
60
+ "large_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/large.jpeg"
61
+ },
62
+ "created_at_utc":"2019-03-28T02:07:43.786Z",
63
+ "updated_at_utc":"2021-10-29T21:05:17.230Z",
64
+ "taxon_photos":[
65
+ {
66
+ "id":944035,
67
+ "taxon_id":877359,
68
+ "photo_id":88409951,
69
+ "position":0,
70
+ "created_at":"2020-08-05T18:54:35.242Z",
71
+ "updated_at":"2020-08-05T18:54:35.242Z",
72
+ "photo":{
73
+ "id":88409951,
74
+ "user_id":3418777,
75
+ "native_photo_id":null,
76
+ "created_at":"2020-08-05T18:40:31.068Z",
77
+ "updated_at":"2020-08-05T18:40:31.068Z",
78
+ "native_page_url":null,
79
+ "native_username":null,
80
+ "native_realname":null,
81
+ "license":2,
82
+ "subtype":null,
83
+ "native_original_image_url":null,
84
+ "uuid":"75d5407f-aa9e-4c0d-9dcd-5028a9a0e09f",
85
+ "file_extension_id":2,
86
+ "file_prefix_id":1,
87
+ "width":1886,
88
+ "height":1084,
89
+ "license_code":"CC-BY-NC",
90
+ "attribution":"(c) Sara Thiebaud, some rights reserved (CC BY-NC), uploaded by Sara Thiebaud",
91
+ "square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/square.jpeg",
92
+ "thumb_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/thumb.jpeg",
93
+ "small_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/small.jpeg",
94
+ "medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/medium.jpeg",
95
+ "large_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/88409951/large.jpeg",
96
+ "license_name":"Creative Commons Attribution-NonCommercial License",
97
+ "license_url":"http://creativecommons.org/licenses/by-nc/4.0/",
98
+ "type":"LocalPhoto"
99
+ }
100
+ }
101
+ ],
102
+ "taxon_names":[
103
+ {
104
+ "id":1537885,
105
+ "name":"Ziminella japonica",
106
+ "is_valid":true,
107
+ "lexicon":"Scientific Names",
108
+ "taxon_id":877359,
109
+ "created_at":"2019-03-28T02:07:43.786Z",
110
+ "updated_at":"2019-03-28T02:07:43.786Z",
111
+ "creator_id":26610,
112
+ "position":0,
113
+ "parameterized_lexicon":"scientific-names"
114
+ },
115
+ {
116
+ "id":1537887,
117
+ "name":"Flabellina japonica",
118
+ "is_valid":false,
119
+ "lexicon":"Scientific Names",
120
+ "taxon_id":877359,
121
+ "created_at":"2019-03-28T02:13:42.092Z",
122
+ "updated_at":"2019-03-28T02:13:42.092Z",
123
+ "creator_id":1,
124
+ "position":1,
125
+ "parameterized_lexicon":"scientific-names"
126
+ }
127
+ ],
128
+ "iconic_taxon":{
129
+ "id":47115,
130
+ "name":"Mollusca"
131
+ }
132
+ }
@@ -0,0 +1,17 @@
1
+ /* eslint-env node */
2
+
3
+ "use strict";
4
+
5
+ const fluid = require("infusion");
6
+
7
+ const hortis = fluid.registerNamespace("hortis");
8
+
9
+ hortis.iNaturalistObsFromUrl = function (url) {
10
+ const lastSlashPos = url.lastIndexOf("/");
11
+ return url.substring(lastSlashPos + 1);
12
+ };
13
+
14
+ // Currently disused
15
+ hortis.iNaturalistIdToLink = function (id) {
16
+ return "https://www.inaturalist.org/taxa/" + id;
17
+ };