1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "assets": [
12 {
13 "lat": 42.110415,
14 "lon": -93.560137,
15 "label": "Story County IA parcel - dominant soil NOT hydric, 5% hydric inclusion"
16 },
17 {
18 "lat": 42.45,
19 "lon": -93.55,
20 "label": "Hamilton County IA parcel - prime farmland if drained, all-hydric map unit"
21 },
22 {
23 "lat": 34.929063,
24 "lon": -77.345001,
25 "label": "Onslow County NC parcel - well-drained sand, best-case septic"
26 },
27 {
28 "lat": 30.84231,
29 "lon": -97.29329,
30 "label": "Bell County TX parcel - shrink-swell clay, foundation risk"
31 },
32 {
33 "lat": 39.7392,
34 "lon": -104.9903,
35 "label": "Denver CO infill site - urban land complex"
36 },
37 {
38 "lat": 61.566941,
39 "lon": -150.422585,
40 "label": "Matanuska-Susitna AK parcel - slope stability, 4% hydric depressions"
41 }
42 ],
43 "interpretations": [
44 "septic_tank_absorption_fields",
45 "dwellings_with_basements",
46 "dwellings_without_basements",
47 "small_commercial_buildings",
48 "local_roads_and_streets",
49 "shallow_excavations",
50 "solar_arrays_ballast_anchor",
51 "solar_arrays_soil_anchor"
52 ]
53};
54
55
56const run = await client.actor("malonestar/ssurgo-soil-suitability-screener").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66