Skip to content

Commit ddc25b7

Browse files
committed
refactor manifests to be lazier
1 parent b9d0d80 commit ddc25b7

20 files changed

+931
-314
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ cities.html
3131
assets
3232
atlas.sh
3333
tmp.csv
34+
newtiles

dev/Everyone.svelte

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<script>
2+
import { Deeptable, Scatterplot } from '../src/deepscatter';
3+
import { onMount } from 'svelte';
4+
import SwitchPositions from './svelte/SwitchPositions.svelte';
5+
import ColorChange from './svelte/ColorChange.svelte';
6+
import SizeSlider from './svelte/SizeSlider.svelte';
7+
import PositionScales from './svelte/PositionScales.svelte';
8+
import SelectPoints from './svelte/SelectPoints.svelte';
9+
const startSize = 0.8;
10+
const prefs = {
11+
max_points: 100000,
12+
alpha: 35, // Target saturation for the full page.
13+
zoom_balance: 0.05, // Rate at which points increase size. https://observablehq.com/@bmschmidt/zoom-strategies-for-huge-scatterplots-with-three-js
14+
point_size: startSize, // Default point size before application of size scaling
15+
background_color: '#EEEDDE',
16+
duration: 100,
17+
encoding: {
18+
x: {
19+
field: 'x',
20+
transform: 'literal',
21+
},
22+
y: {
23+
field: 'y',
24+
transform: 'literal',
25+
},
26+
},
27+
};
28+
29+
let scatterplot = null;
30+
onMount(async () => {
31+
const tb = await Deeptable.fromQuadfeather({
32+
baseUrl: 'http://localhost:8080/everyone',
33+
});
34+
window.tb = tb;
35+
scatterplot = new Scatterplot({ selector: '#deepscatter', deeptable: tb });
36+
window.scatterplot = scatterplot;
37+
scatterplot.plotAPI(prefs);
38+
});
39+
</script>
40+
41+
<div id="overlay">
42+
<!-- <SwitchPositions {scatterplot}></SwitchPositions>
43+
<ColorChange {scatterplot}></ColorChange>
44+
<SizeSlider size={startSize} {scatterplot}></SizeSlider>
45+
<PositionScales {scatterplot} />
46+
<SelectPoints {scatterplot}></SelectPoints> -->
47+
</div>
48+
49+
<div id="deepscatter"></div>
50+
51+
<style>
52+
#overlay {
53+
position: fixed;
54+
z-index: 10;
55+
left: 40px;
56+
top: 40px;
57+
}
58+
#deepscatter {
59+
z-index: 0;
60+
width: 100vw;
61+
height: 100vh;
62+
}
63+
</style>

dev/FourClasses.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import SelectPoints from './svelte/SelectPoints.svelte';
99
const startSize = 2;
1010
const prefs = {
11-
source_url: '/tiles',
12-
max_points: 1000000,
11+
source_url: '/newtiles',
12+
max_points: 10,
1313
alpha: 35, // Target saturation for the full page.
1414
zoom_balance: 0.22, // Rate at which points increase size. https://observablehq.com/@bmschmidt/zoom-strategies-for-huge-scatterplots-with-three-js
1515
point_size: startSize, // Default point size before application of size scaling

dev/Main.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
88
import FourClasses from './FourClasses.svelte';
99
import SinglePoint from './SinglePoint.svelte';
10+
import Everyone from './Everyone.svelte';
1011
import LabelMaker from './submodules/LabelMaker.svelte';
1112
1213
const modes = {
1314
FourClasses,
1415
SinglePoint,
1516
LabelMaker,
17+
Everyone,
1618
};
1719
1820
$: mode = '';

integers.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
const batch = make_batch(i * SIZE, SIZE);
9191
batches.push(batch);
9292
window.b = batch;
93-
console.log(i);
9493
}
9594
const table = new Table([batches]);
9695
return table;
@@ -175,7 +174,6 @@
175174
op: 'gt',
176175
a: 0,
177176
};
178-
console.log(JSON.stringify(encoding, null, 2));
179177
plot.plotAPI({
180178
encoding,
181179
});

0 commit comments

Comments
 (0)