1
- from datetime import datetime
2
-
3
1
import geodatasets
4
2
import geopandas as gpd
5
3
import numpy as np
6
4
import quak
7
5
import sqlglot
8
- from arro3 .core import Array , ChunkedArray , DataType , Table
6
+ from arro3 .core import Array , ChunkedArray , Table
9
7
10
8
from lonboard import PolygonLayer , viz
11
9
@@ -20,16 +18,16 @@ def quak_fn(self: PolygonLayer) -> quak.Widget:
20
18
num_rows = table .num_rows
21
19
if num_rows <= np .iinfo (np .uint8 ).max :
22
20
row_index = Array .from_numpy (np .arange (num_rows , dtype = np .uint8 ))
23
- filter_arr = np .zeros (num_rows , dtype = np .uint8 )
21
+ filter_arr = np .ones (num_rows , dtype = np .uint8 )
24
22
elif num_rows <= np .iinfo (np .uint16 ).max :
25
23
row_index = Array .from_numpy (np .arange (num_rows , dtype = np .uint16 ))
26
- filter_arr = np .zeros (num_rows , dtype = np .uint16 )
24
+ filter_arr = np .ones (num_rows , dtype = np .uint16 )
27
25
elif num_rows <= np .iinfo (np .uint32 ).max :
28
26
row_index = Array .from_numpy (np .arange (num_rows , dtype = np .uint32 ))
29
- filter_arr = np .zeros (num_rows , dtype = np .uint32 )
27
+ filter_arr = np .ones (num_rows , dtype = np .uint32 )
30
28
else :
31
29
row_index = Array .from_numpy (np .arange (num_rows , dtype = np .uint64 ))
32
- filter_arr = np .zeros (num_rows , dtype = np .uint64 )
30
+ filter_arr = np .ones (num_rows , dtype = np .uint64 )
33
31
34
32
table_with_row_index = table .append_column ("_row_index" , ChunkedArray (row_index ))
35
33
quak_widget = quak .Widget (table_with_row_index )
0 commit comments