Skip to content

Commit 9256347

Browse files
committed
add sample data and its generator
1 parent 140bac0 commit 9256347

File tree

4 files changed

+1000075
-0
lines changed

4 files changed

+1000075
-0
lines changed

.github/.DS_Store

-6 KB
Binary file not shown.

generate_test_data.ipynb

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "5e17e8ee",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"import numpy as np\n",
11+
"\n",
12+
"N = 1_000_000\n",
13+
"\n",
14+
"CHUNK = int(N/100)##_000_000\n",
15+
"OUT = \"world_points.json\"\n",
16+
"\n",
17+
"with open(OUT, \"w\") as f:\n",
18+
" f.write(\"[\\n\")\n",
19+
"\n",
20+
" written = 0\n",
21+
"\n",
22+
" first = True\n",
23+
"\n",
24+
" while written < N:\n",
25+
" size = min(CHUNK, N - written)\n",
26+
"\n",
27+
" lon = np.random.uniform(-180, 180, size)\n",
28+
" lat = np.random.uniform(-90, 90, size)\n",
29+
" val = np.random.randint(1, 3, size)\n",
30+
"\n",
31+
" for i in range(size):\n",
32+
" if not first:\n",
33+
" f.write(\",\\n\")\n",
34+
" first = False\n",
35+
" f.write(f\"[{lon[i]:.6f},{lat[i]:.6f},{val[i]}]\")\n",
36+
"\n",
37+
" written += size\n",
38+
"\n",
39+
" f.write(\"\\n]\")"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": null,
45+
"id": "d33dbdcf",
46+
"metadata": {},
47+
"outputs": [],
48+
"source": []
49+
}
50+
],
51+
"metadata": {
52+
"kernelspec": {
53+
"display_name": "py3.14",
54+
"language": "python",
55+
"name": "python3"
56+
},
57+
"language_info": {
58+
"codemirror_mode": {
59+
"name": "ipython",
60+
"version": 3
61+
},
62+
"file_extension": ".py",
63+
"mimetype": "text/x-python",
64+
"name": "python",
65+
"nbconvert_exporter": "python",
66+
"pygments_lexer": "ipython3",
67+
"version": "3.14.0"
68+
}
69+
},
70+
"nbformat": 4,
71+
"nbformat_minor": 5
72+
}

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta charset="utf-8">
66
<title>deck.gl Scatterplot Example</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link rel="icon"
9+
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.9em' font-size='90'>🗺️</text></svg>">
810
<style>
911
body {
1012
margin: 0;

0 commit comments

Comments
 (0)