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.
- package/README.md +156 -0
- package/build.js +196 -0
- package/docs/css/imerss-viz-all.css +1227 -0
- package/docs/css/imerss-viz-wp-overrides.css +70 -0
- package/docs/css/pepiowelh.css +76 -0
- package/docs/css/xetthecum-external.css +47 -0
- package/docs/css/xetthecum-shared.css +80 -0
- package/docs/css/xetthecum.css +526 -0
- package/docs/js/imerss-viz-all.js +58 -0
- package/docs/js/imerss-viz-all.js.map +1 -0
- package/docs/js/jquery.js +10881 -0
- package/index.html +81 -0
- package/index.js +7 -0
- package/indexWithJustMap.html +92 -0
- package/indexWithMap.html +79 -0
- package/indexWithMapHoweSound.html +91 -0
- package/indexWithMapPepiowelh.html +119 -0
- package/indexWithMapValdes.html +90 -0
- package/indexWithMapXetthecum.html +90 -0
- package/package.json +50 -0
- package/src/WoRMS/taxonAPI.js +13 -0
- package/src/arphify.js +662 -0
- package/src/assignNames.js +103 -0
- package/src/auxBuild/restoreJQuery.js +1 -0
- package/src/buildSource/Comprehensive Lists.html +42 -0
- package/src/buildSource/Data Paper Part I Visualisation.html +50 -0
- package/src/buildSource/Galiano Life List.html +43 -0
- package/src/buildSource/Metchosin/index.html +22 -0
- package/src/buildSource/Pe'pi'ow'elh.html +72 -0
- package/src/buildSource/Squamish Life List.html +48 -0
- package/src/buildSource/Valdes Island Biodiversity.html +64 -0
- package/src/buildSource/Xetthecum.html +40 -0
- package/src/buildSource/dataPaperSunburstAndMap.html +30 -0
- package/src/buildSource/index.html +224 -0
- package/src/client/css/imerss-viz-wp-overrides.css +70 -0
- package/src/client/css/imerss-viz.css +531 -0
- package/src/client/css/pepiowelh.css +76 -0
- package/src/client/css/xetthecum-external.css +47 -0
- package/src/client/css/xetthecum-shared.css +80 -0
- package/src/client/css/xetthecum.css +526 -0
- package/src/client/html/imerss-viz-map-only.html +75 -0
- package/src/client/html/imerss-viz-map-pepi.html +77 -0
- package/src/client/html/imerss-viz-map-xetthecum.html +90 -0
- package/src/client/html/imerss-viz-map.html +75 -0
- package/src/client/html/imerss-viz.html +58 -0
- package/src/client/html/importing Xetthecum patterns.txt +10 -0
- package/src/client/html/xetthecum-patterns.html +27 -0
- package/src/client/img/Animalia_2.svg +1 -0
- package/src/client/img/Animalia_Annelida.svg +655 -0
- package/src/client/img/Animalia_Chaetognatha.svg +72 -0
- package/src/client/img/Animalia_Cnidaria.svg +173 -0
- package/src/client/img/Animalia_Ctenophora.svg +298 -0
- package/src/client/img/Animalia_Nemertea.svg +54 -0
- package/src/client/img/Animalia_Phoronida.svg +271 -0
- package/src/client/img/Animalia_Platyhelminthes.svg +58 -0
- package/src/client/img/Animalia_Porifera.svg +220 -0
- package/src/client/img/Animalia_Sipuncula.svg +155 -0
- package/src/client/img/Arachnoidiscus_schmidtii_web_1-2-scaled.webp +0 -0
- package/src/client/img/Arrow-down.svg +11 -0
- package/src/client/img/Arrow-up.svg +6 -0
- package/src/client/img/Chromista.svg +1 -0
- package/src/client/img/Pepiowelh/BlackNoWe2-wb-bb.png +0 -0
- package/src/client/img/Pepiowelh/BlackNoWe2-wb.png +0 -0
- package/src/client/img/Pepiowelh/BlackNoWe2.png +0 -0
- package/src/client/img/Pepiowelh/Ecocultural Mapping Banner.svg +1 -0
- package/src/client/img/Plankton.jpg +0 -0
- package/src/client/img/Plantae.svg +1 -0
- package/src/client/img/Plantae_2.svg +1 -0
- package/src/client/img/Protista.svg +1 -0
- package/src/client/img/Valdes/Valdes Island Conservancy.jpg +0 -0
- package/src/client/img/Xetthecum/Agricultural.jpg +0 -0
- package/src/client/img/Xetthecum/Anthropogenic_banner.jpg +0 -0
- package/src/client/img/Xetthecum/Broad_Leaf.jpg +0 -0
- package/src/client/img/Xetthecum/Caves.jpg +0 -0
- package/src/client/img/Xetthecum/Coastal_Bluffs.jpg +0 -0
- package/src/client/img/Xetthecum/Conifer_Pole_Sapling.jpg +0 -0
- package/src/client/img/Xetthecum/Developed.jpg +0 -0
- package/src/client/img/Xetthecum/Dock.jpg +0 -0
- package/src/client/img/Xetthecum/Eelgrass.jpg +0 -0
- package/src/client/img/Xetthecum/Forests_banner.jpg +0 -0
- package/src/client/img/Xetthecum/Freshwater_banner.jpg +0 -0
- package/src/client/img/Xetthecum/Greig_Creek.jpg +0 -0
- package/src/client/img/Xetthecum/Intertidal.jpg +0 -0
- package/src/client/img/Xetthecum/Laughlin_Lake.jpg +0 -0
- package/src/client/img/Xetthecum/Marine_banner.jpg +0 -0
- package/src/client/img/Xetthecum/Mature_Conifer_Forest.jpg +0 -0
- package/src/client/img/Xetthecum/Porlier_Pass_Road.jpg +0 -0
- package/src/client/img/Xetthecum/Riparian.jpg +0 -0
- package/src/client/img/Xetthecum/Rural.jpg +0 -0
- package/src/client/img/Xetthecum/Subtidal.jpg +0 -0
- package/src/client/img/Xetthecum/Wetland.jpg +0 -0
- package/src/client/img/Xetthecum/Woodland.jpg +0 -0
- package/src/client/img/Xetthecum/Woodland_banner.jpg +0 -0
- package/src/client/img/Xetthecum/Xetthecum.jpg +0 -0
- package/src/client/img/Xetthecum/Young_Conifer_Forest.jpg +0 -0
- package/src/client/img/Xetthecum/Young_Mixed_Forest.jpg +0 -0
- package/src/client/img/Xetthecum/food.svg +38 -0
- package/src/client/img/Xetthecum/indicator.svg +52 -0
- package/src/client/img/Xetthecum/material.svg +186 -0
- package/src/client/img/Xetthecum/medicinal.svg +62 -0
- package/src/client/img/Xetthecum/missing-value.svg +3 -0
- package/src/client/img/Xetthecum/spiritual.svg +13 -0
- package/src/client/img/Xetthecum/trade.svg +74 -0
- package/src/client/img/audio.svg +5 -0
- package/src/client/img/external-link.svg +3 -0
- package/src/client/img/selected-eye.svg +4 -0
- package/src/client/img/selected-tick.svg +3 -0
- package/src/client/img/thumbs/BCLeps.jpg +0 -0
- package/src/client/img/thumbs/Checklist.jpg +0 -0
- package/src/client/img/thumbs/Data-Paper-Figma.jpg +0 -0
- package/src/client/img/thumbs/Galiano-Data-Paper.jpg +0 -0
- package/src/client/img/thumbs/Galiano.jpg +0 -0
- package/src/client/img/thumbs/Maxwell.jpg +0 -0
- package/src/client/img/thumbs/Squamish.jpg +0 -0
- package/src/client/img/thumbs/Valdes.jpg +0 -0
- package/src/client/img/thumbs/Xetthecum.jpg +0 -0
- package/src/client/img/up-arrow.svg +4 -0
- package/src/client/js/autocomplete.js +53 -0
- package/src/client/js/checklist.js +179 -0
- package/src/client/js/colour.js +139 -0
- package/src/client/js/datasetControls.js +212 -0
- package/src/client/js/imerss-viz.js +1397 -0
- package/src/client/js/leafletMap.js +357 -0
- package/src/client/js/leafletMapWithGrid.js +337 -0
- package/src/client/js/leafletMapWithRegions.js +381 -0
- package/src/client/js/renderSVG.js +108 -0
- package/src/client/js/tabs.js +53 -0
- package/src/client/js/xetthecum.js +106 -0
- package/src/client/json/emptyPhyloMap.json +1 -0
- package/src/client/json/kingdomPhyloMap.json +17 -0
- package/src/client/json/phyloMap.json +58 -0
- package/src/compare.js +97 -0
- package/src/compilecsv.js +47 -0
- package/src/dataProcessing/LZ4.js +27 -0
- package/src/dataProcessing/coordinatePatch.js +151 -0
- package/src/dataProcessing/readCSV.js +107 -0
- package/src/dataProcessing/readCSVwithMap.js +90 -0
- package/src/dataProcessing/readCSVwithoutMap.js +25 -0
- package/src/dataProcessing/readJSON.js +23 -0
- package/src/dataProcessing/sqlite.js +174 -0
- package/src/dataProcessing/summarise.js +122 -0
- package/src/dataProcessing/taxonScrape.js +14 -0
- package/src/dataProcessing/worker.js +31 -0
- package/src/dataProcessing/writeCSV.js +34 -0
- package/src/dataProcessing/writeJSON.js +15 -0
- package/src/dbtaxa.js +96 -0
- package/src/deAuthorise.js +48 -0
- package/src/deqgis.js +148 -0
- package/src/expressions/expr.js +65 -0
- package/src/expressions/jsep.js +925 -0
- package/src/filterFirst.js +51 -0
- package/src/geom/geoJSON.js +121 -0
- package/src/iNaturalist/examples/api.inaturalist.org-v1-taxa!q=Acmispon americanus americanus.json +200 -0
- package/src/iNaturalist/examples/api.inaturalist.org-v1-taxa!q=Flabellina japonica.json +61 -0
- package/src/iNaturalist/examples/www.inaturalist.org-taxa-877359.json +132 -0
- package/src/iNaturalist/iNatUrls.js +17 -0
- package/src/iNaturalist/obsAPI.js +150 -0
- package/src/iNaturalist/taxonAPI.js +460 -0
- package/src/inatObs.js +120 -0
- package/src/inattify.js +123 -0
- package/src/intersect.js +80 -0
- package/src/intersectFilter.js +48 -0
- package/src/landlocked.js +137 -0
- package/src/lib/jquery.binarytransport.js +51 -0
- package/src/lib/lz4-commentary.txt +9 -0
- package/src/lib/lz4.js +73 -0
- package/src/lib/point-in-polygon.js +36 -0
- package/src/lz4.js +40 -0
- package/src/marmalise.js +333 -0
- package/src/materialise.js +68 -0
- package/src/reintegrate.js +71 -0
- package/src/taxonomise.js +615 -0
- package/src/unscrewGBIF.js +44 -0
- package/src/utils/dataSource.js +173 -0
- package/src/utils/settleStructure.js +62 -0
- package/src/utils/utils.js +92 -0
- package/src/viz/plethify.js +39 -0
- package/src/wormify.js +154 -0
- package/src/xetthecum/xetthecumFilters.js +126 -0
- package/test/testDataSource.js +182 -0
- package/test/testiNatObsSource.js +38 -0
- package/test/testiNatSource.js +50 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const fluid = require("infusion"),
|
|
6
|
+
jqUnit = fluid.require("node-jqunit", null, "jqUnit");
|
|
7
|
+
|
|
8
|
+
require("../src/utils/dataSource.js");
|
|
9
|
+
|
|
10
|
+
const hortis = fluid.registerNamespace("hortis");
|
|
11
|
+
fluid.registerNamespace("hortis.tests");
|
|
12
|
+
|
|
13
|
+
hortis.tests.retryResponses = {
|
|
14
|
+
resolve: {
|
|
15
|
+
sequence: [{
|
|
16
|
+
type: "resolve",
|
|
17
|
+
payload: 42
|
|
18
|
+
}],
|
|
19
|
+
expected: {
|
|
20
|
+
minTime: 0,
|
|
21
|
+
type: "resolve",
|
|
22
|
+
payload: 42
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
oneReject: {
|
|
26
|
+
sequence: [{
|
|
27
|
+
type: "reject",
|
|
28
|
+
payload: "error"
|
|
29
|
+
}, {
|
|
30
|
+
type: "resolve",
|
|
31
|
+
payload: 42
|
|
32
|
+
}],
|
|
33
|
+
expected: {
|
|
34
|
+
minTime: 900,
|
|
35
|
+
type: "resolve",
|
|
36
|
+
payload: 42
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
twoReject: {
|
|
40
|
+
sequence: [{
|
|
41
|
+
type: "reject",
|
|
42
|
+
payload: "error1"
|
|
43
|
+
}, {
|
|
44
|
+
type: "reject",
|
|
45
|
+
payload: "error2"
|
|
46
|
+
}, {
|
|
47
|
+
type: "resolve",
|
|
48
|
+
payload: 42
|
|
49
|
+
}],
|
|
50
|
+
expected: {
|
|
51
|
+
minTime: 1900,
|
|
52
|
+
type: "resolve",
|
|
53
|
+
payload: 42
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
threeReject: {
|
|
57
|
+
sequence: [{
|
|
58
|
+
type: "reject",
|
|
59
|
+
payload: "error1"
|
|
60
|
+
}, {
|
|
61
|
+
type: "reject",
|
|
62
|
+
payload: "error2"
|
|
63
|
+
}, {
|
|
64
|
+
type: "reject",
|
|
65
|
+
payload: "error3"
|
|
66
|
+
}, {
|
|
67
|
+
type: "resolve",
|
|
68
|
+
payload: 42
|
|
69
|
+
}],
|
|
70
|
+
expected: {
|
|
71
|
+
minTime: 2900,
|
|
72
|
+
type: "reject",
|
|
73
|
+
payload: "error3"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
fluid.defaults("hortis.tests.retryingMockDataSource", {
|
|
79
|
+
gradeNames: ["fluid.dataSource.retrying", "fluid.dataSource.noencoding"],
|
|
80
|
+
members: {
|
|
81
|
+
index: 0
|
|
82
|
+
},
|
|
83
|
+
sequence: [],
|
|
84
|
+
listeners: {
|
|
85
|
+
"onRead.impl": {
|
|
86
|
+
funcName: "hortis.tests.retryingMockDataSource.impl",
|
|
87
|
+
args: ["{that}"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
hortis.tests.retryingMockDataSource.impl = function (that) {
|
|
93
|
+
fluid.log("Test request " + that.index + " against sequence ", that.options.sequence);
|
|
94
|
+
const record = that.options.sequence[that.index++];
|
|
95
|
+
const togo = fluid.promise();
|
|
96
|
+
togo[record.type](record.payload);
|
|
97
|
+
return togo;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
fluid.each(hortis.tests.retryResponses, function (value, key) {
|
|
101
|
+
jqUnit.asyncTest("Test of retrying data source: " + key, function () {
|
|
102
|
+
jqUnit.expect(3);
|
|
103
|
+
const dataSource = hortis.tests.retryingMockDataSource({
|
|
104
|
+
sequence: value.sequence
|
|
105
|
+
});
|
|
106
|
+
const now = Date.now();
|
|
107
|
+
const checkResponse = function (type, payload) {
|
|
108
|
+
jqUnit.assertEquals("Expected response type", value.expected.type, type);
|
|
109
|
+
jqUnit.assertDeepEq("Expected response payload", value.expected.payload, payload);
|
|
110
|
+
const delay = (Date.now() - now);
|
|
111
|
+
jqUnit.assertTrue("Response at expected time", delay > value.expected.minTime);
|
|
112
|
+
jqUnit.start();
|
|
113
|
+
};
|
|
114
|
+
const promise = dataSource.get();
|
|
115
|
+
promise.then(function (payload) {
|
|
116
|
+
checkResponse("resolve", payload);
|
|
117
|
+
}, function (payload) {
|
|
118
|
+
checkResponse("reject", payload);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
fluid.defaults("hortis.tests.rateLimitingDataSource", {
|
|
124
|
+
gradeNames: ["fluid.dataSource", "fluid.dataSource.withRateLimiter"],
|
|
125
|
+
members: {
|
|
126
|
+
index: 0,
|
|
127
|
+
launchTimes: []
|
|
128
|
+
},
|
|
129
|
+
sequence: [],
|
|
130
|
+
listeners: {
|
|
131
|
+
"onRead.impl": {
|
|
132
|
+
funcName: "hortis.tests.rateLimitingDataSource.impl",
|
|
133
|
+
args: ["{that}"]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
components: {
|
|
137
|
+
encoding: {
|
|
138
|
+
type: "fluid.dataSource.encoding.none"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
hortis.tests.rateLimitingDataSource.impl = function (that) {
|
|
144
|
+
fluid.log("Rate limiting test request " + that.index);
|
|
145
|
+
const now = Date.now();
|
|
146
|
+
that.launchTimes[that.index] = now;
|
|
147
|
+
return fluid.promise().resolve(that.index++);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
jqUnit.asyncTest("Test of rate limiting data source: ", function () {
|
|
151
|
+
jqUnit.expect(6);
|
|
152
|
+
const dataSource = hortis.tests.rateLimitingDataSource();
|
|
153
|
+
const now = Date.now();
|
|
154
|
+
const requests = fluid.generate(5, 0).map(function () {
|
|
155
|
+
return dataSource.get();
|
|
156
|
+
});
|
|
157
|
+
const resultsPromise = fluid.promise.sequence(requests);
|
|
158
|
+
resultsPromise.then(function (results) {
|
|
159
|
+
const expected = fluid.iota(5);
|
|
160
|
+
jqUnit.assertDeepEq("Got expected results", expected, results);
|
|
161
|
+
jqUnit.assertTrue("First response received pretty soon", (dataSource.launchTimes[0] - now) < 100);
|
|
162
|
+
for (let i = 1; i < 5; ++i) {
|
|
163
|
+
jqUnit.assertTrue("Request " + (i + 1) + " is not early", (dataSource.launchTimes[i] - dataSource.launchTimes[i - 1]) > 1000);
|
|
164
|
+
}
|
|
165
|
+
jqUnit.start();
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
jqUnit.asyncTest("Test of in memory caching data source: ", async function () {
|
|
171
|
+
const dataSource = fluid.inMemoryCachedSource();
|
|
172
|
+
const key = {id: 1};
|
|
173
|
+
const firstResponse = await dataSource.get(key);
|
|
174
|
+
jqUnit.assertUndefined("No initial contents", firstResponse);
|
|
175
|
+
const doc = {
|
|
176
|
+
name: "Veronica peregrina xalapensis"
|
|
177
|
+
};
|
|
178
|
+
await dataSource.set(key, doc);
|
|
179
|
+
const secondResponse = await dataSource.get(key);
|
|
180
|
+
jqUnit.assertDeepEq("Stored contents", doc, secondResponse);
|
|
181
|
+
jqUnit.start();
|
|
182
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const fluid = require("infusion");
|
|
6
|
+
|
|
7
|
+
const hortis = fluid.registerNamespace("hortis");
|
|
8
|
+
|
|
9
|
+
require("../src/iNaturalist/taxonAPI.js");
|
|
10
|
+
|
|
11
|
+
const source = hortis.iNatTaxonSource({
|
|
12
|
+
disableCache: false
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Old queries:
|
|
16
|
+
// "Acmispon americanus var. americanus" - to test resolution of multiple returned taxa
|
|
17
|
+
// Calandrinia ciliata - test resolution onto "name" rather than "matched name"
|
|
18
|
+
// Symphyotrichum chilense x subspicatum - test normalisation of "x"
|
|
19
|
+
// Veronica peregrina var. xalapensis - test not being confused by things beginning with x!
|
|
20
|
+
// Abies grandis - test how we extract species name from document - led to including species in first place
|
|
21
|
+
// Achillea millefolium complex - Convert rank of "complex" to "species" as per AS
|
|
22
|
+
// Adenocaulon bicolor - test retrieving subclass
|
|
23
|
+
// Balanus glandula/Balanus crenatus - test caching of missing values
|
|
24
|
+
// {id: 47429}
|
|
25
|
+
// {obsId: 86945066}
|
|
26
|
+
|
|
27
|
+
const testSource = async function () {
|
|
28
|
+
try {
|
|
29
|
+
const result = await source.get({obsId: 86945066});
|
|
30
|
+
console.log("Got result ", result);
|
|
31
|
+
console.log("Got taxon name ", result.doc.results[0].taxon.name);
|
|
32
|
+
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.log("Error fetching observation ", e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
source.events.onCreate.then(testSource);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const fluid = require("infusion");
|
|
6
|
+
|
|
7
|
+
const hortis = fluid.registerNamespace("hortis");
|
|
8
|
+
|
|
9
|
+
require("../src/iNaturalist/taxonAPI.js");
|
|
10
|
+
|
|
11
|
+
const source = hortis.iNatTaxonSource({
|
|
12
|
+
disableCache: false
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Old queries:
|
|
16
|
+
// "Acmispon americanus var. americanus" - to test resolution of multiple returned taxa
|
|
17
|
+
// Calandrinia ciliata - test resolution onto "name" rather than "matched name"
|
|
18
|
+
// Symphyotrichum chilense x subspicatum - test normalisation of "x"
|
|
19
|
+
// Veronica peregrina var. xalapensis - test not being confused by things beginning with x!
|
|
20
|
+
// Abies grandis - test how we extract species name from document - led to including species in first place
|
|
21
|
+
// Achillea millefolium complex - Convert rank of "complex" to "species" as per AS
|
|
22
|
+
// Adenocaulon bicolor - test retrieving subclass
|
|
23
|
+
// Balanus glandula/Balanus crenatus - test caching of missing values
|
|
24
|
+
// {id: 47429}
|
|
25
|
+
// {obsId: 86945066}
|
|
26
|
+
|
|
27
|
+
const testSource = async function () {
|
|
28
|
+
try {
|
|
29
|
+
const query = "Balanus glandula/Balanus crenatus";
|
|
30
|
+
const sane = hortis.sanitizeSpeciesName(query);
|
|
31
|
+
const result = await source.get({name: sane});
|
|
32
|
+
console.log(result);
|
|
33
|
+
// const parents = await hortis.iNat.getAncestry(result.doc.id, source.byId);
|
|
34
|
+
// console.log(parents);
|
|
35
|
+
const rankTarget = {
|
|
36
|
+
Kingdom: "",
|
|
37
|
+
Phylum: "",
|
|
38
|
+
Subclass: "Magnoliidae", // test overriding
|
|
39
|
+
Order: "",
|
|
40
|
+
Genus: "",
|
|
41
|
+
Species: ""
|
|
42
|
+
};
|
|
43
|
+
await hortis.iNat.getRanks(result.doc.id, rankTarget, source.byId);
|
|
44
|
+
console.log(rankTarget);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.log("Error fetching ancestry ", e);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
source.events.onCreate.then(testSource);
|