Skip to content

Commit 528c7a3

Browse files
rdhyeeclaude
andcommitted
Simplify sampling controls and document scalability findings
- Remove confusing log slider, keep simple textbox for sample limit - Update variable names for clarity (sample_limit_value) - Add performance notes about 1M sample limit in UI - Document breakdown causes: GeoJSON conversion, MapLibre layer overhead - Note lonboard/deck.gl as path forward for >1M samples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 206bc6c commit 528c7a3

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

tutorials/zenodo_isamples_analysis.qmd

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ MAPCFG = ({
961961
basemap: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
962962
pointColor: [20,110,180,200],
963963
pointRadiusPx: 2,
964-
maxPerTileHard: 20000,
964+
maxPerTileHard: sample_limit_value, // Dynamic sample limit from controls
965965
modulusByZoom(z){
966966
if (z >= 13) return 1;
967967
if (z >= 11) return 2;
@@ -980,6 +980,25 @@ MAPCFG = ({
980980
})
981981
```
982982

983+
```{ojs}
984+
//| label: viewport-sampling-controls
985+
986+
// Text input for viewport sample limit
987+
viewof sample_limit = Inputs.text({
988+
label: "Viewport Sample Limit:",
989+
value: "20000",
990+
placeholder: "Enter number (works reliably up to ~1M)"
991+
})
992+
993+
// Convert to number with validation
994+
sample_limit_value = Math.max(1, parseInt(sample_limit) || 20000)
995+
996+
// Display current sample limit
997+
md`**Current viewport sample limit**: ${sample_limit_value.toLocaleString()} samples per viewport
998+
999+
*Note: Performance tested up to ~1M samples. For larger datasets, need more scalable approach (e.g., lonboard/deck.gl optimization)*`
1000+
```
1001+
9831002
```{ojs}
9841003
//| label: map-capability
9851004
pickMode = () => {

0 commit comments

Comments
 (0)