@@ -7,83 +7,11 @@ import {
7
7
calculateCost ,
8
8
} from '@carbonplan/seaweed-farming-model'
9
9
10
+ import locations from './locations.json'
10
11
import { formatValue } from './utils'
11
12
import Parameters from './parameters'
12
13
import SpatialValues from './spatial-values'
13
14
14
- const LOCATIONS = [
15
- {
16
- key : 'pacific' ,
17
- point : [ - 90 , 2 ] ,
18
- values : {
19
- seaweed_dw : 7939.91552734375 ,
20
- d2p : 192.85289001464844 ,
21
- fseq_transport : 0.9930768013000488 ,
22
- d2sink : 0.0 ,
23
- species : 'tropical red' ,
24
- depth : 2016.75 ,
25
- nharv : 8.0 ,
26
- wave_height : 1.4342491626739502 ,
27
- } ,
28
- } ,
29
- {
30
- key : 'north_sea' ,
31
- point : [ 0 , 58 ] ,
32
- values : {
33
- seaweed_dw : 1636.282470703125 ,
34
- d2p : 29.229372024536133 ,
35
- fseq_transport : 0.7799999713897705 ,
36
- d2sink : 428.871826171875 ,
37
- species : 'temperate brown' ,
38
- depth : 131.5 ,
39
- nharv : 2.0 ,
40
- wave_height : 1.8970307111740112 ,
41
- } ,
42
- } ,
43
- {
44
- key : 'alaska' ,
45
- point : [ - 165 , 55 ] ,
46
- values : {
47
- seaweed_dw : 1316.7147216796875 ,
48
- d2p : 99.7650146484375 ,
49
- fseq_transport : 0.9700000286102295 ,
50
- d2sink : 115.72320556640625 ,
51
- species : 'temperate brown' ,
52
- depth : 91.25 ,
53
- nharv : 1.0 ,
54
- wave_height : 1.9661271572113037 ,
55
- } ,
56
- } ,
57
- {
58
- key : 'argentina' ,
59
- point : [ - 66 , - 46 ] ,
60
- values : {
61
- seaweed_dw : 2587.830322265625 ,
62
- d2p : 103.04915618896484 ,
63
- fseq_transport : 0.44999998807907104 ,
64
- d2sink : 273.8975830078125 ,
65
- species : 'temperate brown' ,
66
- depth : 104.0 ,
67
- nharv : 2.0 ,
68
- wave_height : 1.3610966205596924 ,
69
- } ,
70
- } ,
71
- {
72
- key : 'yellow_sea' ,
73
- point : [ 124.5 , 33.3 ] ,
74
- values : {
75
- seaweed_dw : 972.8525390625 ,
76
- d2p : 167.25067138671875 ,
77
- fseq_transport : 0.9700000286102295 ,
78
- d2sink : 748.9559936523438 ,
79
- species : 'temperate brown' ,
80
- depth : 72.0 ,
81
- nharv : 1.0 ,
82
- wave_height : 1.2413867712020874 ,
83
- } ,
84
- } ,
85
- ]
86
-
87
15
const sx = {
88
16
column : {
89
17
borderStyle : 'solid' ,
@@ -149,7 +77,7 @@ const CostCalculator = () => {
149
77
const [ parameters , setParameters ] = useState ( INITIAL_PARAMETERS )
150
78
151
79
const benefitUnits = target === 'sinking' ? 'tCO₂' : 'tCO₂e'
152
- const { values } = LOCATIONS [ location ]
80
+ const { values } = locations [ location ]
153
81
154
82
const benefit = calculateBenefit ( target , values , parameters )
155
83
const cost = calculateCost ( target , values , parameters )
@@ -203,7 +131,7 @@ const CostCalculator = () => {
203
131
< Divider sx = { { mt : [ 1 , 1 , 2 , 2 ] , mb : [ 3 , 3 , 4 , 4 ] } } />
204
132
205
133
< SpatialValues
206
- locations = { LOCATIONS }
134
+ locations = { locations }
207
135
setLocation = { setLocation }
208
136
location = { location }
209
137
target = { target }
0 commit comments