@@ -5,13 +5,74 @@ Commits:
5
5
......................................................................
6
6
todo
7
7
- states: finer detail
8
+ - usstates.geojson 87K, us_040_00_20m.json 1.4MB, 5m 2.4MB?
8
9
- counties: featureState seems backwards!
10
+ - find source for all data/ files, put in npm run scripts
11
+
12
+
13
+
14
+ https://docs.mapbox.com/mapbox-gl-js/api/#geojsonsource#setdata
15
+ https://docs.mapbox.com/mapbox-gl-js/api/#map#setstyle
16
+ https://docs.mapbox.com/help/troubleshooting/working-with-large-geojson-data/
9
17
10
18
......................................................................
11
- style: 'mapbox://styles/mapbox/streets-v11',
12
- // style: 'mapbox://styles/mapbox/satellite-v9',
13
- // style: 'mapbox://styles/mapbox/dark-v10',
14
- // style: 'mapbox://styles/mapbox/light-v10',
19
+ Mapbox docs:
20
+
21
+ https://docs.mapbox.com/mapbox-gl-js/api/
22
+ https://docs.mapbox.com/mapbox-gl-js/api/#popup
23
+ https://docs.mapbox.com/mapbox-gl-js/example/query-similar-features/
24
+
25
+
26
+ https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/
27
+ https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#filter
28
+
29
+
30
+ https://docs.mapbox.com/help/tutorials/mapbox-gl-js-expressions/
31
+ https://docs.mapbox.com/help/tutorials/studio-heatmap-tutorial/
32
+
33
+ https://docs.mapbox.com/help/glossary/filter/
34
+
35
+
36
+ https://docs.mapbox.com/help/how-mapbox-works/web-apps/
37
+ https://docs.mapbox.com/help/tutorials/building-a-store-locator
38
+
39
+ https://docs.mapbox.com/mapbox-gl-js/examples/
40
+ https://docs.mapbox.com/mapbox-gl-js/example/hover-styles/
41
+ https://docs.mapbox.com/mapbox-gl-js/example/canvas-source/
42
+ https://docs.mapbox.com/mapbox-gl-js/example/data-join/
43
+ https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/
44
+ https://docs.mapbox.com/mapbox-gl-js/example/vector-source/
45
+ https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
46
+ https://docs.mapbox.com/mapbox-gl-js/example/updating-choropleth/
47
+ https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/
48
+
49
+ https://docs.mapbox.com/help/tutorials/
50
+ https://docs.mapbox.com/help/troubleshooting/
51
+ https://docs.mapbox.com/help/troubleshooting/large-data-tippecanoe/
52
+ https://docs.mapbox.com/help/troubleshooting/adjust-tileset-zoom-extent/
53
+ https://docs.mapbox.com/help/troubleshooting/working-with-large-geojson-data/
54
+ https://docs.mapbox.com/help/tutorials/optimization-api/
55
+
56
+ https://blog.mapbox.com/@Mapbox
57
+ https://blog.mapbox.com/visualizing-election-data-a-guide-to-mapbox-gl-expressions-92cc469b8dfd
58
+ https://blog.mapbox.com/going-live-with-electoral-maps-a-guide-to-feature-state-b520e91a22d
59
+ https://blog.mapbox.com/designing-electoral-maps-exploring-mapbox-gl-js-a7b7db75bd13
60
+ http://turfjs.org/
61
+
62
+
63
+
64
+ https://www.mapbox.com/mapbox-studio/
65
+ https://docs.mapbox.com/studio-manual/overview/
66
+ https://blog.cartong.org/wordpress/wp-content/uploads/2020/02/How-to-Using-mapbox-into-PowerBI_CartONG_Final.pdf
67
+ http://build-failed.blogspot.com/2017/02/playing-with-mapbox-vector-tiles-part-1.html
68
+ https://github.com/mapbox/awesome-vector-tiles
69
+
70
+
71
+ ......................................................................
72
+ styles/mapbox/streets-v11',
73
+ styles/mapbox/satellite-v9',
74
+ styles/mapbox/dark-v10',
75
+ styles/mapbox/light-v10',
15
76
......................................................................
16
77
https://github.com/johan/world.geo.json
17
78
https://catalog.data.gov/dataset
@@ -36,7 +97,7 @@ https://github.com/PublicaMundi/MappingAPI/tree/master/data/geojson
36
97
https://github.com/rstudio/leaflet/tree/gh-pages/json
37
98
38
99
39
- https://www.naturalearthdata.com/downloads/
100
+ https://www.naturalearthdata.com/downloads/ //shp files, not geojson
40
101
https://www.naturalearthdata.com/
41
102
42
103
https://www.convertcsv.com/csv-to-geojson.htm
@@ -62,52 +123,43 @@ usstates.geojson counties.json:
62
123
states:
63
124
agentscript/bin/minifyjson
64
125
65
- https://eric.clst.org/tech/usgeojson/
66
- Downloads
67
- -rw-r--r--@ 1 owen staff 2.6M Apr 10 17:51 gz_2010_us_500_11_20m.json
68
- -rw-r--r--@ 1 owen staff 3.3M Apr 10 17:23 gz_2010_us_050_00_20m.json
69
- -rw-r--r--@ 1 owen staff 22M Apr 10 13:43 gz_2010_us_050_00_500k.json
70
126
71
- ......................................................................
72
- ......................................................................
73
- Heatmap tutorial
74
- https://docs.mapbox.com/help/tutorials/mapbox-gl-js-expressions/
75
- https://docs.mapbox.com/help/tutorials/studio-heatmap-tutorial/
76
- https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/
77
- https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#filter
78
- https://docs.mapbox.com/help/glossary/filter/
79
- [
80
- "interpolate",
81
- ["linear"],
82
- ["heatmap-density"],
83
- 0,
84
- "rgba(0, 0, 255, 0)",
85
- 0.1,
86
- "royalblue",
87
- 0.3,
88
- "cyan",
89
- 0.5,
90
- "lime",
91
- 0.7,
92
- "yellow",
93
- 1,
94
- "red"
95
- ]
127
+ Downloads data0/ https://eric.clst.org/tech/usgeojson/
128
+ us_040: states
129
+ -rw-r--r--@ 1 owen staff 1.4M Apr 16 15:30 gz_2010_us_040_00_20m.json
130
+ -rw-r--r--@ 1 owen staff 2.4M Apr 16 15:30 gz_2010_us_040_00_5m.json
131
+ us_050: counties
132
+ -rw-r--r--@ 1 owen staff 3.3M Apr 16 15:30 gz_2010_us_050_00_20m.json
133
+ -rw-r--r--@ 1 owen staff 22M Apr 16 15:30 gz_2010_us_050_00_500k.json
134
+ us_500: congressional
135
+ -rw-r--r--@ 1 owen staff 2.6M Apr 16 15:30 gz_2010_us_500_11_20m.json
136
+ Uses: https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html
96
137
97
- ......................................................................
98
138
https://www.nrcs.usda.gov/wps/portal/nrcs/detail/?cid=nrcs143_013696
99
139
clip | tr '\t' ' ' > data/FIPS.txt
100
140
Note: 55 entries but last FIPS number is 78. OK tho, several gaps.
101
141
142
+ ......................................................................
143
+ ......................................................................
144
+ ......................................................................
145
+ ......................................................................
146
+ Issues:
147
+
148
+
149
+ - Key problem is that mapbox gl js doesn't use js where you'd like (expressions)
150
+
151
+ - Filtering on feature ID:
152
+ string ("05") converted to number causing multiple hits in string using "in" expr. Soln is to use an array I suspect
153
+ // REMIND: fix, id is numeric!
154
+ // filter:
155
+ // states.length === 0
156
+ // ? ['to-boolean', true]
157
+ // : ['in', ['id'], fips],
158
+ // : ['==', ['id'], states],
102
159
103
160
......................................................................
104
161
Commits:
105
162
......................................................................
106
- https://backspaces.github.io/MB/test.html
107
- https://backspaces.github.io/MB/counties.html
108
- MB.html cities0.html heatmap.html
109
- cities.html counties.html test.html
110
- //////////
111
163
git add .
112
164
files=`git status | grep '^\t' | egrep -v '(models/scripts|dist/|deleted|yarn)' | sed 's/^.*: //;s/^.*-> //'`; echo $files | tr ' ' '\n'
113
165
gitdiff $files | mate
@@ -116,6 +168,11 @@ gitcommit
116
168
117
169
//////////
118
170
171
+
172
+ - data0/: gitignored dir of original data before modified for MB use
173
+ - mktiles: put large intermediate files in data0/
174
+
175
+
119
176
counties.html: state filter
120
177
- bin/fips2json:
121
178
- add both Postal & ID code keys
0 commit comments