Datasets:

License:
File size: 11,604 Bytes
da43bcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
    
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    
        <script>
            L_NO_TOUCH = false;
            L_DISABLE_3D = false;
        </script>
    
    <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
    <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
    <script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.js"></script>
    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/css/all.min.css"/>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
    
            <meta name="viewport" content="width=device-width,
                initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
            <style>
                #map_a38d673f0ca359284ff75234a5c268cd {
                    position: relative;
                    width: 100.0%;
                    height: 100.0%;
                    left: 0.0%;
                    top: 0.0%;
                }
                .leaflet-container { font-size: 1rem; }
            </style>
        
    <script src="https://cdn.jsdelivr.net/npm/leaflet.fullscreen@3.0.0/Control.FullScreen.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.fullscreen@3.0.0/Control.FullScreen.css"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.css"/>
    <script src="https://cdn.jsdelivr.net/gh/ljagis/leaflet-measure@2.1.7/dist/leaflet-measure.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ljagis/leaflet-measure@2.1.7/dist/leaflet-measure.min.css"/>
    <script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css"/>
</head>
<body>
    
    
            <div class="folium-map" id="map_a38d673f0ca359284ff75234a5c268cd" ></div>
        
</body>
<script>
    
    
            var map_a38d673f0ca359284ff75234a5c268cd = L.map(
                "map_a38d673f0ca359284ff75234a5c268cd",
                {
                    center: [35.0, -100.0],
                    crs: L.CRS.EPSG3857,
                    zoom: 3,
                    zoomControl: true,
                    preferCanvas: false,
                    drawExport: false,
                    layersControl: true,
                }
            );
            L.control.scale().addTo(map_a38d673f0ca359284ff75234a5c268cd);

            

        
    
            var tile_layer_a0f43a1f4ce0b17ace3206fa0fa4c8b7 = L.tileLayer(
                "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
                {"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
            );
        
    
            tile_layer_a0f43a1f4ce0b17ace3206fa0fa4c8b7.addTo(map_a38d673f0ca359284ff75234a5c268cd);
        
    
            L.control.fullscreen(
                {"forceSeparateButton": false, "position": "topleft", "title": "Full Screen", "titleCancel": "Exit Full Screen"}
            ).addTo(map_a38d673f0ca359284ff75234a5c268cd);
        
    
            var options = {
              position: "topleft",
              draw: {},
              edit: {},
            }
            // FeatureGroup is to store editable layers.
            var drawnItems_draw_control_808af41363548a2d2b92a7aa5eca421a = new L.featureGroup().addTo(
                map_a38d673f0ca359284ff75234a5c268cd
            );
            options.edit.featureGroup = drawnItems_draw_control_808af41363548a2d2b92a7aa5eca421a;
            var draw_control_808af41363548a2d2b92a7aa5eca421a = new L.Control.Draw(
                options
            ).addTo( map_a38d673f0ca359284ff75234a5c268cd );
            map_a38d673f0ca359284ff75234a5c268cd.on(L.Draw.Event.CREATED, function(e) {
                var layer = e.layer,
                    type = e.layerType;
                var coords = JSON.stringify(layer.toGeoJSON());
                layer.on('click', function() {
                    alert(coords);
                    console.log(coords);
                });
                drawnItems_draw_control_808af41363548a2d2b92a7aa5eca421a.addLayer(layer);
             });
            map_a38d673f0ca359284ff75234a5c268cd.on('draw:created', function(e) {
                drawnItems_draw_control_808af41363548a2d2b92a7aa5eca421a.addLayer(e.layer);
            });
            
        
    
            var measure_control_0c1c542019b321e96d86057798ae17cd = new L.Control.Measure(
                {"position": "bottomleft", "primaryAreaUnit": "sqmeters", "primaryLengthUnit": "meters", "secondaryAreaUnit": "acres", "secondaryLengthUnit": "miles"});
            map_a38d673f0ca359284ff75234a5c268cd.addControl(measure_control_0c1c542019b321e96d86057798ae17cd);

            // Workaround for using this plugin with Leaflet>=1.8.0
            // https://github.com/ljagis/leaflet-measure/issues/171
            L.Control.Measure.include({
                _setCaptureMarkerIcon: function () {
                    // disable autopan
                    this._captureMarker.options.autoPanOnFocus = false;
                    // default function
                    this._captureMarker.setIcon(
                        L.divIcon({
                            iconSize: this._map.getSize().multiplyBy(2)
                        })
                    );
                },
            });

        
    

            var geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9 = {"collapsed": true, "defaultMarkGeocode": true, "position": "topleft", "provider": "nominatim", "providerOptions": {}, "zoom": 11};

            // note: geocoder name should start with lowercase
            var geocoderName_geocoder_f4b44377845319e1748a4a93f7a8a3c9 = geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9["provider"];

            var customGeocoder_geocoder_f4b44377845319e1748a4a93f7a8a3c9 = L.Control.Geocoder[ geocoderName_geocoder_f4b44377845319e1748a4a93f7a8a3c9 ](
                geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9['providerOptions']
            );
            geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9["geocoder"] = customGeocoder_geocoder_f4b44377845319e1748a4a93f7a8a3c9;

            L.Control.geocoder(
                geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9
            ).on('markgeocode', function(e) {
                var zoom = geocoderOpts_geocoder_f4b44377845319e1748a4a93f7a8a3c9['zoom'] || map_a38d673f0ca359284ff75234a5c268cd.getZoom();
                map_a38d673f0ca359284ff75234a5c268cd.setView(e.geocode.center, zoom);
            }).addTo(map_a38d673f0ca359284ff75234a5c268cd);

        
    
            map_a38d673f0ca359284ff75234a5c268cd.fitBounds(
                [[35, -100], [35, -100]],
                {"maxZoom": 3}
            );
        
    
            var tile_layer_09f082ba129b7c369be9eb5354b7a840 = L.tileLayer(
                "https://titiler.xyz/cog/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?transparent_bg=True\u0026url=https%3A%2F%2Fdata.source.coop%2Fcboettig%2Fcarbon%2Fcogs%2Firrecoverable_c_total_2018.tif\u0026colormap_name=reds\u0026bidx=1\u0026rescale=0.0%2C161.0",
                {"attribution": ".", "detectRetina": false, "maxNativeZoom": 30, "maxZoom": 30, "minZoom": 0, "noWrap": false, "opacity": 0.8, "subdomains": "abc", "tms": false}
            );
        
    
            tile_layer_09f082ba129b7c369be9eb5354b7a840.addTo(map_a38d673f0ca359284ff75234a5c268cd);
        
    
            map_a38d673f0ca359284ff75234a5c268cd.fitBounds(
                [[-60.00068614227767, -179.99999999999994], [84.00039183113232, 180.00000000000006]],
                {}
            );
        
    
            var tile_layer_687b2f3cc47d6a32950f67507028fcfc = L.tileLayer(
                "https://titiler.xyz/cog/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?transparent_bg=True\u0026url=https%3A%2F%2Fdata.source.coop%2Fcboettig%2Fcarbon%2Fcogs%2Fvulnerable_c_total_2018.tif\u0026colormap_name=purples\u0026bidx=1\u0026rescale=0.0%2C218.0",
                {"attribution": ".", "detectRetina": false, "maxNativeZoom": 30, "maxZoom": 30, "minZoom": 0, "noWrap": false, "opacity": 0.8, "subdomains": "abc", "tms": false}
            );
        
    
            tile_layer_687b2f3cc47d6a32950f67507028fcfc.addTo(map_a38d673f0ca359284ff75234a5c268cd);
        
    
            map_a38d673f0ca359284ff75234a5c268cd.fitBounds(
                [[-60.00068614227767, -180.0], [84.00039183113232, 180.0]],
                {}
            );
        
    
            var tile_layer_952663c645c5fb6f6915c17e9af14a2e = L.tileLayer(
                "https://titiler.xyz/cog/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?transparent_bg=True\u0026url=https%3A%2F%2Fdata.source.coop%2Fcboettig%2Fcarbon%2Fcogs%2Fmanageable_c_total_2018.tif\u0026colormap_name=greens\u0026bidx=1\u0026rescale=0.0%2C296.0",
                {"attribution": ".", "detectRetina": false, "maxNativeZoom": 30, "maxZoom": 30, "minZoom": 0, "noWrap": false, "opacity": 0.8, "subdomains": "abc", "tms": false}
            );
        
    
            tile_layer_952663c645c5fb6f6915c17e9af14a2e.addTo(map_a38d673f0ca359284ff75234a5c268cd);
        
    
            map_a38d673f0ca359284ff75234a5c268cd.fitBounds(
                [[-60.0006861422776, -179.99999999999994], [84.00039183113239, 180.00000000000006]],
                {}
            );
        
    
            var layer_control_4cd4aee3c1134b6f935f7fe3dd767b0a_layers = {
                base_layers : {
                    "openstreetmap" : tile_layer_a0f43a1f4ce0b17ace3206fa0fa4c8b7,
                },
                overlays :  {
                    "irrecoverable carbon" : tile_layer_09f082ba129b7c369be9eb5354b7a840,
                    "vulnerable carbon" : tile_layer_687b2f3cc47d6a32950f67507028fcfc,
                    "manageable carbon" : tile_layer_952663c645c5fb6f6915c17e9af14a2e,
                },
            };
            let layer_control_4cd4aee3c1134b6f935f7fe3dd767b0a = L.control.layers(
                layer_control_4cd4aee3c1134b6f935f7fe3dd767b0a_layers.base_layers,
                layer_control_4cd4aee3c1134b6f935f7fe3dd767b0a_layers.overlays,
                {"autoZIndex": true, "collapsed": true, "position": "topright"}
            ).addTo(map_a38d673f0ca359284ff75234a5c268cd);

        
</script>
</html>