non-federal
Browse files- difference.ipynb +68 -13
difference.ipynb
CHANGED
@@ -2,18 +2,49 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"id": "00982ea4-b630-4233-b6df-354af3498ed2",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
-
"source": [
|
|
|
|
|
10 |
},
|
11 |
{
|
12 |
"cell_type": "code",
|
13 |
-
"execution_count":
|
14 |
"id": "e84709ab-1b47-49ee-8cbd-8aa69744b6c3",
|
15 |
"metadata": {},
|
16 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
"source": [
|
18 |
"import ibis\n",
|
19 |
"from ibis import _\n",
|
@@ -26,23 +57,23 @@
|
|
26 |
" # .filter(_.UNIT_NAME == \"Angeles National Forest\")\n",
|
27 |
" .filter(_.reGAP < 3) \n",
|
28 |
")\n",
|
29 |
-
"lvl = \"
|
30 |
-
"conn.create_table(\"t1\", tbl.filter(_.Release_Year == 2024, _.MNG_AG_LEV
|
31 |
-
"conn.create_table(\"t2\", tbl.filter(_.Release_Year == 2023, _.MNG_AG_LEV
|
32 |
"\n",
|
33 |
"conn.disconnect()"
|
34 |
]
|
35 |
},
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
-
"execution_count":
|
39 |
"id": "121c3cad-680c-4f3a-9075-638711ea1634",
|
40 |
"metadata": {},
|
41 |
"outputs": [
|
42 |
{
|
43 |
"data": {
|
44 |
"application/vnd.jupyter.widget-view+json": {
|
45 |
-
"model_id": "
|
46 |
"version_major": 2,
|
47 |
"version_minor": 0
|
48 |
},
|
@@ -52,6 +83,14 @@
|
|
52 |
},
|
53 |
"metadata": {},
|
54 |
"output_type": "display_data"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
],
|
57 |
"source": [
|
@@ -87,21 +126,37 @@
|
|
87 |
},
|
88 |
{
|
89 |
"cell_type": "code",
|
90 |
-
"execution_count":
|
91 |
"id": "28a66c8b-89fb-4972-9ff5-ee9bfdf148e9",
|
92 |
"metadata": {},
|
93 |
"outputs": [],
|
94 |
"source": [
|
95 |
-
"conn = ibis.duckdb.connect(\"
|
96 |
"gdf = conn.table(\"diff\").mutate(geom = _.geom.convert(\"epsg:3310\",\"epsg:4326\")).execute()"
|
97 |
]
|
98 |
},
|
99 |
{
|
100 |
"cell_type": "code",
|
101 |
-
"execution_count":
|
102 |
"id": "308dc665-1323-4e9b-bc2d-69201c325c4b",
|
103 |
"metadata": {},
|
104 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
"source": [
|
106 |
"import leafmap.maplibregl as leafmap\n",
|
107 |
"m = leafmap.Map()\n",
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
"id": "00982ea4-b630-4233-b6df-354af3498ed2",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
+
"source": [
|
10 |
+
"import ibis"
|
11 |
+
]
|
12 |
},
|
13 |
{
|
14 |
"cell_type": "code",
|
15 |
+
"execution_count": 2,
|
16 |
"id": "e84709ab-1b47-49ee-8cbd-8aa69744b6c3",
|
17 |
"metadata": {},
|
18 |
+
"outputs": [
|
19 |
+
{
|
20 |
+
"data": {
|
21 |
+
"application/vnd.jupyter.widget-view+json": {
|
22 |
+
"model_id": "cc0e11b65226461e924d9a79ac880cae",
|
23 |
+
"version_major": 2,
|
24 |
+
"version_minor": 0
|
25 |
+
},
|
26 |
+
"text/plain": [
|
27 |
+
"FloatProgress(value=0.0, layout=Layout(width='auto'), style=ProgressStyle(bar_color='black'))"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
"metadata": {},
|
31 |
+
"output_type": "display_data"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"data": {
|
35 |
+
"application/vnd.jupyter.widget-view+json": {
|
36 |
+
"model_id": "740ca34451554f8da330cf50694668be",
|
37 |
+
"version_major": 2,
|
38 |
+
"version_minor": 0
|
39 |
+
},
|
40 |
+
"text/plain": [
|
41 |
+
"FloatProgress(value=0.0, layout=Layout(width='auto'), style=ProgressStyle(bar_color='black'))"
|
42 |
+
]
|
43 |
+
},
|
44 |
+
"metadata": {},
|
45 |
+
"output_type": "display_data"
|
46 |
+
}
|
47 |
+
],
|
48 |
"source": [
|
49 |
"import ibis\n",
|
50 |
"from ibis import _\n",
|
|
|
57 |
" # .filter(_.UNIT_NAME == \"Angeles National Forest\")\n",
|
58 |
" .filter(_.reGAP < 3) \n",
|
59 |
")\n",
|
60 |
+
"lvl = \"Federal\"\n",
|
61 |
+
"conn.create_table(\"t1\", tbl.filter(_.Release_Year == 2024, _.MNG_AG_LEV != lvl), overwrite = True)\n",
|
62 |
+
"conn.create_table(\"t2\", tbl.filter(_.Release_Year == 2023, _.MNG_AG_LEV != lvl), overwrite = True)\n",
|
63 |
"\n",
|
64 |
"conn.disconnect()"
|
65 |
]
|
66 |
},
|
67 |
{
|
68 |
"cell_type": "code",
|
69 |
+
"execution_count": 3,
|
70 |
"id": "121c3cad-680c-4f3a-9075-638711ea1634",
|
71 |
"metadata": {},
|
72 |
"outputs": [
|
73 |
{
|
74 |
"data": {
|
75 |
"application/vnd.jupyter.widget-view+json": {
|
76 |
+
"model_id": "2e29aea00f864b6b9e440f741c4979d0",
|
77 |
"version_major": 2,
|
78 |
"version_minor": 0
|
79 |
},
|
|
|
83 |
},
|
84 |
"metadata": {},
|
85 |
"output_type": "display_data"
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"name": "stdout",
|
89 |
+
"output_type": "stream",
|
90 |
+
"text": [
|
91 |
+
"CPU times: user 1min 28s, sys: 6.91 s, total: 1min 35s\n",
|
92 |
+
"Wall time: 1min 28s\n"
|
93 |
+
]
|
94 |
}
|
95 |
],
|
96 |
"source": [
|
|
|
126 |
},
|
127 |
{
|
128 |
"cell_type": "code",
|
129 |
+
"execution_count": 4,
|
130 |
"id": "28a66c8b-89fb-4972-9ff5-ee9bfdf148e9",
|
131 |
"metadata": {},
|
132 |
"outputs": [],
|
133 |
"source": [
|
134 |
+
"conn = ibis.duckdb.connect(\"tmp2\", extensions=[\"spatial\"])\n",
|
135 |
"gdf = conn.table(\"diff\").mutate(geom = _.geom.convert(\"epsg:3310\",\"epsg:4326\")).execute()"
|
136 |
]
|
137 |
},
|
138 |
{
|
139 |
"cell_type": "code",
|
140 |
+
"execution_count": 5,
|
141 |
"id": "308dc665-1323-4e9b-bc2d-69201c325c4b",
|
142 |
"metadata": {},
|
143 |
+
"outputs": [
|
144 |
+
{
|
145 |
+
"data": {
|
146 |
+
"application/vnd.jupyter.widget-view+json": {
|
147 |
+
"model_id": "3168461698f142a2b6c26bee3647378e",
|
148 |
+
"version_major": 2,
|
149 |
+
"version_minor": 1
|
150 |
+
},
|
151 |
+
"text/plain": [
|
152 |
+
"Map(height='600px', map_options={'bearing': 0, 'center': (0, 20), 'pitch': 0, 'style': 'https://basemaps.carto…"
|
153 |
+
]
|
154 |
+
},
|
155 |
+
"execution_count": 5,
|
156 |
+
"metadata": {},
|
157 |
+
"output_type": "execute_result"
|
158 |
+
}
|
159 |
+
],
|
160 |
"source": [
|
161 |
"import leafmap.maplibregl as leafmap\n",
|
162 |
"m = leafmap.Map()\n",
|