Skip to content

Commit 8407a85

Browse files
authored
Add price calculator (#42)
* Add pricing.md * Add sidebar entry pricing * Add price estimator * Update pricing * Add measurements to pricing estimator * Clarify price calculator assumptions * Remove not required value * Prevent escaping js whitespace * Remove bootstrap * Add bootstrap to pricing file * Revert "Remove bootstrap" This reverts commit 3f3e218. * Remove botstrap * Force quarto to use only qmd
1 parent e3b64f7 commit 8407a85

File tree

6 files changed

+101
-3
lines changed

6 files changed

+101
-3
lines changed

.github/workflows/deploy_website.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
-v /tmp:/tmp \
6161
-v $PWD/docs:/work \
6262
danlooo/fairsendd_environment:${{ github.sha }} \
63-
quarto render .
63+
quarto render *.qmd
6464
6565
- name: Setup Node
6666
uses: actions/setup-node@v4
@@ -90,4 +90,4 @@ jobs:
9090
steps:
9191
- name: Deploy to GitHub Pages
9292
id: deployment
93-
uses: actions/deploy-pages@v4
93+
uses: actions/deploy-pages@v4

website/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
!overview.md
22
!background.md
3+
!pricing.md
34

45
node_modules
56
.quarto

website/.vitepress/config.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vitepress'
22
import mathjax3 from 'markdown-it-mathjax3';
33

4+
45
const customElements = [
56
'mjx-container',
67
'mjx-assistive-mml',
@@ -102,6 +103,10 @@ export default defineConfig({
102103
md.use(mathjax3);
103104
},
104105
},
106+
// head: [
107+
// ['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' }],
108+
// ['script', { src: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js', defer: 'defer' }]
109+
// ],
105110
vue: {
106111
template: {
107112
compilerOptions: {
@@ -133,6 +138,7 @@ export default defineConfig({
133138
{ text: "Background", link: "background.md" },
134139
{ text: "Julia Library", link: "julia-library.md" },
135140
{ text: "CWL Workflow", link: "cwl-workflow.md" },
141+
{ text: "Pricing", link: "pricing.md" },
136142
]
137143
}
138144
],

website/.vitepress/theme/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
code {
1616
font-size: small;
1717
white-space: pre-wrap;
18-
}
18+
}

website/.vitepress/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
// overwrite bootstrap css
12
import DefaultTheme from 'vitepress/theme'
23
import './custom.css'
34

5+
46
export default DefaultTheme

website/docs/pricing.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Pricing
2+
3+
This project is creating free and open-source software under the MIT license.
4+
There are plenty of ways to run the workflow locally after downloading the [data](background.html#data).
5+
However, the workflow can also be executed using [openEO at EODC](https://editor.openeo.org/?server=openeo.eodc.eu%2Fopeneo%2F1.2.0%2F) by enabling experimental processes and searching for 'rqadeforestation'.
6+
7+
## Price calculator
8+
9+
Please enter the spatio-temporal extent to be processed.
10+
The price will be estimated automatically.
11+
Resource estimations were based on the following assumptions:
12+
13+
- Sentinel-1 Sigma0 collection at 20m resolution in Equi7 projection
14+
- Tile size is 15000x15000 pixels
15+
- Satellite revisit period of 6 days
16+
- Data is available in GeoTIFF format
17+
- Files are located on a network share in the same data center
18+
- Execution on an AMD EPIC MILAN CPU on 32 threads with 32GB RAM
19+
- 100% utilization of CPU and RAM (4 workers with 8 threads each)
20+
- Workflow is executed inside a Julia REPL using [RQADeforestation.jl](https://github.com/EarthyScience/RQADeforestation.jl)
21+
22+
<script setup>
23+
import { ref, computed, onMounted, watch } from 'vue'
24+
const start = ref('')
25+
const end = ref('')
26+
const n_tiles = ref(1)
27+
const submitted = ref(false)
28+
const error = ref('')
29+
let runtime = 0
30+
const valid = computed(() => {
31+
if (!start.value || !end.value) return false
32+
if (start.value > end.value) return false
33+
if (!Number.isInteger(n_tiles.value) || n_tiles.value < 0) return false
34+
return true
35+
})
36+
watch([start, end, n_tiles], () => {
37+
error.value = ""
38+
if (start.value && end.value && start.value > end.value) {
39+
error.value = "Start date must be on or before end date."
40+
}
41+
if (Date.parse(start.value) < Date.parse("2014-10-01")) {
42+
error.value = "Data only available after Oct 2014"
43+
}
44+
if (!Number.isInteger(n_tiles.value)) {
45+
error.value = "Count must be an integer."
46+
}
47+
const runtime_per_year_per_tile_in_s = 384.673805
48+
const satellite_revisit_days = 6
49+
let duration_years = (Date.parse(end.value) - Date.parse(start.value)) * 1e-3 / 60 / 60 / 24 / 365
50+
runtime = n_tiles.value * (duration_years*runtime_per_year_per_tile_in_s)^2
51+
})
52+
onMounted(() => {
53+
start.value = "2022-01-01"
54+
end.value = "2023-01-01"
55+
})
56+
</script>
57+
58+
<form @submit.prevent="onSubmit" class="form-horizontal">
59+
<div class="form-floating">
60+
<label for="start">Start date</label><br />
61+
<input id="start" type="date" v-model="start" class="form-control" required />
62+
</div>
63+
64+
<div class="form-floating">
65+
<label for="end">End date</label><br />
66+
<input id="end" type="date" v-model="end" :min="start" class="form-control" required />
67+
</div>
68+
69+
<div class="form-floating">
70+
<label for="n_tiles">Number of Equi7 tiles</label><br />
71+
<input
72+
id="n_tiles"
73+
type="number"
74+
v-model.number="n_tiles"
75+
min="1"
76+
step="1"
77+
inputmode="numeric"
78+
class="form-control"
79+
required
80+
/>
81+
</div>
82+
83+
<div v-if="error" style="color:#b00020;margin-top:0.4rem">{{ error }}</div>
84+
85+
<strong>Estimated runtime: {{ runtime }} s</strong>
86+
</form>
87+
88+
Please note that these results are not official offerings from any cloud provider.
89+
Estimates may vary depending on the area of interest, orbits to be analysed, and execution platform.

0 commit comments

Comments
 (0)