@redus/georedus-ui 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/main.js +21 -4456
  3. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo, useCallback, useContext, createContext, useReducer, useEffect, useRef } from 'react';
2
- import { MARKDOWN_DEFAULT_REMARK_PLUGINS, MARKDOWN_DEFAULT_REHYPE_PLUGINS, Markdown as Markdown$1, CANCELLED, Flex, DropdownMenu, Box, Input, SwitchInput, TextEllipsis, withDefaults, LoadingOverlay, Button, fileReadAs, SingleFileInput, InputProvider as InputProvider$1, rendererSpecList, TextInput, withLabeledLayout, INPUTS, useLocalState, EvenSpacedList, LoadingIndicator } from '@orioro/react-ui-core';
2
+ import { MARKDOWN_DEFAULT_REMARK_PLUGINS, MARKDOWN_DEFAULT_REHYPE_PLUGINS, Markdown as Markdown$1, CANCELLED, Flex, DropdownMenu, Box, Input, SwitchInput, TextEllipsis, withDefaults, LoadingOverlay, Button, SingleFileInput, fileReadAs, InputProvider as InputProvider$1, rendererSpecList, TextInput, withLabeledLayout, INPUTS, useLocalState, EvenSpacedList, LoadingIndicator } from '@orioro/react-ui-core';
3
3
  import { nodeIdFromPath } from '@orioro/tree-model';
4
4
  import { makeDirNav } from '@orioro/react-dir-nav';
5
5
  import { Icon } from '@mdi/react';
@@ -11,7 +11,7 @@ import { __makeTemplateObject, __assign, __spreadArray, __awaiter, __generator }
11
11
  import remarkMath from 'remark-math';
12
12
  import rehypeKatex from 'rehype-katex';
13
13
  import 'katex/dist/katex.min.css';
14
- import { isPlainObject, get, pick, omit, set, uniqBy, groupBy, uniq } from 'lodash';
14
+ import { isPlainObject, pick, omit, uniqBy, uniq, get } from 'lodash';
15
15
  import { useDebounce } from 'react-use';
16
16
  import { createDialogSystem, DIALOGS } from '@orioro/react-dialogs';
17
17
  import { CsvImportDialog } from '@orioro/react-csv';
@@ -22,18 +22,18 @@ import { Legend } from '@orioro/react-chart-util';
22
22
  import 'maplibre-gl/dist/maplibre-gl.css';
23
23
  import { useQueries, useQuery } from '@tanstack/react-query';
24
24
  import { AttributionControl, GeolocateControl, FullscreenControl, NavigationControl, ScaleControl, useMap } from 'react-map-gl/maplibre';
25
- import { slugify, dataJoin } from '@orioro/util';
26
- import { makeResolve, $$literal, withExpressionResolvers, expressions, ALL_EXPR, fetchExpr, resolve, resolveAsync } from '@orioro/resolve';
25
+ import '@orioro/util';
26
+ import { makeResolve, $$literal, withExpressionResolvers, expressions, ALL_EXPR, fetchExpr } from '@orioro/resolve';
27
27
  import { schemeTableau10, schemeSet3, schemeSet2, schemeSet1, schemePastel2, schemePastel1, schemePaired, schemeObservable10, schemeDark2, schemeAccent, schemeCategory10, schemeSpectral, schemeRdYlGn, schemeRdYlBu, schemeRdGy, schemeRdBu, schemePuOr, schemePiYG, schemePRGn, schemeBrBG, schemeYlOrRd, schemeYlOrBr, schemeYlGn, schemeYlGnBu, schemeRdPu, schemePuRd, schemePuBu, schemePuBuGn, schemeOrRd, schemeGnBu, schemeBuPu, schemeBuGn, schemeReds, schemePurples, schemeOranges, schemeGreys, schemeGreens, schemeBlues } from 'd3-scale-chromatic';
28
- import { saveAs } from 'file-saver';
28
+ import 'file-saver';
29
29
  import initGdalJs from 'gdal3.js';
30
30
  import queryString from 'query-string';
31
31
  import { wrap } from 'comlink';
32
- import { get as get$1 } from '@orioro/get';
32
+ import '@orioro/get';
33
33
  import { validate } from '@orioro/validate';
34
- import { buffer } from '@turf/turf';
35
- import { csvParse } from 'd3-dsv';
36
- import { strAutoCast } from '@orioro/cast';
34
+ import '@turf/turf';
35
+ import 'd3-dsv';
36
+ import '@orioro/cast';
37
37
 
38
38
  function _arrayLikeToArray(r, a) {
39
39
  (null == a || a > r.length) && (a = r.length);
@@ -797,7 +797,7 @@ function ViewConfTabs(_ref) {
797
797
  }, "Visualiza\xE7\xE3o habilitada"));
798
798
  }
799
799
 
800
- var _excluded$4 = ["textSearch", "content", "maxLines"];
800
+ var _excluded$3 = ["textSearch", "content", "maxLines"];
801
801
  var _templateObject$3, _templateObject2$2;
802
802
  var Container = styled(Box)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n --view-control-base-padding: 12px;\n box-shadow:\n rgba(0, 0, 0, 0.12) 0px 1px 3px,\n rgba(0, 0, 0, 0.24) 0px 1px 2px;\n\n border-radius: 2px;\n background-color: var(--redus-bege, white);\n // background-color: var(--accent-4, white);\n"])));
803
803
  var Summary = styled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n // background-color: var(--redus-bege, white);\n background-color: ", ";\n padding: 0;\n\n transition: background-color 0.1s ease-out;\n\n display: flex;\n border: none;\n text-align: left;\n width: 100%;\n\n cursor: pointer;\n\n &:hover {\n // background-color: color-mix(in srgb, var(--redus-bege) 80%, white);\n background-color: ", ";\n }\n\n &:active {\n filter: brightness(96%);\n }\n"])), function (_ref) {
@@ -825,7 +825,7 @@ function HeadingWithTooltipAndEllipsis(_ref7) {
825
825
  content = _ref7.content,
826
826
  _ref7$maxLines = _ref7.maxLines,
827
827
  maxLines = _ref7$maxLines === void 0 ? 2 : _ref7$maxLines,
828
- props = _objectWithoutProperties(_ref7, _excluded$4);
828
+ props = _objectWithoutProperties(_ref7, _excluded$3);
829
829
  return /*#__PURE__*/React.createElement(Tooltip, {
830
830
  content: content
831
831
  }, /*#__PURE__*/React.createElement(Heading, _extends({
@@ -934,7 +934,7 @@ function ViewControl(_ref8) {
934
934
 
935
935
  var VIEW_TYPE_SURFACE_CHOROPLETH = 'surface_choropleth';
936
936
 
937
- var _excluded$3 = ["viewSpecs", "viewConfState", "resolvedViews", "onSetView", "onDeactivateView", "style"];
937
+ var _excluded$2 = ["viewSpecs", "viewConfState", "resolvedViews", "onSetView", "onDeactivateView", "style"];
938
938
  var _templateObject$2, _templateObject2$1;
939
939
  var STATIC_NODE_ICONS = {
940
940
  'populacao-e-domicilios': /*#__PURE__*/React.createElement(Icon, {
@@ -1076,7 +1076,7 @@ function ViewMenu(_ref4) {
1076
1076
  onSetView = _ref4.onSetView,
1077
1077
  onDeactivateView = _ref4.onDeactivateView,
1078
1078
  style = _ref4.style,
1079
- props = _objectWithoutProperties(_ref4, _excluded$3);
1079
+ props = _objectWithoutProperties(_ref4, _excluded$2);
1080
1080
  var viewSpecsById = useMemo(function () {
1081
1081
  return Object.fromEntries(viewSpecs.map(function (spec) {
1082
1082
  return [spec.id, spec];
@@ -1622,12 +1622,12 @@ function ViewLayoutControl(_ref4) {
1622
1622
  }));
1623
1623
  }
1624
1624
 
1625
- var _excluded$2 = ["viewSpecs", "viewConfState", "viewConfDispatch"];
1625
+ var _excluded$1 = ["viewSpecs", "viewConfState", "viewConfDispatch"];
1626
1626
  function ViewLayoutPopover(_ref) {
1627
1627
  var viewSpecs = _ref.viewSpecs,
1628
1628
  viewConfState = _ref.viewConfState,
1629
1629
  viewConfDispatch = _ref.viewConfDispatch,
1630
- props = _objectWithoutProperties(_ref, _excluded$2);
1630
+ props = _objectWithoutProperties(_ref, _excluded$1);
1631
1631
  var activeViewCount = useMemo(function () {
1632
1632
  return Object.keys(viewConfState.byId).length;
1633
1633
  }, [viewConfState.byId]);
@@ -1664,2271 +1664,6 @@ function ViewLayoutPopover(_ref) {
1664
1664
  }))))));
1665
1665
  }
1666
1666
 
1667
- var VEGETATION_AND_WATER_OVERLAY_LAYERS = [
1668
- // {
1669
- // "id": "Background",
1670
- // "type": "background",
1671
- // "layout": {
1672
- // "visibility": "visible"
1673
- // },
1674
- // "paint": {
1675
- // "background-color": "hsl(30,25%,98%)",
1676
- // "background-opacity": 1
1677
- // }
1678
- // },
1679
- // {
1680
- // "id": "Residential",
1681
- // "type": "fill",
1682
- // "source": "maptiler_planet",
1683
- // "source-layer": "landuse",
1684
- // "minzoom": 6,
1685
- // "maxzoom": 13,
1686
- // "layout": {
1687
- // "visibility": "visible"
1688
- // },
1689
- // "paint": {
1690
- // "fill-antialias": true,
1691
- // "fill-color": {
1692
- // "stops": [
1693
- // [6, "hsl(0, 0%, 94%)"
1694
- // ],
1695
- // [13, "hsl(0,0%,93%)"
1696
- // ]
1697
- // ]
1698
- // },
1699
- // "fill-opacity": 1
1700
- // },
1701
- // "filter": [
1702
- // "==",
1703
- // "class",
1704
- // "residential"
1705
- // ]
1706
- // },
1707
- {
1708
- "id": "Landcover",
1709
- "type": "fill",
1710
- "source": "maptiler_planet",
1711
- "source-layer": "landcover",
1712
- "layout": {
1713
- "visibility": "visible"
1714
- },
1715
- "paint": {
1716
- "fill-antialias": false,
1717
- "fill-color": "hsl(96, 44%, 79%)",
1718
- // "fill-color": "red",
1719
- "fill-opacity": 0.6
1720
- // "fill-opacity": {
1721
- // "stops": [
1722
- // [8, 0.2],
1723
- // [9, 0.25],
1724
- // [11, 0.35]
1725
- // ]
1726
- // }
1727
- },
1728
- "filter": ["in", "class", "wood", "grass"]
1729
- }, {
1730
- "id": "Forest",
1731
- "type": "fill",
1732
- "source": "maptiler_planet",
1733
- "source-layer": "globallandcover",
1734
- "maxzoom": 7,
1735
- "layout": {
1736
- "visibility": "visible"
1737
- },
1738
- "paint": {
1739
- // "fill-color": "hsla(96, 44%, 79%, 0.15)"
1740
- "fill-color": "hsl(96, 44%, 79%)"
1741
- },
1742
- "filter": ["in", "class", "forest", "tree"]
1743
- },
1744
- // {
1745
- // "id": "Stadium",
1746
- // "type": "fill",
1747
- // "source": "maptiler_planet",
1748
- // "source-layer": "landuse",
1749
- // "minzoom": 10,
1750
- // "layout": {
1751
- // "visibility": "visible"
1752
- // },
1753
- // "paint": {
1754
- // "fill-antialias": true,
1755
- // "fill-color": "hsl(86,57%,88%)",
1756
- // "fill-opacity": {
1757
- // "stops": [
1758
- // [10, 0.25],
1759
- // [14, 0.55]
1760
- // ]
1761
- // },
1762
- // "fill-outline-color": "hsl(85,26%,77%)"
1763
- // },
1764
- // "filter": [
1765
- // "in",
1766
- // "class",
1767
- // "stadium",
1768
- // "pitch"
1769
- // ]
1770
- // },
1771
- // {
1772
- // "id": "Cemetery",
1773
- // "type": "fill",
1774
- // "source": "maptiler_planet",
1775
- // "source-layer": "landuse",
1776
- // "minzoom": 10,
1777
- // "layout": {
1778
- // "visibility": "visible"
1779
- // },
1780
- // "paint": {
1781
- // "fill-antialias": true,
1782
- // "fill-color": "hsl(0, 0%, 89%)",
1783
- // "fill-opacity": 1
1784
- // },
1785
- // "filter": [
1786
- // "==",
1787
- // "class",
1788
- // "cemetery"
1789
- // ]
1790
- // },
1791
- {
1792
- "id": "River",
1793
- "type": "line",
1794
- "source": "maptiler_planet",
1795
- "source-layer": "waterway",
1796
- "layout": {
1797
- "visibility": "visible"
1798
- },
1799
- "paint": {
1800
- "line-color": "hsl(187,37%,87%)",
1801
- "line-width": ["interpolate", ["linear"], ["zoom"], 8, 0.5, 9, 1, 15, 1.5, 16, 2.5]
1802
- }
1803
- }, {
1804
- "id": "Water shadow",
1805
- "type": "fill",
1806
- "source": "maptiler_planet",
1807
- "source-layer": "water",
1808
- "layout": {
1809
- "visibility": "visible"
1810
- },
1811
- "paint": {
1812
- "fill-antialias": true,
1813
- "fill-color": "hsl(196,28%,74%)",
1814
- "fill-opacity": 1
1815
- },
1816
- "filter": ["all", ["==", "$type", "Polygon"], ["!=", "brunnel", "tunnel"]]
1817
- }, {
1818
- "id": "Water",
1819
- "type": "fill",
1820
- "source": "maptiler_planet",
1821
- "source-layer": "water",
1822
- "layout": {
1823
- "visibility": "visible"
1824
- },
1825
- "paint": {
1826
- "fill-antialias": true,
1827
- "fill-color": "hsl(187, 36%, 87%)",
1828
- "fill-opacity": 1,
1829
- "fill-translate": {
1830
- "stops": [[0, [0, 2]], [6, [0, 3]], [12, [0, 2]], [14, [0, 0]]]
1831
- },
1832
- "fill-translate-anchor": "map"
1833
- },
1834
- "filter": ["all", ["==", "$type", "Polygon"], ["!=", "brunnel", "tunnel"]]
1835
- },
1836
- // {
1837
- // "id": "Aeroway",
1838
- // "type": "line",
1839
- // "source": "maptiler_planet",
1840
- // "source-layer": "aeroway",
1841
- // "minzoom": 12,
1842
- // "layout": {
1843
- // "line-cap": "round",
1844
- // "line-join": "round",
1845
- // "visibility": "visible"
1846
- // },
1847
- // "paint": {
1848
- // "line-color": "hsl(0, 0%, 87%)",
1849
- // "line-width": [
1850
- // "interpolate",
1851
- // [
1852
- // "linear",
1853
- // 1],
1854
- // [
1855
- // "zoom"
1856
- // ],
1857
- // 11, [
1858
- // "match",
1859
- // [
1860
- // "get",
1861
- // "class"
1862
- // ],
1863
- // [
1864
- // "runway"
1865
- // ],
1866
- // 3, 0.5],
1867
- // 15, [
1868
- // "match",
1869
- // [
1870
- // "get",
1871
- // "class"
1872
- // ],
1873
- // [
1874
- // "runway"
1875
- // ],
1876
- // 15, 6],
1877
- // 16, [
1878
- // "match",
1879
- // [
1880
- // "get",
1881
- // "class"
1882
- // ],
1883
- // [
1884
- // "runway"
1885
- // ],
1886
- // 20, 6]
1887
- // ]
1888
- // },
1889
- // "metadata": {
1890
-
1891
- // },
1892
- // "filter": [
1893
- // "==",
1894
- // "$type",
1895
- // "LineString"
1896
- // ]
1897
- // },
1898
- // {
1899
- // "id": "Tunnel outline",
1900
- // "type": "line",
1901
- // "source": "maptiler_planet",
1902
- // "source-layer": "transportation",
1903
- // "minzoom": 11,
1904
- // "layout": {
1905
- // "line-cap": "round",
1906
- // "line-join": "round",
1907
- // "visibility": "visible"
1908
- // },
1909
- // "paint": {
1910
- // "line-color": [
1911
- // "interpolate",
1912
- // [
1913
- // "linear"
1914
- // ],
1915
- // [
1916
- // "zoom"
1917
- // ],
1918
- // 11, "hsla(0, 0%, 85%, 0.5)",
1919
- // 22, "hsla(0, 0%, 85%, 0.75)"
1920
- // ],
1921
- // "line-width": [
1922
- // "interpolate",
1923
- // [
1924
- // "linear",
1925
- // 2],
1926
- // [
1927
- // "zoom"
1928
- // ],
1929
- // 4, 0.5, 7, 0.5, 10, [
1930
- // "match",
1931
- // [
1932
- // "get",
1933
- // "class"
1934
- // ],
1935
- // [
1936
- // "motorway"
1937
- // ],
1938
- // [
1939
- // "match",
1940
- // [
1941
- // "get",
1942
- // "ramp"
1943
- // ],
1944
- // 1, 0, 2.5],
1945
- // [
1946
- // "trunk",
1947
- // "primary"
1948
- // ],
1949
- // 2.4, 0],
1950
- // 12, [
1951
- // "match",
1952
- // [
1953
- // "get",
1954
- // "class"
1955
- // ],
1956
- // [
1957
- // "motorway"
1958
- // ],
1959
- // [
1960
- // "match",
1961
- // [
1962
- // "get",
1963
- // "ramp"
1964
- // ],
1965
- // 1, 2, 6],
1966
- // [
1967
- // "trunk",
1968
- // "primary"
1969
- // ],
1970
- // 3, [
1971
- // "secondary",
1972
- // "tertiary"
1973
- // ],
1974
- // 2, [
1975
- // "minor",
1976
- // "service",
1977
- // "track"
1978
- // ],
1979
- // 1, 0.5],
1980
- // 14, [
1981
- // "match",
1982
- // [
1983
- // "get",
1984
- // "class"
1985
- // ],
1986
- // [
1987
- // "motorway"
1988
- // ],
1989
- // [
1990
- // "match",
1991
- // [
1992
- // "get",
1993
- // "ramp"
1994
- // ],
1995
- // 1, 5, 8],
1996
- // [
1997
- // "trunk"
1998
- // ],
1999
- // 4, [
2000
- // "primary"
2001
- // ],
2002
- // 6, [
2003
- // "secondary"
2004
- // ],
2005
- // 6, [
2006
- // "tertiary"
2007
- // ],
2008
- // 4, [
2009
- // "minor",
2010
- // "service",
2011
- // "track"
2012
- // ],
2013
- // 3, 3],
2014
- // 16, [
2015
- // "match",
2016
- // [
2017
- // "get",
2018
- // "class"
2019
- // ],
2020
- // [
2021
- // "motorway",
2022
- // "trunk",
2023
- // "primary"
2024
- // ],
2025
- // 10, [
2026
- // "secondary"
2027
- // ],
2028
- // 9, [
2029
- // "tertiary"
2030
- // ],
2031
- // 8, [
2032
- // "minor",
2033
- // "service",
2034
- // "track"
2035
- // ],
2036
- // 6, 6],
2037
- // 20, [
2038
- // "match",
2039
- // [
2040
- // "get",
2041
- // "class"
2042
- // ],
2043
- // [
2044
- // "motorway",
2045
- // "trunk",
2046
- // "primary"
2047
- // ],
2048
- // 26, [
2049
- // "secondary"
2050
- // ],
2051
- // 26, [
2052
- // "tertiary"
2053
- // ],
2054
- // 26, [
2055
- // "minor",
2056
- // "service",
2057
- // "track"
2058
- // ],
2059
- // 18, 18]
2060
- // ]
2061
- // },
2062
- // "filter": [
2063
- // "all",
2064
- // [
2065
- // "in",
2066
- // "class",
2067
- // "motorway",
2068
- // "trunk",
2069
- // "primary",
2070
- // "secondary",
2071
- // "tertiary",
2072
- // "minor",
2073
- // "service"
2074
- // ],
2075
- // [
2076
- // "==",
2077
- // "brunnel",
2078
- // "tunnel"
2079
- // ]
2080
- // ]
2081
- // },
2082
- // {
2083
- // "id": "Tunnel path",
2084
- // "type": "line",
2085
- // "source": "maptiler_planet",
2086
- // "source-layer": "transportation",
2087
- // "minzoom": 15,
2088
- // "layout": {
2089
- // "line-cap": "round",
2090
- // "line-join": "round",
2091
- // "visibility": "visible"
2092
- // },
2093
- // "paint": {
2094
- // "line-color": "hsl(0, 0%, 90%)",
2095
- // "line-dasharray": [0.5, 2],
2096
- // "line-opacity": 1,
2097
- // "line-width": [
2098
- // "interpolate",
2099
- // [
2100
- // "linear"
2101
- // ],
2102
- // [
2103
- // "zoom"
2104
- // ],
2105
- // 14, 0.7, 16, 0.8, 18, 1, 22, 2]
2106
- // },
2107
- // "filter": [
2108
- // "all",
2109
- // [
2110
- // "==",
2111
- // "class",
2112
- // "path"
2113
- // ],
2114
- // [
2115
- // "==",
2116
- // "brunnel",
2117
- // "tunnel"
2118
- // ]
2119
- // ]
2120
- // },
2121
- // {
2122
- // "id": "Tunnel",
2123
- // "type": "line",
2124
- // "source": "maptiler_planet",
2125
- // "source-layer": "transportation",
2126
- // "minzoom": 11,
2127
- // "layout": {
2128
- // "line-cap": "square",
2129
- // "line-join": "miter",
2130
- // "visibility": "visible"
2131
- // },
2132
- // "paint": {
2133
- // "line-color": "hsl(0, 0%, 97%)",
2134
- // "line-width": [
2135
- // "interpolate",
2136
- // [
2137
- // "linear",
2138
- // 2],
2139
- // [
2140
- // "zoom"
2141
- // ],
2142
- // 5, 0.5, 6, [
2143
- // "match",
2144
- // [
2145
- // "get",
2146
- // "class"
2147
- // ],
2148
- // [
2149
- // "motorway"
2150
- // ],
2151
- // [
2152
- // "match",
2153
- // [
2154
- // "get",
2155
- // "brunnel"
2156
- // ],
2157
- // [
2158
- // "bridge"
2159
- // ],
2160
- // 0, 1],
2161
- // [
2162
- // "trunk",
2163
- // "primary"
2164
- // ],
2165
- // 0, 0],
2166
- // 10, [
2167
- // "match",
2168
- // [
2169
- // "get",
2170
- // "class"
2171
- // ],
2172
- // [
2173
- // "motorway"
2174
- // ],
2175
- // [
2176
- // "match",
2177
- // [
2178
- // "get",
2179
- // "ramp"
2180
- // ],
2181
- // 1, 0, 2.5],
2182
- // [
2183
- // "trunk",
2184
- // "primary"
2185
- // ],
2186
- // 1.5, 1],
2187
- // 12, [
2188
- // "match",
2189
- // [
2190
- // "get",
2191
- // "class"
2192
- // ],
2193
- // [
2194
- // "motorway"
2195
- // ],
2196
- // [
2197
- // "match",
2198
- // [
2199
- // "get",
2200
- // "ramp"
2201
- // ],
2202
- // 1, 1, 4],
2203
- // [
2204
- // "trunk"
2205
- // ],
2206
- // 2.5, [
2207
- // "primary"
2208
- // ],
2209
- // 2.5, [
2210
- // "secondary",
2211
- // "tertiary"
2212
- // ],
2213
- // 1.5, [
2214
- // "minor",
2215
- // "service",
2216
- // "track"
2217
- // ],
2218
- // 1, 1],
2219
- // 14, [
2220
- // "match",
2221
- // [
2222
- // "get",
2223
- // "class"
2224
- // ],
2225
- // [
2226
- // "motorway"
2227
- // ],
2228
- // [
2229
- // "match",
2230
- // [
2231
- // "get",
2232
- // "ramp"
2233
- // ],
2234
- // 1, 5, 6],
2235
- // [
2236
- // "trunk"
2237
- // ],
2238
- // 3, [
2239
- // "primary"
2240
- // ],
2241
- // 5, [
2242
- // "secondary"
2243
- // ],
2244
- // 4, [
2245
- // "tertiary"
2246
- // ],
2247
- // 3, [
2248
- // "minor",
2249
- // "service",
2250
- // "track"
2251
- // ],
2252
- // 2, 2],
2253
- // 16, [
2254
- // "match",
2255
- // [
2256
- // "get",
2257
- // "class"
2258
- // ],
2259
- // [
2260
- // "motorway",
2261
- // "trunk",
2262
- // "primary"
2263
- // ],
2264
- // 8, [
2265
- // "secondary"
2266
- // ],
2267
- // 7, [
2268
- // "tertiary"
2269
- // ],
2270
- // 6, [
2271
- // "minor",
2272
- // "service",
2273
- // "track"
2274
- // ],
2275
- // 4, 4],
2276
- // 20, [
2277
- // "match",
2278
- // [
2279
- // "get",
2280
- // "class"
2281
- // ],
2282
- // [
2283
- // "motorway",
2284
- // "trunk",
2285
- // "primary"
2286
- // ],
2287
- // 24, [
2288
- // "secondary"
2289
- // ],
2290
- // 24, [
2291
- // "tertiary"
2292
- // ],
2293
- // 24, [
2294
- // "minor",
2295
- // "service",
2296
- // "track"
2297
- // ],
2298
- // 16, 16]
2299
- // ]
2300
- // },
2301
- // "filter": [
2302
- // "all",
2303
- // [
2304
- // "==",
2305
- // "$type",
2306
- // "LineString"
2307
- // ],
2308
- // [
2309
- // "all",
2310
- // [
2311
- // "in",
2312
- // "class",
2313
- // "minor",
2314
- // "motorway",
2315
- // "primary",
2316
- // "secondary",
2317
- // "service",
2318
- // "tertiary",
2319
- // "trunk"
2320
- // ],
2321
- // [
2322
- // "==",
2323
- // "brunnel",
2324
- // "tunnel"
2325
- // ]
2326
- // ]
2327
- // ]
2328
- // },
2329
- // {
2330
- // "id": "Railway tunnel",
2331
- // "type": "line",
2332
- // "source": "maptiler_planet",
2333
- // "source-layer": "transportation",
2334
- // "minzoom": 13,
2335
- // "layout": {
2336
- // "line-join": "round",
2337
- // "visibility": "visible"
2338
- // },
2339
- // "paint": {
2340
- // "line-color": "hsl(0, 0%, 80%)",
2341
- // "line-opacity": 0.5,
2342
- // "line-width": {
2343
- // "base": 1.3,
2344
- // "stops": [
2345
- // [13, 0.5],
2346
- // [14, 1],
2347
- // [15, 1],
2348
- // [16, 3],
2349
- // [21, 7]
2350
- // ]
2351
- // }
2352
- // },
2353
- // "filter": [
2354
- // "all",
2355
- // [
2356
- // "==",
2357
- // "class",
2358
- // "rail"
2359
- // ],
2360
- // [
2361
- // "==",
2362
- // "brunnel",
2363
- // "tunnel"
2364
- // ]
2365
- // ]
2366
- // },
2367
- // {
2368
- // "id": "Railway tunnel dash",
2369
- // "type": "line",
2370
- // "source": "maptiler_planet",
2371
- // "source-layer": "transportation",
2372
- // "minzoom": 15,
2373
- // "layout": {
2374
- // "line-join": "round",
2375
- // "visibility": "visible"
2376
- // },
2377
- // "paint": {
2378
- // "line-color": "hsl(0, 0%, 95%)",
2379
- // "line-dasharray": [2, 2],
2380
- // "line-width": {
2381
- // "base": 1.3,
2382
- // "stops": [
2383
- // [15, 0.5],
2384
- // [16, 1],
2385
- // [20, 5]
2386
- // ]
2387
- // }
2388
- // },
2389
- // "filter": [
2390
- // "all",
2391
- // [
2392
- // "==",
2393
- // "class",
2394
- // "rail"
2395
- // ],
2396
- // [
2397
- // "==",
2398
- // "brunnel",
2399
- // "tunnel"
2400
- // ]
2401
- // ]
2402
- // },
2403
- // {
2404
- // "id": "Pier",
2405
- // "type": "fill",
2406
- // "source": "maptiler_planet",
2407
- // "source-layer": "transportation",
2408
- // "layout": {
2409
- // "visibility": "visible"
2410
- // },
2411
- // "paint": {
2412
- // "fill-antialias": true,
2413
- // "fill-color": "hsl(38, 50%, 97%)"
2414
- // },
2415
- // "metadata": {
2416
-
2417
- // },
2418
- // "filter": [
2419
- // "all",
2420
- // [
2421
- // "==",
2422
- // "$type",
2423
- // "Polygon"
2424
- // ],
2425
- // [
2426
- // "==",
2427
- // "class",
2428
- // "pier"
2429
- // ]
2430
- // ]
2431
- // },
2432
- // {
2433
- // "id": "Pier road",
2434
- // "type": "line",
2435
- // "source": "maptiler_planet",
2436
- // "source-layer": "transportation",
2437
- // "layout": {
2438
- // "line-cap": "round",
2439
- // "line-join": "round",
2440
- // "visibility": "visible"
2441
- // },
2442
- // "paint": {
2443
- // "line-color": "hsl(30,25%,98%)",
2444
- // "line-width": {
2445
- // "base": 1.2,
2446
- // "stops": [
2447
- // [15, 1],
2448
- // [17, 4]
2449
- // ]
2450
- // }
2451
- // },
2452
- // "metadata": {
2453
-
2454
- // },
2455
- // "filter": [
2456
- // "all",
2457
- // [
2458
- // "==",
2459
- // "$type",
2460
- // "LineString"
2461
- // ],
2462
- // [
2463
- // "in",
2464
- // "class",
2465
- // "pier"
2466
- // ]
2467
- // ]
2468
- // },
2469
- // {
2470
- // "id": "Bridge",
2471
- // "type": "fill",
2472
- // "source": "maptiler_planet",
2473
- // "source-layer": "transportation",
2474
- // "layout": {
2475
- // "visibility": "visible"
2476
- // },
2477
- // "paint": {
2478
- // "fill-antialias": true,
2479
- // "fill-color": "hsl(30,25%,98%)",
2480
- // "fill-opacity": 0.5
2481
- // },
2482
- // "metadata": {
2483
-
2484
- // },
2485
- // "filter": [
2486
- // "all",
2487
- // [
2488
- // "==",
2489
- // "$type",
2490
- // "Polygon"
2491
- // ],
2492
- // [
2493
- // "in",
2494
- // "brunnel",
2495
- // "bridge"
2496
- // ]
2497
- // ]
2498
- // },
2499
- // {
2500
- // "id": "Road network outline",
2501
- // "type": "line",
2502
- // "source": "maptiler_planet",
2503
- // "source-layer": "transportation",
2504
- // "minzoom": 6,
2505
- // "layout": {
2506
- // "line-cap": "butt",
2507
- // "line-join": "round",
2508
- // "visibility": "visible"
2509
- // },
2510
- // "paint": {
2511
- // "line-color": "hsl(0, 0%, 85%)",
2512
- // "line-opacity": 1,
2513
- // "line-width": [
2514
- // "interpolate",
2515
- // [
2516
- // "linear",
2517
- // 2],
2518
- // [
2519
- // "zoom"
2520
- // ],
2521
- // 4, 0.5, 7, 0.5, 10, [
2522
- // "match",
2523
- // [
2524
- // "get",
2525
- // "class"
2526
- // ],
2527
- // [
2528
- // "motorway"
2529
- // ],
2530
- // [
2531
- // "match",
2532
- // [
2533
- // "get",
2534
- // "ramp"
2535
- // ],
2536
- // 1, 0, 2.5],
2537
- // [
2538
- // "trunk",
2539
- // "primary"
2540
- // ],
2541
- // 2.4, 0],
2542
- // 12, [
2543
- // "match",
2544
- // [
2545
- // "get",
2546
- // "class"
2547
- // ],
2548
- // [
2549
- // "motorway"
2550
- // ],
2551
- // [
2552
- // "match",
2553
- // [
2554
- // "get",
2555
- // "ramp"
2556
- // ],
2557
- // 1, 2, 6],
2558
- // [
2559
- // "trunk",
2560
- // "primary"
2561
- // ],
2562
- // 3, [
2563
- // "secondary",
2564
- // "tertiary"
2565
- // ],
2566
- // 2, [
2567
- // "minor",
2568
- // "service",
2569
- // "track"
2570
- // ],
2571
- // 0, 0.5],
2572
- // 14, [
2573
- // "match",
2574
- // [
2575
- // "get",
2576
- // "class"
2577
- // ],
2578
- // [
2579
- // "motorway"
2580
- // ],
2581
- // [
2582
- // "match",
2583
- // [
2584
- // "get",
2585
- // "ramp"
2586
- // ],
2587
- // 1, 5, 8],
2588
- // [
2589
- // "trunk"
2590
- // ],
2591
- // 4, [
2592
- // "primary"
2593
- // ],
2594
- // 6, [
2595
- // "secondary"
2596
- // ],
2597
- // 6, [
2598
- // "tertiary"
2599
- // ],
2600
- // 4, [
2601
- // "minor",
2602
- // "service",
2603
- // "track"
2604
- // ],
2605
- // 3, 3],
2606
- // 16, [
2607
- // "match",
2608
- // [
2609
- // "get",
2610
- // "class"
2611
- // ],
2612
- // [
2613
- // "motorway",
2614
- // "trunk",
2615
- // "primary"
2616
- // ],
2617
- // 10, [
2618
- // "secondary"
2619
- // ],
2620
- // 9, [
2621
- // "tertiary"
2622
- // ],
2623
- // 8, [
2624
- // "minor",
2625
- // "service",
2626
- // "track"
2627
- // ],
2628
- // 6, 6],
2629
- // 20, [
2630
- // "match",
2631
- // [
2632
- // "get",
2633
- // "class"
2634
- // ],
2635
- // [
2636
- // "motorway",
2637
- // "trunk",
2638
- // "primary"
2639
- // ],
2640
- // 26, [
2641
- // "secondary"
2642
- // ],
2643
- // 26, [
2644
- // "tertiary"
2645
- // ],
2646
- // 26, [
2647
- // "minor",
2648
- // "service",
2649
- // "track"
2650
- // ],
2651
- // 18, 18]
2652
- // ]
2653
- // },
2654
- // "metadata": {
2655
-
2656
- // },
2657
- // "filter": [
2658
- // "all",
2659
- // [
2660
- // "!=",
2661
- // "brunnel",
2662
- // "tunnel"
2663
- // ],
2664
- // [
2665
- // "!in",
2666
- // "class",
2667
- // "ferry",
2668
- // "rail",
2669
- // "transit",
2670
- // "pier",
2671
- // "bridge",
2672
- // "path",
2673
- // "aerialway",
2674
- // "motorway_construction",
2675
- // "trunk_construction",
2676
- // "primary_construction",
2677
- // "secondary_construction",
2678
- // "tertiary_construction",
2679
- // "minor_construction",
2680
- // "service_construction",
2681
- // "track_construction"
2682
- // ]
2683
- // ]
2684
- // },
2685
- // {
2686
- // "id": "Road network",
2687
- // "type": "line",
2688
- // "source": "maptiler_planet",
2689
- // "source-layer": "transportation",
2690
- // "minzoom": 6,
2691
- // "layout": {
2692
- // "line-cap": "butt",
2693
- // "line-join": "round",
2694
- // "visibility": "visible"
2695
- // },
2696
- // "paint": {
2697
- // "line-color": "hsl(0, 0%, 100%)",
2698
- // "line-width": [
2699
- // "interpolate",
2700
- // [
2701
- // "linear",
2702
- // 2],
2703
- // [
2704
- // "zoom"
2705
- // ],
2706
- // 5, 0.5, 6, [
2707
- // "match",
2708
- // [
2709
- // "get",
2710
- // "class"
2711
- // ],
2712
- // [
2713
- // "motorway"
2714
- // ],
2715
- // [
2716
- // "match",
2717
- // [
2718
- // "get",
2719
- // "brunnel"
2720
- // ],
2721
- // [
2722
- // "bridge"
2723
- // ],
2724
- // 0, 1],
2725
- // [
2726
- // "trunk",
2727
- // "primary"
2728
- // ],
2729
- // 0, 0],
2730
- // 10, [
2731
- // "match",
2732
- // [
2733
- // "get",
2734
- // "class"
2735
- // ],
2736
- // [
2737
- // "motorway"
2738
- // ],
2739
- // [
2740
- // "match",
2741
- // [
2742
- // "get",
2743
- // "ramp"
2744
- // ],
2745
- // 1, 0, 2.5],
2746
- // [
2747
- // "trunk",
2748
- // "primary"
2749
- // ],
2750
- // 1.5, 1],
2751
- // 12, [
2752
- // "match",
2753
- // [
2754
- // "get",
2755
- // "class"
2756
- // ],
2757
- // [
2758
- // "motorway"
2759
- // ],
2760
- // [
2761
- // "match",
2762
- // [
2763
- // "get",
2764
- // "ramp"
2765
- // ],
2766
- // 1, 1, 4],
2767
- // [
2768
- // "trunk"
2769
- // ],
2770
- // 2.5, [
2771
- // "primary"
2772
- // ],
2773
- // 2.5, [
2774
- // "secondary",
2775
- // "tertiary"
2776
- // ],
2777
- // 1.5, [
2778
- // "minor",
2779
- // "service",
2780
- // "track"
2781
- // ],
2782
- // 0, 1],
2783
- // 14, [
2784
- // "match",
2785
- // [
2786
- // "get",
2787
- // "class"
2788
- // ],
2789
- // [
2790
- // "motorway"
2791
- // ],
2792
- // [
2793
- // "match",
2794
- // [
2795
- // "get",
2796
- // "ramp"
2797
- // ],
2798
- // 1, 5, 6],
2799
- // [
2800
- // "trunk"
2801
- // ],
2802
- // 3, [
2803
- // "primary"
2804
- // ],
2805
- // 5, [
2806
- // "secondary"
2807
- // ],
2808
- // 4, [
2809
- // "tertiary"
2810
- // ],
2811
- // 3, [
2812
- // "minor",
2813
- // "service",
2814
- // "track"
2815
- // ],
2816
- // 2, 2],
2817
- // 16, [
2818
- // "match",
2819
- // [
2820
- // "get",
2821
- // "class"
2822
- // ],
2823
- // [
2824
- // "motorway",
2825
- // "trunk",
2826
- // "primary"
2827
- // ],
2828
- // 8, [
2829
- // "secondary"
2830
- // ],
2831
- // 7, [
2832
- // "tertiary"
2833
- // ],
2834
- // 6, [
2835
- // "minor",
2836
- // "service",
2837
- // "track"
2838
- // ],
2839
- // 4, 4],
2840
- // 20, [
2841
- // "match",
2842
- // [
2843
- // "get",
2844
- // "class"
2845
- // ],
2846
- // [
2847
- // "motorway",
2848
- // "trunk",
2849
- // "primary"
2850
- // ],
2851
- // 24, [
2852
- // "secondary"
2853
- // ],
2854
- // 24, [
2855
- // "tertiary"
2856
- // ],
2857
- // 24, [
2858
- // "minor",
2859
- // "service",
2860
- // "track"
2861
- // ],
2862
- // 16, 16]
2863
- // ]
2864
- // },
2865
- // "metadata": {
2866
-
2867
- // },
2868
- // "filter": [
2869
- // "all",
2870
- // [
2871
- // "!=",
2872
- // "brunnel",
2873
- // "tunnel"
2874
- // ],
2875
- // [
2876
- // "!in",
2877
- // "class",
2878
- // "ferry",
2879
- // "rail",
2880
- // "transit",
2881
- // "pier",
2882
- // "bridge",
2883
- // "path",
2884
- // "aerialway",
2885
- // "motorway_construction",
2886
- // "trunk_construction",
2887
- // "primary_construction",
2888
- // "secondary_construction",
2889
- // "tertiary_construction",
2890
- // "minor_construction",
2891
- // "service_construction",
2892
- // "track_construction"
2893
- // ]
2894
- // ]
2895
- // },
2896
- // {
2897
- // "id": "Path outline",
2898
- // "type": "line",
2899
- // "source": "maptiler_planet",
2900
- // "source-layer": "transportation",
2901
- // "minzoom": 16,
2902
- // "layout": {
2903
- // "line-cap": "round",
2904
- // "line-join": "round",
2905
- // "visibility": "visible"
2906
- // },
2907
- // "paint": {
2908
- // "line-blur": {
2909
- // "stops": [
2910
- // [16, 1],
2911
- // [22, 2]
2912
- // ]
2913
- // },
2914
- // "line-color": "hsl(0, 0%, 100%)",
2915
- // "line-opacity": {
2916
- // "stops": [
2917
- // [15, 0],
2918
- // [22, 0.5]
2919
- // ]
2920
- // },
2921
- // "line-width": [
2922
- // "interpolate",
2923
- // [
2924
- // "linear"
2925
- // ],
2926
- // [
2927
- // "zoom"
2928
- // ],
2929
- // 15, 1.5, 16, 2, 18, 6, 22, 12]
2930
- // },
2931
- // "filter": [
2932
- // "all",
2933
- // [
2934
- // "in",
2935
- // "class",
2936
- // "path",
2937
- // "track"
2938
- // ],
2939
- // [
2940
- // "!has",
2941
- // "brunnel"
2942
- // ]
2943
- // ]
2944
- // },
2945
- // {
2946
- // "id": "Path minor",
2947
- // "type": "line",
2948
- // "source": "maptiler_planet",
2949
- // "source-layer": "transportation",
2950
- // "minzoom": 14,
2951
- // "layout": {
2952
- // "line-cap": "round",
2953
- // "line-join": "round",
2954
- // "visibility": "visible"
2955
- // },
2956
- // "paint": {
2957
- // "line-color": "hsl(0, 0%, 80%)",
2958
- // "line-dasharray": [0.5, 2],
2959
- // "line-opacity": 1,
2960
- // "line-width": [
2961
- // "interpolate",
2962
- // [
2963
- // "linear"
2964
- // ],
2965
- // [
2966
- // "zoom"
2967
- // ],
2968
- // 14, 0.7, 16, 0.8, 18, 1, 22, 2]
2969
- // },
2970
- // "filter": [
2971
- // "all",
2972
- // [
2973
- // "in",
2974
- // "class",
2975
- // "path_pedestrian"
2976
- // ],
2977
- // [
2978
- // "!has",
2979
- // "brunnel"
2980
- // ]
2981
- // ]
2982
- // },
2983
- // {
2984
- // "id": "Path",
2985
- // "type": "line",
2986
- // "source": "maptiler_planet",
2987
- // "source-layer": "transportation",
2988
- // "minzoom": 14,
2989
- // "layout": {
2990
- // "line-cap": "round",
2991
- // "line-join": "round",
2992
- // "visibility": "visible"
2993
- // },
2994
- // "paint": {
2995
- // "line-color": "hsl(0, 0%, 80%)",
2996
- // "line-dasharray": [0.5, 2],
2997
- // "line-opacity": 1,
2998
- // "line-width": [
2999
- // "interpolate",
3000
- // [
3001
- // "linear"
3002
- // ],
3003
- // [
3004
- // "zoom"
3005
- // ],
3006
- // 14, 0.7, 16, 0.8, 18, 1, 22, 2]
3007
- // },
3008
- // "filter": [
3009
- // "all",
3010
- // [
3011
- // "in",
3012
- // "class",
3013
- // "path",
3014
- // "track"
3015
- // ],
3016
- // [
3017
- // "!has",
3018
- // "brunnel"
3019
- // ]
3020
- // ]
3021
- // },
3022
- // {
3023
- // "id": "Railway",
3024
- // "type": "line",
3025
- // "source": "maptiler_planet",
3026
- // "source-layer": "transportation",
3027
- // "minzoom": 10,
3028
- // "layout": {
3029
- // "line-join": "round",
3030
- // "visibility": "visible"
3031
- // },
3032
- // "paint": {
3033
- // "line-color": "hsl(0, 0%, 80%)",
3034
- // "line-width": {
3035
- // "base": 1.3,
3036
- // "stops": [
3037
- // [13, 0.5],
3038
- // [14, 1],
3039
- // [15, 1],
3040
- // [16, 3],
3041
- // [21, 7]
3042
- // ]
3043
- // }
3044
- // },
3045
- // "filter": [
3046
- // "all",
3047
- // [
3048
- // "==",
3049
- // "class",
3050
- // "rail"
3051
- // ],
3052
- // [
3053
- // "!=",
3054
- // "brunnel",
3055
- // "tunnel"
3056
- // ]
3057
- // ]
3058
- // },
3059
- // {
3060
- // "id": "Railway dash",
3061
- // "type": "line",
3062
- // "source": "maptiler_planet",
3063
- // "source-layer": "transportation",
3064
- // "minzoom": 15,
3065
- // "layout": {
3066
- // "line-join": "round",
3067
- // "visibility": "visible"
3068
- // },
3069
- // "paint": {
3070
- // "line-color": "hsl(0, 0%, 100%)",
3071
- // "line-dasharray": [2, 2],
3072
- // "line-width": {
3073
- // "base": 1.3,
3074
- // "stops": [
3075
- // [15, 0.5],
3076
- // [16, 1],
3077
- // [20, 5]
3078
- // ]
3079
- // }
3080
- // },
3081
- // "filter": [
3082
- // "all",
3083
- // [
3084
- // "==",
3085
- // "class",
3086
- // "rail"
3087
- // ],
3088
- // [
3089
- // "!=",
3090
- // "brunnel",
3091
- // "tunnel"
3092
- // ]
3093
- // ]
3094
- // },
3095
- // {
3096
- // "id": "Building",
3097
- // "type": "fill",
3098
- // "source": "maptiler_planet",
3099
- // "source-layer": "building",
3100
- // "layout": {
3101
- // "visibility": "visible"
3102
- // },
3103
- // "paint": {
3104
- // "fill-antialias": true,
3105
- // "fill-color": {
3106
- // "stops": [
3107
- // [13, "hsl(0,0%,92%)"
3108
- // ],
3109
- // [16, "hsl(0,0%,85%)"
3110
- // ]
3111
- // ]
3112
- // }
3113
- // }
3114
- // },
3115
- // {
3116
- // "id": "Building top",
3117
- // "type": "fill",
3118
- // "source": "maptiler_planet",
3119
- // "source-layer": "building",
3120
- // "layout": {
3121
- // "visibility": "visible"
3122
- // },
3123
- // "paint": {
3124
- // "fill-color": "hsl(0, 0%, 92%)",
3125
- // "fill-opacity": {
3126
- // "base": 1,
3127
- // "stops": [
3128
- // [13, 0],
3129
- // [16, 1]
3130
- // ]
3131
- // },
3132
- // "fill-outline-color": {
3133
- // "stops": [
3134
- // [12, "hsl(0, 0%, 92%)"
3135
- // ],
3136
- // [14, "hsl(0, 0%, 92%)"
3137
- // ],
3138
- // [18, "hsl(0,0%,76%)"
3139
- // ]
3140
- // ]
3141
- // },
3142
- // "fill-translate": {
3143
- // "base": 1,
3144
- // "stops": [
3145
- // [14, [0, 0]
3146
- // ],
3147
- // [16, [-2, -2]
3148
- // ]
3149
- // ]
3150
- // }
3151
- // }
3152
- // },
3153
- // {
3154
- // "id": "Other border",
3155
- // "type": "line",
3156
- // "source": "maptiler_planet",
3157
- // "source-layer": "boundary",
3158
- // "minzoom": 5,
3159
- // "maxzoom": 8,
3160
- // "layout": {
3161
- // "visibility": "visible"
3162
- // },
3163
- // "paint": {
3164
- // "line-color": "hsl(356, 32%, 83%)",
3165
- // "line-opacity": 1,
3166
- // "line-width": [
3167
- // "interpolate",
3168
- // [
3169
- // "linear",
3170
- // 1],
3171
- // [
3172
- // "zoom"
3173
- // ],
3174
- // 3, [
3175
- // "case",
3176
- // [
3177
- // "\u003C=",
3178
- // [
3179
- // "get",
3180
- // "admin_level"
3181
- // ],
3182
- // 6],
3183
- // 0.5, 0],
3184
- // 4, [
3185
- // "case",
3186
- // [
3187
- // "\u003C=",
3188
- // [
3189
- // "get",
3190
- // "admin_level"
3191
- // ],
3192
- // 6],
3193
- // 0.75, 0],
3194
- // 8, [
3195
- // "case",
3196
- // [
3197
- // "\u003C=",
3198
- // [
3199
- // "get",
3200
- // "admin_level"
3201
- // ],
3202
- // 6],
3203
- // 1.1, 0],
3204
- // 12, [
3205
- // "case",
3206
- // [
3207
- // "\u003C=",
3208
- // [
3209
- // "get",
3210
- // "admin_level"
3211
- // ],
3212
- // 6],
3213
- // 2, 1.5],
3214
- // 16, [
3215
- // "case",
3216
- // [
3217
- // "\u003C=",
3218
- // [
3219
- // "get",
3220
- // "admin_level"
3221
- // ],
3222
- // 6],
3223
- // 3, 2]
3224
- // ]
3225
- // },
3226
- // "filter": [
3227
- // "all",
3228
- // [
3229
- // "in",
3230
- // "admin_level",
3231
- // 3, 4, 5, 6, 7, 8, 9, 10],
3232
- // [
3233
- // "==",
3234
- // "maritime",
3235
- // 0]
3236
- // ]
3237
- // },
3238
- {
3239
- "id": "Other border dash",
3240
- "type": "line",
3241
- "source": "maptiler_planet",
3242
- "source-layer": "boundary",
3243
- "minzoom": 8,
3244
- "layout": {
3245
- "visibility": "visible"
3246
- },
3247
- "paint": {
3248
- "line-color": "hsl(356, 32%, 83%)",
3249
- "line-dasharray": {
3250
- "stops": [[8, [3, 1]], [12, [2, 2, 6, 2]]]
3251
- },
3252
- "line-opacity": 1,
3253
- "line-width": ["interpolate", ["linear", 1], ["zoom"], 3, ["case", ["<=", ["get", "admin_level"], 6], 0.5, 0], 4, ["case", ["<=", ["get", "admin_level"], 6], 0.75, 0], 8, ["case", ["<=", ["get", "admin_level"], 6], 1.25, 0], 12, ["case", ["<=", ["get", "admin_level"], 6], 2, 1.25], 16, ["case", ["<=", ["get", "admin_level"], 6], 3, 2], 22, ["case", ["<=", ["get", "admin_level"], 6], 6, 4]]
3254
- },
3255
- "filter": ["all", ["in", "admin_level", 3, 4, 5, 6, 7, 8, 9, 10], ["==", "maritime", 0]]
3256
- },
3257
- // {
3258
- // "id": "Disputed border",
3259
- // "type": "line",
3260
- // "source": "maptiler_planet",
3261
- // "source-layer": "boundary",
3262
- // "minzoom": 0,
3263
- // "layout": {
3264
- // "line-cap": "round",
3265
- // "line-join": "round",
3266
- // "visibility": "visible"
3267
- // },
3268
- // "paint": {
3269
- // "line-color": "hsl(354, 33%, 88%)",
3270
- // "line-dasharray": [2, 3],
3271
- // "line-opacity": 1,
3272
- // "line-width": [
3273
- // "interpolate",
3274
- // [
3275
- // "linear"
3276
- // ],
3277
- // [
3278
- // "zoom"
3279
- // ],
3280
- // 1, 0.75, 3, 1, 6, 1.5, 12, 5]
3281
- // },
3282
- // "filter": [
3283
- // "all",
3284
- // [
3285
- // "==",
3286
- // "admin_level",
3287
- // 2],
3288
- // [
3289
- // "==",
3290
- // "maritime",
3291
- // 0],
3292
- // [
3293
- // "==",
3294
- // "disputed",
3295
- // 1]
3296
- // ]
3297
- // },
3298
- // {
3299
- // "id": "Country border",
3300
- // "type": "line",
3301
- // "source": "maptiler_planet",
3302
- // "source-layer": "boundary",
3303
- // "minzoom": 0,
3304
- // "layout": {
3305
- // "line-cap": "round",
3306
- // "line-join": "round",
3307
- // "visibility": "visible"
3308
- // },
3309
- // "paint": {
3310
- // "line-color": [
3311
- // "interpolate",
3312
- // [
3313
- // "linear"
3314
- // ],
3315
- // [
3316
- // "zoom"
3317
- // ],
3318
- // 4, "hsl(354, 33%, 88%)",
3319
- // 6, "hsl(356,23%,84%)"
3320
- // ],
3321
- // "line-opacity": 1,
3322
- // "line-width": [
3323
- // "interpolate",
3324
- // [
3325
- // "linear"
3326
- // ],
3327
- // [
3328
- // "zoom"
3329
- // ],
3330
- // 1, 0.75, 3, 1.5, 7, 2.2, 12, 3.5, 22, 8]
3331
- // },
3332
- // "filter": [
3333
- // "all",
3334
- // [
3335
- // "==",
3336
- // "admin_level",
3337
- // 2],
3338
- // [
3339
- // "==",
3340
- // "maritime",
3341
- // 0],
3342
- // [
3343
- // "==",
3344
- // "disputed",
3345
- // 0]
3346
- // ]
3347
- // },
3348
- // {
3349
- // "id": "Ocean labels",
3350
- // "type": "symbol",
3351
- // "source": "maptiler_planet",
3352
- // "source-layer": "water_name",
3353
- // "minzoom": 0,
3354
- // "maxzoom": 4,
3355
- // "layout": {
3356
- // "symbol-placement": "point",
3357
- // "text-allow-overlap": false,
3358
- // "text-field": "{name:en}",
3359
- // "text-font": [
3360
- // "Metropolis Semi Bold Italic",
3361
- // "Noto Sans Bold"
3362
- // ],
3363
- // "text-ignore-placement": false,
3364
- // "text-letter-spacing": 0.1,
3365
- // "text-line-height": 1.2,
3366
- // "text-max-width": 6,
3367
- // "text-padding": 2,
3368
- // "text-pitch-alignment": "auto",
3369
- // "text-rotation-alignment": "auto",
3370
- // "text-size": [
3371
- // "interpolate",
3372
- // [
3373
- // "linear",
3374
- // 1],
3375
- // [
3376
- // "zoom"
3377
- // ],
3378
- // 1, 11, 4, 14],
3379
- // "text-transform": "uppercase",
3380
- // "visibility": "visible"
3381
- // },
3382
- // "paint": {
3383
- // "text-color": "hsl(190,9%,63%)",
3384
- // "text-opacity": [
3385
- // "step",
3386
- // [
3387
- // "zoom"
3388
- // ],
3389
- // 0, 1, [
3390
- // "match",
3391
- // [
3392
- // "get",
3393
- // "class"
3394
- // ],
3395
- // [
3396
- // "ocean"
3397
- // ],
3398
- // 1, 0],
3399
- // 4, 1]
3400
- // },
3401
- // "filter": [
3402
- // "all",
3403
- // [
3404
- // "==",
3405
- // "class",
3406
- // "ocean"
3407
- // ],
3408
- // [
3409
- // "has",
3410
- // "name"
3411
- // ]
3412
- // ]
3413
- // },
3414
- // {
3415
- // "id": "Sea labels",
3416
- // "type": "symbol",
3417
- // "source": "maptiler_planet",
3418
- // "source-layer": "water_name",
3419
- // "minzoom": 3,
3420
- // "layout": {
3421
- // "symbol-placement": "point",
3422
- // "text-allow-overlap": false,
3423
- // "text-field": [
3424
- // "coalesce",
3425
- // [
3426
- // "get",
3427
- // "name:en"
3428
- // ],
3429
- // [
3430
- // "get",
3431
- // "name"
3432
- // ]
3433
- // ],
3434
- // "text-font": [
3435
- // "Metropolis Semi Bold Italic",
3436
- // "Noto Sans Bold"
3437
- // ],
3438
- // "text-ignore-placement": false,
3439
- // "text-letter-spacing": 0.1,
3440
- // "text-line-height": 1.2,
3441
- // "text-max-width": 6,
3442
- // "text-padding": 2,
3443
- // "text-pitch-alignment": "auto",
3444
- // "text-rotation-alignment": "auto",
3445
- // "text-size": [
3446
- // "interpolate",
3447
- // [
3448
- // "linear",
3449
- // 1],
3450
- // [
3451
- // "zoom"
3452
- // ],
3453
- // 3, 9, 9, 16, 14, 20],
3454
- // "text-transform": "uppercase",
3455
- // "visibility": "visible"
3456
- // },
3457
- // "paint": {
3458
- // "text-color": "hsl(190,9%,63%)",
3459
- // "text-opacity": 1
3460
- // },
3461
- // "filter": [
3462
- // "all",
3463
- // [
3464
- // "==",
3465
- // "class",
3466
- // "sea"
3467
- // ],
3468
- // [
3469
- // "has",
3470
- // "name"
3471
- // ]
3472
- // ]
3473
- // },
3474
- // {
3475
- // "id": "Lakeline labels",
3476
- // "type": "symbol",
3477
- // "source": "maptiler_planet",
3478
- // "source-layer": "water_name",
3479
- // "layout": {
3480
- // "symbol-placement": "line",
3481
- // "symbol-spacing": 350,
3482
- // "text-field": [
3483
- // "coalesce",
3484
- // [
3485
- // "get",
3486
- // "name:en"
3487
- // ],
3488
- // [
3489
- // "get",
3490
- // "name"
3491
- // ]
3492
- // ],
3493
- // "text-font": [
3494
- // "Metropolis Semi Bold Italic",
3495
- // "Noto Sans Bold"
3496
- // ],
3497
- // "text-line-height": 1.2,
3498
- // "text-pitch-alignment": "auto",
3499
- // "text-rotation-alignment": "auto",
3500
- // "text-size": [
3501
- // "interpolate",
3502
- // [
3503
- // "linear"
3504
- // ],
3505
- // [
3506
- // "zoom"
3507
- // ],
3508
- // 9, 12, 14, 16, 18, 20],
3509
- // "visibility": "visible"
3510
- // },
3511
- // "paint": {
3512
- // "text-color": "hsl(190,9%,63%)"
3513
- // },
3514
- // "filter": [
3515
- // "has",
3516
- // "name"
3517
- // ]
3518
- // },
3519
- {
3520
- "id": "Road labels",
3521
- "type": "symbol",
3522
- "source": "maptiler_planet",
3523
- "source-layer": "transportation_name",
3524
- "minzoom": 14,
3525
- "layout": {
3526
- "symbol-avoid-edges": false,
3527
- "symbol-placement": "line",
3528
- "symbol-spacing": {
3529
- "stops": [[6, 200], [16, 250], [20, 250], [22, 600]]
3530
- },
3531
- "text-field": ["coalesce", ["get", "name:en"], ["get", "name"]],
3532
- "text-font": ["Metropolis Semi Bold", "Noto Sans Bold"],
3533
- "text-justify": "center",
3534
- "text-letter-spacing": ["interpolate", ["linear", 1], ["zoom"], 13, 0, 16, ["match", ["get", "class"], "primary", 0.2, 0.1]],
3535
- "text-pitch-alignment": "auto",
3536
- "text-rotation-alignment": "auto",
3537
- "text-size": ["interpolate", ["linear"], ["zoom"], 14, ["match", ["get", "class"], ["primary"], 10, 7], 15, ["match", ["get", "class"], ["primary"], 10, ["secondary", "tertiary"], 9, 7], 16, ["match", ["get", "class"], ["primary", "secondary", "tertiary"], 11, 10], 18, ["match", ["get", "class"], ["primary", "secondary", "tertiary"], 13, 12]],
3538
- "visibility": "visible"
3539
- },
3540
- "paint": {
3541
- "text-color": "hsl(204, 11%, 47%)",
3542
- "text-halo-blur": 0,
3543
- "text-halo-color": "hsl(0,0%,100%)",
3544
- "text-halo-width": 1.5,
3545
- "text-opacity": ["step", ["zoom"], 1, 14, ["match", ["get", "class"], ["primary"], 1, 0], 15, ["match", ["get", "class"], ["primary", "secondary", "tertiary"], 1, 0], 16, 1]
3546
- },
3547
- "filter": ["in", "class", "primary", "secondary", "tertiary", "minor", "service"]
3548
- }, {
3549
- "id": "Place labels",
3550
- "type": "symbol",
3551
- "source": "maptiler_planet",
3552
- "source-layer": "place",
3553
- "minzoom": 13,
3554
- "layout": {
3555
- "symbol-sort-key": ["to-number", ["get", "rank"]],
3556
- "text-anchor": "center",
3557
- "text-field": "{name}",
3558
- "text-font": ["Metropolis Semi Bold", "Noto Sans Bold"],
3559
- "text-keep-upright": true,
3560
- "text-max-width": 10,
3561
- "text-offset": [0.2, 0.2],
3562
- "text-size": ["interpolate", ["linear", 1], ["zoom"], 12, 10, 13, ["match", ["get", "class"], ["suburb", "neighborhood", "neighbourhood"], 12, 11], 14, ["match", ["get", "class"], ["suburb", "neighborhood", "neighbourhood"], 12, 11], 16, ["match", ["get", "class"], ["suburb", "neighborhood", "neighbourhood"], 14, 13]],
3563
- "text-transform": "none",
3564
- "visibility": "visible"
3565
- },
3566
- "paint": {
3567
- "text-color": "hsl(204, 11%, 47%)",
3568
- "text-halo-blur": 0,
3569
- "text-halo-color": "hsl(0, 0%, 100%)",
3570
- "text-halo-width": 1.5,
3571
- "text-opacity": ["step", ["zoom"], 0, 13, ["match", ["get", "class"], ["suburb", "neighborhood", "neighbourhood"], 1, 0], 14, 1]
3572
- },
3573
- "filter": ["!in", "class", "city", "continent", "country", "province", "state", "town", "village", "place"]
3574
- }, {
3575
- "id": "Village labels",
3576
- "type": "symbol",
3577
- "source": "maptiler_planet",
3578
- "source-layer": "place",
3579
- "minzoom": 12,
3580
- "layout": {
3581
- "symbol-sort-key": ["to-number", ["get", "rank"]],
3582
- "text-anchor": "center",
3583
- "text-field": "{name}",
3584
- "text-font": ["Metropolis Semi Bold", "Noto Sans Bold"],
3585
- "text-keep-upright": true,
3586
- "text-max-width": 10,
3587
- "text-offset": [0.2, 0.2],
3588
- "text-size": ["interpolate", ["linear", 1], ["zoom"], 12, 10, 13, 12, 14, 14, 16, 13],
3589
- "text-transform": "none",
3590
- "visibility": "visible"
3591
- },
3592
- "paint": {
3593
- "text-color": "hsl(204, 11%, 47%)",
3594
- "text-halo-blur": 0,
3595
- "text-halo-color": "hsl(0, 0%, 100%)",
3596
- "text-halo-width": 1.5,
3597
- "text-opacity": 1
3598
- },
3599
- "filter": ["==", "class", "village"]
3600
- },
3601
- // {
3602
- // "id": "Town labels",
3603
- // "type": "symbol",
3604
- // "source": "maptiler_planet",
3605
- // "source-layer": "place",
3606
- // "minzoom": 11,
3607
- // "maxzoom": 16,
3608
- // "layout": {
3609
- // "symbol-sort-key": [
3610
- // "to-number",
3611
- // [
3612
- // "get",
3613
- // "rank"
3614
- // ]
3615
- // ],
3616
- // "text-anchor": "center",
3617
- // "text-field": [
3618
- // "coalesce",
3619
- // [
3620
- // "get",
3621
- // "name:en"
3622
- // ],
3623
- // [
3624
- // "get",
3625
- // "name"
3626
- // ]
3627
- // ],
3628
- // "text-font": [
3629
- // "Metropolis Semi Bold",
3630
- // "Noto Sans Bold"
3631
- // ],
3632
- // "text-keep-upright": true,
3633
- // "text-max-width": 10,
3634
- // "text-offset": [0.2, 0.2],
3635
- // "text-size": [
3636
- // "interpolate",
3637
- // [
3638
- // "linear"
3639
- // ],
3640
- // [
3641
- // "zoom"
3642
- // ],
3643
- // 10, 11, 13, 14, 14, 15],
3644
- // "text-transform": "none",
3645
- // "visibility": "visible"
3646
- // },
3647
- // "paint": {
3648
- // "text-color": "hsl(204, 11%, 47%)",
3649
- // "text-halo-blur": 0,
3650
- // "text-halo-color": "hsl(0,0%,100%)",
3651
- // "text-halo-width": 1.5
3652
- // },
3653
- // "filter": [
3654
- // "==",
3655
- // "class",
3656
- // "town"
3657
- // ]
3658
- // },
3659
- // {
3660
- // "id": "State labels",
3661
- // "type": "symbol",
3662
- // "source": "maptiler_planet",
3663
- // "source-layer": "place",
3664
- // "minzoom": 5,
3665
- // "maxzoom": 8,
3666
- // "layout": {
3667
- // "symbol-sort-key": [
3668
- // "to-number",
3669
- // [
3670
- // "get",
3671
- // "rank"
3672
- // ]
3673
- // ],
3674
- // "text-allow-overlap": false,
3675
- // "text-field": [
3676
- // "coalesce",
3677
- // [
3678
- // "get",
3679
- // "name:en"
3680
- // ],
3681
- // [
3682
- // "get",
3683
- // "name"
3684
- // ]
3685
- // ],
3686
- // "text-font": [
3687
- // "Metropolis Semi Bold",
3688
- // "Noto Sans Bold"
3689
- // ],
3690
- // "text-max-width": 9,
3691
- // "text-size": [
3692
- // "interpolate",
3693
- // [
3694
- // "linear",
3695
- // 1],
3696
- // [
3697
- // "zoom"
3698
- // ],
3699
- // 5, [
3700
- // "match",
3701
- // [
3702
- // "get",
3703
- // "rank"
3704
- // ],
3705
- // 1, 10, 10],
3706
- // 11, [
3707
- // "match",
3708
- // [
3709
- // "get",
3710
- // "rank"
3711
- // ],
3712
- // 1, 16, 16]
3713
- // ],
3714
- // "text-transform": "uppercase",
3715
- // "visibility": "visible"
3716
- // },
3717
- // "paint": {
3718
- // "icon-opacity": 0.75,
3719
- // "text-color": "hsl(204, 11%, 47%)",
3720
- // "text-halo-blur": 0,
3721
- // "text-halo-color": "hsl(30,25%,98%)",
3722
- // "text-halo-width": 1.5,
3723
- // "text-opacity": 0.75
3724
- // },
3725
- // "filter": [
3726
- // "all",
3727
- // [
3728
- // "==",
3729
- // "class",
3730
- // "state"
3731
- // ],
3732
- // [
3733
- // "==",
3734
- // "rank",
3735
- // 1]
3736
- // ]
3737
- // },
3738
- {
3739
- "id": "City labels",
3740
- "type": "symbol",
3741
- "source": "maptiler_planet",
3742
- "source-layer": "place",
3743
- "minzoom": 5,
3744
- "maxzoom": 14,
3745
- "layout": {
3746
- "symbol-sort-key": ["to-number", ["get", "rank"]],
3747
- "text-anchor": "center",
3748
- "text-field": "{name:en}",
3749
- "text-font": ["Metropolis Semi Bold", "Noto Sans Bold"],
3750
- "text-keep-upright": false,
3751
- "text-max-width": 10,
3752
- "text-offset": [0.2, 0.2],
3753
- "text-size": ["interpolate", ["linear", 1], ["zoom"], 5, ["case", [">=", ["get", "rank"], 6], 11, 12], 9, ["case", [">=", ["get", "rank"], 6], 12, 14], 13, ["case", [">=", ["get", "rank"], 6], 16, 18], 14, ["case", [">=", ["get", "rank"], 6], 20, 22]],
3754
- "text-transform": "none",
3755
- "visibility": "visible"
3756
- },
3757
- "paint": {
3758
- "text-color": "hsl(204, 11%, 47%)",
3759
- "text-halo-blur": 0,
3760
- "text-halo-color": "hsl(0,0%,100%)",
3761
- "text-halo-width": 1.5
3762
- },
3763
- "filter": ["all", ["==", "class", "city"], ["has", "rank"]]
3764
- }
3765
- // {
3766
- // "id": "Country labels",
3767
- // "type": "symbol",
3768
- // "source": "maptiler_planet",
3769
- // "source-layer": "place",
3770
- // "minzoom": 2,
3771
- // "maxzoom": 10,
3772
- // "layout": {
3773
- // "symbol-sort-key": [
3774
- // "to-number",
3775
- // [
3776
- // "get",
3777
- // "rank"
3778
- // ]
3779
- // ],
3780
- // "text-field": "{name:en}",
3781
- // "text-font": [
3782
- // "Metropolis Semi Bold",
3783
- // "Noto Sans Bold"
3784
- // ],
3785
- // "text-size": [
3786
- // "interpolate",
3787
- // [
3788
- // "linear",
3789
- // 1],
3790
- // [
3791
- // "zoom"
3792
- // ],
3793
- // 2, [
3794
- // "case",
3795
- // [
3796
- // "\u003C=",
3797
- // [
3798
- // "get",
3799
- // "rank"
3800
- // ],
3801
- // 2],
3802
- // 11, 0],
3803
- // 3, [
3804
- // "case",
3805
- // [
3806
- // "\u003C=",
3807
- // [
3808
- // "get",
3809
- // "rank"
3810
- // ],
3811
- // 2],
3812
- // 11, 9],
3813
- // 4, [
3814
- // "case",
3815
- // [
3816
- // "\u003C=",
3817
- // [
3818
- // "get",
3819
- // "rank"
3820
- // ],
3821
- // 2],
3822
- // 12, 10],
3823
- // 5, [
3824
- // "case",
3825
- // [
3826
- // "\u003C=",
3827
- // [
3828
- // "get",
3829
- // "rank"
3830
- // ],
3831
- // 2],
3832
- // 13, 11],
3833
- // 6, [
3834
- // "case",
3835
- // [
3836
- // "\u003C=",
3837
- // [
3838
- // "get",
3839
- // "rank"
3840
- // ],
3841
- // 2],
3842
- // 14, 12],
3843
- // 7, [
3844
- // "case",
3845
- // [
3846
- // "\u003C=",
3847
- // [
3848
- // "get",
3849
- // "rank"
3850
- // ],
3851
- // 2],
3852
- // 14, 13]
3853
- // ],
3854
- // "text-transform": "uppercase",
3855
- // "visibility": "visible"
3856
- // },
3857
- // "paint": {
3858
- // "text-color": "hsl(204, 11%, 47%)",
3859
- // "text-halo-blur": 0,
3860
- // "text-halo-color": "hsl(0,0%,100%)",
3861
- // "text-halo-width": 1.5,
3862
- // "text-opacity": [
3863
- // "step",
3864
- // [
3865
- // "zoom"
3866
- // ],
3867
- // 1, 2, [
3868
- // "case",
3869
- // [
3870
- // "\u003C=",
3871
- // [
3872
- // "get",
3873
- // "rank"
3874
- // ],
3875
- // 2],
3876
- // 1, 0],
3877
- // 3, 1]
3878
- // },
3879
- // "filter": [
3880
- // "all",
3881
- // [
3882
- // "==",
3883
- // "class",
3884
- // "country"
3885
- // ],
3886
- // [
3887
- // "has",
3888
- // "iso_a2"
3889
- // ],
3890
- // [
3891
- // "!=",
3892
- // "iso_a2",
3893
- // "VA"
3894
- // ]
3895
- // ]
3896
- // },
3897
- // {
3898
- // "id": "Continent labels",
3899
- // "type": "symbol",
3900
- // "source": "maptiler_planet",
3901
- // "source-layer": "place",
3902
- // "minzoom": 0,
3903
- // "maxzoom": 2,
3904
- // "layout": {
3905
- // "text-field": "{name:en}",
3906
- // "text-font": [
3907
- // "Metropolis Semi Bold",
3908
- // "Noto Sans Bold"
3909
- // ],
3910
- // "text-justify": "center",
3911
- // "text-keep-upright": false,
3912
- // "text-letter-spacing": 0.1,
3913
- // "text-max-width": 9,
3914
- // "text-size": 13,
3915
- // "text-transform": "uppercase",
3916
- // "visibility": "visible"
3917
- // },
3918
- // "paint": {
3919
- // "text-color": "hsl(204, 11%, 47%)",
3920
- // "text-halo-blur": 0,
3921
- // "text-halo-color": "hsl(0,0%,100%)",
3922
- // "text-halo-width": 1.5
3923
- // },
3924
- // "filter": [
3925
- // "==",
3926
- // "class",
3927
- // "continent"
3928
- // ]
3929
- // }
3930
- ];
3931
-
3932
1667
  var DEFAULT_NULL_COLOR = '#CCCCCC';
3933
1668
  function _reverseByKScheme(scheme, defaultColor) {
3934
1669
  if (defaultColor === void 0) {
@@ -4029,7 +1764,7 @@ var D3_SEQUENTIAL = {
4029
1764
  schemeYlOrBr: schemeYlOrBr,
4030
1765
  schemeYlOrRd: schemeYlOrRd
4031
1766
  };
4032
- var COLOR_SCHEMES = __assign(__assign(__assign(__assign(__assign({}, _objMap(D3_CATEGORICAL, function (_a) {
1767
+ __assign(__assign(__assign(__assign(__assign({}, _objMap(D3_CATEGORICAL, function (_a) {
4033
1768
  var id = _a[0],
4034
1769
  scheme = _a[1];
4035
1770
  return [id, _categoricalScheme(scheme)];
@@ -4050,96 +1785,6 @@ var COLOR_SCHEMES = __assign(__assign(__assign(__assign(__assign({}, _objMap(D3_
4050
1785
  scheme = _a[1];
4051
1786
  return ["-".concat(id), _reverseByKScheme(scheme)];
4052
1787
  }));
4053
- function colorScheme(path) {
4054
- var scheme = get(COLOR_SCHEMES, path);
4055
- if (!scheme) {
4056
- throw new Error("Could not find scheme at ".concat(path));
4057
- }
4058
- return scheme;
4059
- }
4060
-
4061
- //
4062
- // Formats the filter to be a compatible searchParams for fetching
4063
- // data at METADATA_API
4064
- //
4065
- function fmtMetadataApiFilterExp(filter) {
4066
- var COMPARATOR_DICT = {
4067
- "in": 'in',
4068
- '==': 'eq',
4069
- '>': 'gt',
4070
- '<': 'lt',
4071
- '>=': 'gte',
4072
- '<=': 'lte'
4073
- };
4074
- return Object.fromEntries(Object.entries(filter).map(function (_ref) {
4075
- var _ref2 = _slicedToArray(_ref, 2),
4076
- key = _ref2[0],
4077
- _ref2$ = _slicedToArray(_ref2[1], 2),
4078
- comparator = _ref2$[0],
4079
- targetValue = _ref2$[1];
4080
- var cmp = COMPARATOR_DICT[comparator];
4081
- switch (cmp) {
4082
- case 'in':
4083
- {
4084
- return [key, "".concat(cmp, ".(").concat(targetValue.join(','), ")")];
4085
- }
4086
- default:
4087
- {
4088
- return [key, "".concat(cmp, ".").concat(targetValue + '')];
4089
- }
4090
- }
4091
- }));
4092
- }
4093
-
4094
- //
4095
- // Formats filter into compatible version relative to maplibre gl
4096
- // AND
4097
- //
4098
- function fmtMaplibreGlFilterExp(filter) {
4099
- var COMPARATOR_DICT = {
4100
- "in": 'in',
4101
- '==': '==',
4102
- '>': '>',
4103
- '<': '<',
4104
- '>=': '>=',
4105
- '<=': '<='
4106
- };
4107
- return Object.entries(filter).map(function (_ref3) {
4108
- var _ref4 = _slicedToArray(_ref3, 2),
4109
- key = _ref4[0],
4110
- _ref4$ = _slicedToArray(_ref4[1], 2),
4111
- comparator = _ref4$[0],
4112
- targetValue = _ref4$[1];
4113
- var cmp = COMPARATOR_DICT[comparator];
4114
- if (!cmp) {
4115
- throw new Error("compartor \"".concat(cmp, "\" not supported"));
4116
- }
4117
- return [cmp, ['get', key], Array.isArray(targetValue) ? ['literal', targetValue] : targetValue];
4118
- });
4119
- }
4120
-
4121
- function setupVariants(viewSpec, allViewSpecs) {
4122
- var variants = [viewSpec].concat(_toConsumableArray(allViewSpecs.filter(function (otherViewSpec) {
4123
- return otherViewSpec.variant_of === viewSpec.indicator_id;
4124
- })));
4125
- var variantsById = Object.fromEntries(variants.map(function (variant) {
4126
- return [variant.indicator_id, variant];
4127
- }));
4128
- function loadVariant(id) {
4129
- var variantSpec = variantsById[id];
4130
- if (!variantSpec) {
4131
- console.warn("could not find corresponding variant spec ".concat(id));
4132
- return null;
4133
- }
4134
- var mainSpec = variantSpec.variant_of ? variantsById[variantSpec.variant_of] : null;
4135
- return mainSpec ? _objectSpread2(_objectSpread2({}, mainSpec), variantSpec) : variantSpec;
4136
- }
4137
- return {
4138
- variants: variants,
4139
- variantsById: variantsById,
4140
- loadVariant: loadVariant
4141
- };
4142
- }
4143
1788
 
4144
1789
  function setupGdal() {
4145
1790
  return _setupGdal.apply(this, arguments);
@@ -4186,75 +1831,6 @@ function _setupGdal() {
4186
1831
  }));
4187
1832
  return _setupGdal.apply(this, arguments);
4188
1833
  }
4189
- function _srcFile(src) {
4190
- if (src instanceof Blob) {
4191
- return new File([src]);
4192
- } else if (src instanceof File) {
4193
- return src;
4194
- } else if (isPlainObject(src)) {
4195
- var geoJsonBlob = new Blob([JSON.stringify(src)], {
4196
- type: 'application/geo+json'
4197
- });
4198
- var geoJsonFile = new File([geoJsonBlob], 'data.geojson', {
4199
- type: 'application/geo+json'
4200
- });
4201
- return geoJsonFile;
4202
- } else {
4203
- throw new TypeError("Unsupported src ".concat(_typeof(src)));
4204
- }
4205
- }
4206
- function ogr2ogr(_x) {
4207
- return _ogr2ogr.apply(this, arguments);
4208
- }
4209
- function _ogr2ogr() {
4210
- _ogr2ogr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref) {
4211
- var src, format, Gdal, srcFile, _yield$Gdal$open, datasets, errors, result, fileBytes, blob;
4212
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4213
- while (1) switch (_context2.prev = _context2.next) {
4214
- case 0:
4215
- src = _ref.src, format = _ref.format;
4216
- _context2.next = 3;
4217
- return setupGdal();
4218
- case 3:
4219
- Gdal = _context2.sent;
4220
- srcFile = _srcFile(src);
4221
- _context2.next = 7;
4222
- return Gdal.open(srcFile, []);
4223
- case 7:
4224
- _yield$Gdal$open = _context2.sent;
4225
- datasets = _yield$Gdal$open.datasets;
4226
- errors = _yield$Gdal$open.errors;
4227
- if (!(Array.isArray(errors) && errors.length > 0)) {
4228
- _context2.next = 12;
4229
- break;
4230
- }
4231
- throw new Error(errors.join(' | '));
4232
- case 12:
4233
- _context2.next = 14;
4234
- return Gdal.ogr2ogr(datasets[0], ['-f', format]);
4235
- case 14:
4236
- result = _context2.sent;
4237
- _context2.next = 17;
4238
- return Gdal.getFileBytes(result.real);
4239
- case 17:
4240
- fileBytes = _context2.sent;
4241
- blob = new Blob([fileBytes]); //
4242
- // https://gdal3.js.org/docs/module-f_close.html
4243
- // Close the dataset. The memory associated to the dataset will be freed.
4244
- // Datasets must be closed when you're finished with them, or the memory consumption will grow forever.
4245
- //
4246
- _context2.next = 21;
4247
- return Gdal.close(datasets[0]);
4248
- case 21:
4249
- return _context2.abrupt("return", blob);
4250
- case 22:
4251
- case "end":
4252
- return _context2.stop();
4253
- }
4254
- }, _callee2);
4255
- }));
4256
- return _ogr2ogr.apply(this, arguments);
4257
- }
4258
1834
 
4259
1835
  var worker = typeof Worker !== 'undefined' && new Worker(new URL('./GeoReDUSWorker.worker.js', import.meta.url), {
4260
1836
  type: 'module'
@@ -4335,849 +1911,12 @@ var _b = makeResolve({
4335
1911
  resolveExprAsync = _b.resolveAsync,
4336
1912
  resolveExpr = _b.resolve;
4337
1913
 
4338
- var EXTENSIONS_BY_FORMAT = {
4339
- GeoJSON: 'geojson',
4340
- GPKG: 'gpkg',
4341
- CSV: 'csv',
4342
- KML: 'kml'
4343
- };
4344
- function downloadResolver(downloadConf) {
4345
- return resolve.fn(function (context) {
4346
- return /*#__PURE__*/function () {
4347
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref) {
4348
- var dialogs, _yield$resolveExprAsy, _yield$resolveExprAsy2, geometryPropertyKey, defaultOptions, fetchData, mainVariableId, availableVariableIds, _yield$resolveExprAsy3, fileNameBase, options, variableIds;
4349
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4350
- while (1) switch (_context2.prev = _context2.next) {
4351
- case 0:
4352
- dialogs = _ref.dialogs;
4353
- _context2.next = 3;
4354
- return resolveExprAsync(downloadConf, context);
4355
- case 3:
4356
- _yield$resolveExprAsy = _context2.sent;
4357
- _yield$resolveExprAsy2 = _yield$resolveExprAsy.geometryPropertyKey;
4358
- geometryPropertyKey = _yield$resolveExprAsy2 === void 0 ? 'geom' : _yield$resolveExprAsy2;
4359
- defaultOptions = _yield$resolveExprAsy.defaultOptions;
4360
- fetchData = _yield$resolveExprAsy.fetchData;
4361
- mainVariableId = _yield$resolveExprAsy.mainVariableId;
4362
- availableVariableIds = _yield$resolveExprAsy.availableVariableIds;
4363
- _yield$resolveExprAsy3 = _yield$resolveExprAsy.fileNameBase;
4364
- fileNameBase = _yield$resolveExprAsy3 === void 0 ? mainVariableId : _yield$resolveExprAsy3;
4365
- _context2.next = 14;
4366
- return dialogs.prompt({
4367
- title: 'Baixar dados',
4368
- submit: 'Baixar',
4369
- input: {
4370
- type: 'object',
4371
- properties: {
4372
- format: {
4373
- label: 'Selecione o formato do arquivo',
4374
- type: 'radioSelect',
4375
- required: true,
4376
- options: [{
4377
- value: 'CSV',
4378
- label: 'Planilha CSV (dados tabulares separados por vírgulas)'
4379
- }, {
4380
- value: 'GPKG',
4381
- label: 'GeoPackage (banco de dados geoespacial compacto)'
4382
- }, {
4383
- value: 'GeoJSON',
4384
- label: 'GeoJSON (dados geográficos em JSON)'
4385
- }, {
4386
- value: 'KML',
4387
- label: 'KML (Keyhole Markup Language - mapas em XML)'
4388
- }]
4389
- },
4390
- variableIds: Array.isArray(availableVariableIds) && availableVariableIds.length > 0 ? {
4391
- label: 'Selecione os dados para download',
4392
- type: 'checkboxSelect',
4393
- required: true,
4394
- options: availableVariableIds.map(function (opt) {
4395
- return typeof opt === 'string' ? {
4396
- label: opt,
4397
- value: opt
4398
- } : opt;
4399
- }).sort(function (optA, optB) {
4400
- return optA.value === mainVariableId ? -1 : optB.value === mainVariableId ? 1 : optA.label <= optB.label ? -1 : 1;
4401
- })
4402
- } : null
4403
- }
4404
- },
4405
- defaultValue: defaultOptions || {
4406
- format: 'CSV',
4407
- variableIds: [mainVariableId]
4408
- }
4409
- });
4410
- case 14:
4411
- options = _context2.sent;
4412
- if (!(options === CANCELLED)) {
4413
- _context2.next = 17;
4414
- break;
4415
- }
4416
- return _context2.abrupt("return");
4417
- case 17:
4418
- variableIds = options.variableIds && options.variableIds.length > 0 ? options.variableIds : [mainVariableId]; // //
4419
- // // Automatically include geometry in case the requested format
4420
- // // is a geo format
4421
- // //
4422
- // const select = [...variableIds, geometryPropertyKey].join(',')
4423
- _context2.next = 20;
4424
- return dialogs.loading(/*#__PURE__*/function () {
4425
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref3) {
4426
- var setMessage, data, geoJsonData, blob;
4427
- return _regeneratorRuntime().wrap(function _callee$(_context) {
4428
- while (1) switch (_context.prev = _context.next) {
4429
- case 0:
4430
- setMessage = _ref3.setMessage;
4431
- setMessage('Carregando dados');
4432
-
4433
- //
4434
- // Fetch the data
4435
- //
4436
- _context.next = 4;
4437
- return fetchData({
4438
- variableIds: variableIds,
4439
- options: options
4440
- });
4441
- case 4:
4442
- data = _context.sent;
4443
- //
4444
- // Build a geoJson data object
4445
- //
4446
- geoJsonData = {
4447
- type: 'FeatureCollection',
4448
- features: data.map(function (entry) {
4449
- var geometry = entry[geometryPropertyKey];
4450
- return {
4451
- type: 'Feature',
4452
- properties: omit(entry, [geometryPropertyKey]),
4453
- geometry: geometry
4454
- };
4455
- })
4456
- };
4457
- _context.prev = 6;
4458
- setMessage('Preparando arquivo');
4459
- //
4460
- // Convert to requested format using ogr2ogr
4461
- //
4462
- _context.next = 10;
4463
- return ogr2ogr({
4464
- src: geoJsonData,
4465
- format: options.format
4466
- });
4467
- case 10:
4468
- blob = _context.sent;
4469
- saveAs(blob, "".concat(typeof fileNameBase === 'function' ? fileNameBase({
4470
- options: options
4471
- }) : fileNameBase, ".").concat(EXTENSIONS_BY_FORMAT[options.format]));
4472
- _context.next = 19;
4473
- break;
4474
- case 14:
4475
- _context.prev = 14;
4476
- _context.t0 = _context["catch"](6);
4477
- console.error(_context.t0.message);
4478
- _context.next = 19;
4479
- return dialogs.info("Ocorreu um erro ao gerar o arquivo: ".concat(_context.t0.message));
4480
- case 19:
4481
- case "end":
4482
- return _context.stop();
4483
- }
4484
- }, _callee, null, [[6, 14]]);
4485
- }));
4486
- return function (_x2) {
4487
- return _ref4.apply(this, arguments);
4488
- };
4489
- }(), 'Carregando dados');
4490
- case 20:
4491
- case "end":
4492
- return _context2.stop();
4493
- }
4494
- }, _callee2);
4495
- }));
4496
- return function (_x) {
4497
- return _ref2.apply(this, arguments);
4498
- };
4499
- }();
4500
- });
4501
- }
4502
-
4503
- function zoomSensitiveLinearSizes(_a) {
4504
- var variable = _a.variable,
4505
- minValue = _a.minValue,
4506
- maxValue = _a.maxValue,
4507
- minSize = _a.minSize,
4508
- maxSize = _a.maxSize,
4509
- _b = _a.zoomBreakpoint,
4510
- zoomBreakpoint = _b === void 0 ? 12 : _b;
4511
- var hasMinAndMaxValues =
4512
- //
4513
- // Accept minValue expressions or actual numbers,
4514
- // must check for 0 explicitly
4515
- //
4516
- (minValue || minValue === 0) && (maxValue || maxValue === 0);
4517
- var defaultSize = hasMinAndMaxValues ? ['interpolate', ['linear'], variable, minValue, minSize / 2, maxValue, maxSize / 2] : minSize;
4518
- var largerSize = hasMinAndMaxValues ? ['interpolate', ['linear'], variable, minValue, minSize, maxValue, maxSize] : maxSize;
4519
- return ['step', ['zoom'], defaultSize, zoomBreakpoint, largerSize];
4520
- }
4521
-
4522
- function influenceAreaConf(_a) {
4523
- var _b = _a === void 0 ? {} : _a,
4524
- _c = _b.defaultBufferSize,
4525
- defaultBufferSize = _c === void 0 ? 200 : _c,
4526
- _d = _b.maxBufferSize,
4527
- maxBufferSize = _d === void 0 ? 2000 : _d,
4528
- _e = _b.minBufferSize,
4529
- minBufferSize = _e === void 0 ? 0 : _e,
4530
- _f = _b.bufferSizeStep,
4531
- bufferSizeStep = _f === void 0 ? 50 : _f;
4532
- return {
4533
- showInfluenceArea: {
4534
- type: 'booleanCheckbox',
4535
- label: 'Área de influência',
4536
- description: 'Visualizar área de influência',
4537
- defaultValue: true
4538
- },
4539
- influenceAreaRadius: {
4540
- type: 'slider',
4541
- inactive: resolve.literal(resolve.fn(function (context) {
4542
- var _a;
4543
- return !((_a = context.value) === null || _a === void 0 ? void 0 : _a.showInfluenceArea);
4544
- })),
4545
- label: resolve.literal(resolve.fn(function (context) {
4546
- var _a;
4547
- return "Raio de influ\xEAncia (".concat(((_a = context.value) === null || _a === void 0 ? void 0 : _a.influenceAreaRadius) || defaultBufferSize, "m)");
4548
- })),
4549
- helperText: 'Configure um raio de influência do equipamento',
4550
- min: minBufferSize,
4551
- max: maxBufferSize,
4552
- step: bufferSizeStep,
4553
- defaultValue: defaultBufferSize
4554
- },
4555
- dissolveOverlappingGeometries: {
4556
- inactive: resolve.literal(resolve.fn(function (context) {
4557
- var _a;
4558
- return !((_a = context.value) === null || _a === void 0 ? void 0 : _a.showInfluenceArea);
4559
- })),
4560
- type: 'booleanCheckbox',
4561
- label: 'Dissolver geometrias',
4562
- description: 'Unir geometrias sobrepostas',
4563
- defaultValue: false
4564
- }
4565
- };
4566
- }
4567
- function _defaultGetGeoJson(context) {
4568
- return {
4569
- type: 'FeatureCollection',
4570
- features: context.rawData.map(function (entry) {
4571
- return {
4572
- type: 'Feature',
4573
- geometry: entry.geom,
4574
- properties: omit(entry, ['geom'])
4575
- };
4576
- })
4577
- };
4578
- }
4579
- function influenceAreaMetadata(_a) {
4580
- var _this = this;
4581
- var _b = {} ,
4582
- _c = _b.getGeoJson,
4583
- getGeoJson = _c === void 0 ? _defaultGetGeoJson : _c,
4584
- _d = _b.getConf,
4585
- getConf = _d === void 0 ? function (context) {
4586
- return get$1(context, 'view.conf.data') || {};
4587
- } : _d;
4588
- return {
4589
- influenceArea: resolveAsync.fn(function (context) {
4590
- return __awaiter(_this, void 0, void 0, function () {
4591
- var _a, influenceAreaRadius, showInfluenceArea, dissolveOverlappingGeometries, geoJson, influenceArea;
4592
- return __generator(this, function (_b) {
4593
- switch (_b.label) {
4594
- case 0:
4595
- return [4 /*yield*/, getConf(context)];
4596
- case 1:
4597
- _a = _b.sent(), influenceAreaRadius = _a.influenceAreaRadius, showInfluenceArea = _a.showInfluenceArea, dissolveOverlappingGeometries = _a.dissolveOverlappingGeometries;
4598
- return [4 /*yield*/, getGeoJson(context)];
4599
- case 2:
4600
- geoJson = _b.sent();
4601
- if (!(showInfluenceArea && typeof influenceAreaRadius === 'number' && influenceAreaRadius > 0 && Array.isArray(geoJson === null || geoJson === void 0 ? void 0 : geoJson.features) && geoJson.features.length > 0)) return [3 /*break*/, 6];
4602
- _b.label = 3;
4603
- case 3:
4604
- _b.trys.push([3, 5,, 6]);
4605
- return [4 /*yield*/, GeoReDUSWorker.buffer(geoJson, influenceAreaRadius, {
4606
- units: 'meters',
4607
- dissolve: dissolveOverlappingGeometries
4608
- })];
4609
- case 4:
4610
- influenceArea = _b.sent();
4611
- return [2 /*return*/, influenceArea];
4612
- case 5:
4613
- _b.sent();
4614
- return [2 /*return*/, null];
4615
- case 6:
4616
- return [2 /*return*/, null];
4617
- }
4618
- });
4619
- });
4620
- })
4621
- };
4622
- }
4623
- function influenceAreaSources(_a) {
4624
- var _b = _a === void 0 ? {} : _a,
4625
- _c = _b.dataPath,
4626
- dataPath = _c === void 0 ? 'view.metadata.influenceArea' : _c;
4627
- return {
4628
- influenceArea: ['$if', [['$empty', ['$get', dataPath]]], null, {
4629
- type: 'geojson',
4630
- data: ['$get', dataPath]
4631
- }
4632
- // resolve.fn((context) => {
4633
- // return {
4634
- // type: 'geojson',
4635
- // data: get(context, dataPath),
4636
- // }
4637
- // }),
4638
- ]
4639
- };
4640
- }
4641
- function influenceAreaLayers(_a) {
4642
- var _b = _a === void 0 ? {} : _a,
4643
- _c = _b.dataPath,
4644
- dataPath = _c === void 0 ? 'view.metadata.influenceArea' : _c,
4645
- _d = _b.zIndex,
4646
- zIndex = _d === void 0 ? ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 1 : _d,
4647
- _e = _b.fillPaint,
4648
- fillPaint = _e === void 0 ? {} : _e,
4649
- _f = _b.boundaryPaint,
4650
- boundaryPaint = _f === void 0 ? {} : _f;
4651
- return {
4652
- influenceArea_fill: {
4653
- zIndex: zIndex,
4654
- hidden: ['$empty', ['$get', dataPath]],
4655
- source: 'influenceArea',
4656
- type: 'fill',
4657
- paint: __assign({
4658
- 'fill-color': 'red',
4659
- 'fill-opacity': 0.3
4660
- }, fillPaint)
4661
- },
4662
- influenceArea_boundaries: {
4663
- zIndex: zIndex,
4664
- hidden: ['$empty', ['$get', dataPath]],
4665
- source: 'influenceArea',
4666
- type: 'line',
4667
- paint: __assign({
4668
- 'line-color': 'red',
4669
- 'line-opacity': 0.8,
4670
- 'line-width': 2,
4671
- 'line-dasharray': [2, 2]
4672
- }, boundaryPaint)
4673
- }
4674
- };
4675
- }
4676
-
4677
- var _excluded$1 = ["version"];
4678
- function tableVectorSource(context, tableId) {
4679
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
4680
- _ref$version = _ref.version,
4681
- version = _ref$version === void 0 ? '1' : _ref$version,
4682
- override = _objectWithoutProperties(_ref, _excluded$1);
4683
- var VECTOR_TILE_SERVER_ENDPOINT = context.VECTOR_TILE_SERVER_ENDPOINT;
4684
- return _objectSpread2({
4685
- type: 'vector',
4686
- tiles: ["".concat(VECTOR_TILE_SERVER_ENDPOINT, "/").concat(tableId, ".geom/{z}/{x}/{y}?v=").concat(version)],
4687
- minzoom: 9,
4688
- maxzoom: 20
4689
- }, override);
4690
- }
4691
- function vectorLayer(sourceId, override) {
4692
- return _objectSpread2({
4693
- source: sourceId,
4694
- 'source-layer': sourceId
4695
- }, override);
4696
- }
4697
- var BASE_MAP_LAYERS_Z_INDEX_BASE = 100;
4698
- var ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE = 1000;
4699
- function globalResources(context) {
4700
- var MUNICIPIO_MALHA_TABLE_ID = 'ibge_malha_br_municipio';
4701
- return {
4702
- sources: {
4703
- planet: {
4704
- type: 'vector',
4705
- tiles: ["https://api.maptiler.com/tiles/v3/{z}/{x}/{y}.pbf?key=".concat(context.MAP_TILER_API_KEY)]
4706
- },
4707
- global_municipio: tableVectorSource(context, MUNICIPIO_MALHA_TABLE_ID, {
4708
- absoluteId: MUNICIPIO_MALHA_TABLE_ID,
4709
- minzoom: 4,
4710
- maxzoom: 20
4711
- })
4712
- },
4713
- layers: _objectSpread2({
4714
- municipio: {
4715
- zIndex: BASE_MAP_LAYERS_Z_INDEX_BASE + VEGETATION_AND_WATER_OVERLAY_LAYERS.length + 9,
4716
- absoluteId: MUNICIPIO_MALHA_TABLE_ID,
4717
- absoluteSourceId: MUNICIPIO_MALHA_TABLE_ID,
4718
- 'source-layer': "".concat(MUNICIPIO_MALHA_TABLE_ID, ".geom"),
4719
- type: 'line',
4720
- filter: ['==', ['get', 'id'], ['$get', 'municipioId']],
4721
- paint: {
4722
- 'line-color': '#000000',
4723
- // Line color
4724
- 'line-width': 4,
4725
- // Line width
4726
- 'line-opacity': 0.5
4727
- // 'line-dasharray': [2, 4], // Dash pattern
4728
- }
4729
- }
4730
- }, VEGETATION_AND_WATER_OVERLAY_LAYERS.reduce(function (acc, layer, index) {
4731
- return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, slugify(layer.id, '_'), resolve.fn(function (context) {
4732
- var _context$app;
4733
- //
4734
- // It is important to return as literal in
4735
- // order to avoid unnecessary resolution attempts
4736
- //
4737
- return resolve.literal(_objectSpread2(_objectSpread2({}, layer), {}, {
4738
- hidden: ((_context$app = context.app) === null || _context$app === void 0 ? void 0 : _context$app.baseMapStyle) === 'satellite',
4739
- interactive: false,
4740
- zIndex: BASE_MAP_LAYERS_Z_INDEX_BASE + index,
4741
- source: 'planet'
4742
- }));
4743
- })));
4744
- }, {}))
4745
- };
4746
- }
4747
-
4748
- //
4749
- // Converts any key with dot notation
4750
- // to actual objects
4751
- //
4752
- function unflat(obj) {
4753
- return Object.entries(obj).reduce(function (acc, _ref3) {
4754
- var _ref4 = _slicedToArray(_ref3, 2),
4755
- key = _ref4[0],
4756
- value = _ref4[1];
4757
- set(acc, key, value);
4758
- return acc;
4759
- }, {});
4760
- }
4761
-
4762
- var INSUFFICIENT_DATA_COLOR$1 = '#cccccc';
4763
- function numerical_choropleth(base, _ref) {
4764
- var collection_id = _ref.collection_id,
4765
- variable_id = _ref.variable_id,
4766
- indicator_label = _ref.indicator_label,
4767
- number_format = _ref.number_format,
4768
- _ref$color_scheme = _ref.color_scheme,
4769
- color_scheme = _ref$color_scheme === void 0 ? 'schemeRdYlBu' : _ref$color_scheme,
4770
- measure_unit = _ref.measure_unit,
4771
- $circleRadius = _ref.$circleRadius,
4772
- $tooltip = _ref.$tooltip,
4773
- $layerFilter = _ref.$layerFilter,
4774
- $legends = _ref.$legends;
4775
- var TABLE_ID = collection_id;
4776
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
4777
- var _color_scheme = COLOR_SCHEMES[color_scheme];
4778
- var $circleColor = ['$if', ['$empty', ['$get', 'view.metadata.colorScaleStops']], INSUFFICIENT_DATA_COLOR$1, ['$flat', [['step', ['coalesce', ['get', variable_id], -1]], ['$get', 'view.metadata.colorScaleStops']]]];
4779
- return _objectSpread2(_objectSpread2({}, base), {}, {
4780
- metadata: {
4781
- _value: ['$let', base.metadata._value, {
4782
- variableValues: ['$get', 'variableValues'],
4783
- sizingValues: ['$get', 'sizingValues'],
4784
- influenceArea: ['$get', 'influenceArea'],
4785
- colorScaleStops: ['$naturalBreaks', ['$get', 'variableValues'], ['$merge', _color_scheme, {
4786
- minK: 5
4787
- }]]
4788
- }]
4789
- },
4790
- layers: _objectSpread2(_objectSpread2({}, base.layers), {}, _defineProperty(_defineProperty({}, "".concat(VECTOR_SOURCE_ID, "_circle"), vectorLayer(VECTOR_SOURCE_ID, {
4791
- zIndex: ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 2,
4792
- type: 'circle',
4793
- legends: [{
4794
- type: 'SequentialColorLegend',
4795
- title: indicator_label,
4796
- unit: measure_unit,
4797
- steps: ['$coalesce', ['$get', 'view.metadata.colorScaleStops'], ['transparent', ['$min', ['$get', 'view.metadata.variableValues']], INSUFFICIENT_DATA_COLOR$1, ['$max', ['$get', 'view.metadata.variableValues']]]],
4798
- format: {
4799
- number: number_format || ['pt-BR', {}],
4800
- below: 'Sem dados',
4801
- above: ['$if', ['$empty', ['$get', 'view.metadata.colorScaleStops']], null, 'Acima de ${0}']
4802
- }
4803
- }].concat(_toConsumableArray($legends)),
4804
- interactive: true,
4805
- tooltip: $tooltip,
4806
- filter: $layerFilter,
4807
- paint: {
4808
- 'circle-opacity': 1,
4809
- 'circle-radius': $circleRadius,
4810
- 'circle-stroke-width': 1,
4811
- 'circle-stroke-color': '#000000',
4812
- 'circle-color': $circleColor
4813
- }
4814
- })), "influenceArea_fill", _objectSpread2(_objectSpread2({}, base.layers.influenceArea_fill), {}, {
4815
- paint: _objectSpread2(_objectSpread2({}, base.layers.influenceArea_fill.paint), {}, {
4816
- 'fill-color': $circleColor
4817
- })
4818
- })))
4819
- });
4820
- }
4821
-
4822
- function numerical_size$1(base, _ref) {
4823
- var collection_id = _ref.collection_id,
4824
- variable_id = _ref.variable_id,
4825
- indicator_label = _ref.indicator_label,
4826
- _ref$color_scheme = _ref.color_scheme,
4827
- color_scheme = _ref$color_scheme === void 0 ? 'schemeSet1.colors[1]' : _ref$color_scheme,
4828
- measure_unit = _ref.measure_unit,
4829
- $tooltip = _ref.$tooltip,
4830
- $layerFilter = _ref.$layerFilter;
4831
- var TABLE_ID = collection_id;
4832
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
4833
- var SIZE_MAX = 25;
4834
- var SIZE_MIN = 6;
4835
- return _objectSpread2(_objectSpread2({}, base), {}, {
4836
- layers: _objectSpread2(_objectSpread2({}, base.layers), {}, _defineProperty({}, "".concat(VECTOR_SOURCE_ID, "_circle"), vectorLayer(VECTOR_SOURCE_ID, {
4837
- zIndex: ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 2,
4838
- type: 'circle',
4839
- legends: [{
4840
- type: 'ProportionalSymbolLegend',
4841
- unit: measure_unit,
4842
- title: indicator_label,
4843
- min: ['$min', ['$get', 'view.metadata.variableValues']],
4844
- max: ['$max', ['$get', 'view.metadata.variableValues']],
4845
- sizeMin: SIZE_MIN * 2,
4846
- sizeMax: SIZE_MAX * 2,
4847
- numberFormat: ['pt-BR', {
4848
- maximumFractionDigits: 0
4849
- }]
4850
- }],
4851
- interactive: true,
4852
- tooltip: $tooltip,
4853
- filter: $layerFilter,
4854
- paint: {
4855
- 'circle-opacity': 1,
4856
- 'circle-stroke-width': 1,
4857
- 'circle-stroke-color': '#000000',
4858
- 'circle-radius': ['$if', ['$gt', ['$get', 'length', ['$get', 'view.metadata.variableValues']], 1], zoomSensitiveLinearSizes({
4859
- variable: ['get', variable_id],
4860
- minValue: ['$min', ['$get', 'view.metadata.variableValues']],
4861
- maxValue: ['$max', ['$get', 'view.metadata.variableValues']],
4862
- minSize: SIZE_MIN,
4863
- maxSize: SIZE_MAX
4864
- }), 10],
4865
- 'circle-color': get(COLOR_SCHEMES, color_scheme) || color_scheme
4866
- }
4867
- })))
4868
- });
4869
- }
4870
-
4871
- function categorical$1(base, _ref) {
4872
- var collection_id = _ref.collection_id,
4873
- measure_unit = _ref.measure_unit,
4874
- variable_id = _ref.variable_id,
4875
- indicator_label = _ref.indicator_label,
4876
- categories = _ref.categories,
4877
- $legends = _ref.$legends,
4878
- $tooltip = _ref.$tooltip,
4879
- $layerFilter = _ref.$layerFilter,
4880
- $circleRadius = _ref.$circleRadius;
4881
- var VARIABLE_ID = variable_id;
4882
- var TABLE_ID = collection_id;
4883
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
4884
- categories = categories ? categories.map(function (category) {
4885
- return _objectSpread2(_objectSpread2({}, category), {}, {
4886
- color: get(COLOR_SCHEMES, category.color) || category.color
4887
- });
4888
- }) : null;
4889
- return _objectSpread2(_objectSpread2({}, base), {}, {
4890
- layers: _objectSpread2(_objectSpread2({}, base.layers), {}, _defineProperty({}, "".concat(VECTOR_SOURCE_ID, "_circle"), vectorLayer(VECTOR_SOURCE_ID, {
4891
- zIndex: ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 2,
4892
- type: 'circle',
4893
- legends: [].concat(_toConsumableArray(categories ? [{
4894
- type: 'ColorLegend',
4895
- title: indicator_label,
4896
- unit: measure_unit,
4897
- items: categories
4898
- }] : []), _toConsumableArray($legends)),
4899
- interactive: true,
4900
- tooltip: $tooltip,
4901
- filter: $layerFilter,
4902
- paint: {
4903
- 'circle-opacity': 1,
4904
- 'circle-radius': $circleRadius,
4905
- 'circle-stroke-width': 1,
4906
- 'circle-stroke-color': '#000000',
4907
- 'circle-color': categories ? ['match', ['to-string', ['get', VARIABLE_ID]]].concat(_toConsumableArray(categories.flatMap(function (category) {
4908
- return [category.value, category.color];
4909
- })), [DEFAULT_NULL_COLOR]) : DEFAULT_NULL_COLOR
4910
- }
4911
- })))
4912
- });
4913
- }
4914
-
4915
- function boolean_categorical$1(base, config) {
4916
- return categorical$1(base, _objectSpread2(_objectSpread2({}, config), {}, {
4917
- //
4918
- // Set default categories
4919
- //
4920
- categories: config.categories || [{
4921
- color: 'schemeSet1.colors[2]',
4922
- label: 'Sim',
4923
- value: 'true'
4924
- }, {
4925
- color: 'schemeSet1.colors[0]',
4926
- label: 'Não',
4927
- value: 'false'
4928
- }]
4929
- }));
4930
- }
4931
-
4932
- var BY_TYPE$1 = {
4933
- numerical_choropleth: numerical_choropleth,
4934
- numerical_size: numerical_size$1,
4935
- boolean_categorical: boolean_categorical$1,
4936
- categorical: categorical$1
4937
- };
4938
- function cem_escolas_2022(config, allViewSpecs, context) {
4939
- var collection_id = config.collection_id,
4940
- variable_id = config.variable_id,
4941
- indicator_id = config.indicator_id,
4942
- variant_of = config.variant_of,
4943
- indicator_path = config.indicator_path,
4944
- indicator_label = config.indicator_label,
4945
- indicator_type = config.indicator_type,
4946
- sizing_variable_id = config.sizing_variable_id,
4947
- _config$number_format = config.number_format,
4948
- number_format = _config$number_format === void 0 ? ['pt-BR', {}] : _config$number_format,
4949
- metodology = config.metodology,
4950
- keywords = config.keywords;
4951
- if (Boolean(variant_of)) {
4952
- return null;
4953
- }
4954
- var _setupVariants = setupVariants(config, allViewSpecs),
4955
- variants = _setupVariants.variants,
4956
- loadVariant = _setupVariants.loadVariant;
4957
- var METADATA_API_ENDPOINT = context.METADATA_API_ENDPOINT;
4958
- var VARIABLE_ID = variable_id;
4959
- var TABLE_ID = collection_id;
4960
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
4961
- var viewId = "".concat(collection_id, ".").concat(indicator_id);
4962
- var globalRes = globalResources(context);
4963
- var sizing_variable_view = sizing_variable_id ? allViewSpecs.find(function (view) {
4964
- return view.variable_id === sizing_variable_id;
4965
- }) : null;
4966
- var sizing_variable_label = (sizing_variable_view === null || sizing_variable_view === void 0 ? void 0 : sizing_variable_view.indicator_label) || sizing_variable_id;
4967
-
4968
- //
4969
- // common resolver that takes in variant filter and converts into
4970
- // search parameters for metadata api for data fetching
4971
- //
4972
- var _fetchMetadataApiFilterExpResolver = resolve.fn(function (context) {
4973
- var _context$view;
4974
- var variantId = (_context$view = context.view) === null || _context$view === void 0 || (_context$view = _context$view.conf) === null || _context$view === void 0 || (_context$view = _context$view.data) === null || _context$view === void 0 ? void 0 : _context$view.variantId;
4975
- var variantSpec = loadVariant(variantId);
4976
- var filter = variantId ? variantSpec.filter : null;
4977
- return filter ? fmtMetadataApiFilterExp(filter) : {};
4978
- });
4979
- var _id_municipio_apiFilterExpr = ['$template', 'eq.${0}', ['$get', 'municipioId']];
4980
- var $sourceLabel = 'INEP (Censo Escolar 2022)';
4981
- var base = {
4982
- id: viewId,
4983
- label: indicator_label,
4984
- sourceLabel: $sourceLabel,
4985
- path: indicator_path,
4986
- metodology: metodology,
4987
- keywords: [indicator_path, $sourceLabel, 'educação', keywords].filter(Boolean),
4988
- confSchema: {
4989
- data: _objectSpread2({
4990
- variantId: {
4991
- label: 'Rede de ensino:',
4992
- type: 'treeSelect',
4993
- options: variants.map(function (variant) {
4994
- return {
4995
- path: variant.variant_path,
4996
- label: variant.variant_label || variant.indicator_id,
4997
- value: variant.indicator_id
4998
- };
4999
- }),
5000
- placeholder: 'Selecione uma rede',
5001
- clearable: false,
5002
- defaultValue: indicator_id
5003
- },
5004
- showSize: sizing_variable_id ? {
5005
- label: 'Matrículas',
5006
- type: 'booleanCheckbox',
5007
- description: 'Tamanho proporcional à quantidade de matrículas',
5008
- defaultValue: true
5009
- } : null
5010
- }, influenceAreaConf({
5011
- defaultBufferSize: 200
5012
- }))
5013
- },
5014
- metadata: {
5015
- _value: ['$let', {
5016
- rawData: ['$fetch', {
5017
- href: METADATA_API_ENDPOINT,
5018
- pathname: collection_id,
5019
- searchParams: ['$merge', {
5020
- select: [VARIABLE_ID, 'geom'].join(','),
5021
- id_municipio: _id_municipio_apiFilterExpr
5022
- }, _fetchMetadataApiFilterExpResolver]
5023
- }]
5024
- }, _objectSpread2({
5025
- variableValues: ['$get', ['$template', 'rawData[].${0}', VARIABLE_ID]],
5026
- sizingValues: sizing_variable_id ? ['$if', ['$get', 'view.conf.data.showSize'], ['$filter', ['$get', ['$template', '[].${0}', sizing_variable_id], ['$fetch', {
5027
- href: METADATA_API_ENDPOINT,
5028
- pathname: collection_id,
5029
- searchParams: ['$merge', {
5030
- select: sizing_variable_id,
5031
- id_municipio: _id_municipio_apiFilterExpr
5032
- }, _fetchMetadataApiFilterExpResolver]
5033
- }]], ['$and', ['$not', ['$empty', ['$iterator', 'item']]], ['$gt', ['$iterator', 'item'], 0]]], null] : null
5034
- }, influenceAreaMetadata())]
5035
- },
5036
- sources: _objectSpread2(_objectSpread2({}, globalRes.sources), {}, _defineProperty({}, VECTOR_SOURCE_ID, tableVectorSource(context, collection_id, {
5037
- attribution: $sourceLabel,
5038
- promoteId: 'id_escola',
5039
- version: 2,
5040
- minzoom: 8,
5041
- maxzoom: 20
5042
- })), influenceAreaSources({
5043
- dataPath: 'view.metadata.influenceArea'
5044
- })),
5045
- layers: _objectSpread2(_objectSpread2({}, globalRes.layers), influenceAreaLayers({
5046
- dataPath: 'view.metadata.influenceArea',
5047
- fillPaint: {
5048
- 'fill-color': get(COLOR_SCHEMES, 'schemeSet1.colors[1]'),
5049
- 'fill-opacity': 0.3
5050
- },
5051
- boundaryPaint: {
5052
- 'line-color': get(COLOR_SCHEMES, 'schemeSet1.colors[1]'),
5053
- 'line-opacity': 0.8,
5054
- 'line-width': 2,
5055
- 'line-dasharray': [2, 2]
5056
- }
5057
- })),
5058
- download: downloadResolver({
5059
- fileNameBase: ['$template', '${0}_${1}_georedus_edu', [VARIABLE_ID, ['$get', 'municipioId']]],
5060
- mainVariableId: VARIABLE_ID,
5061
- availableVariableIds: uniqBy(allViewSpecs.filter(function (spec) {
5062
- return Boolean(spec.variable_id);
5063
- }).map(function (spec) {
5064
- return {
5065
- label: [spec.indicator_label, spec.variant_label].filter(Boolean).join(' | '),
5066
- value: spec.variable_id
5067
- };
5068
- }), function (opt) {
5069
- return opt.value;
5070
- }),
5071
- fetchData: resolve.fn(function (context) {
5072
- return /*#__PURE__*/function () {
5073
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
5074
- var variableIds;
5075
- return _regeneratorRuntime().wrap(function _callee$(_context) {
5076
- while (1) switch (_context.prev = _context.next) {
5077
- case 0:
5078
- variableIds = _ref.variableIds, _ref.options;
5079
- _context.next = 3;
5080
- return resolveExprAsync(['$fetch', {
5081
- href: METADATA_API_ENDPOINT,
5082
- pathname: collection_id,
5083
- searchParams: ['$merge', {
5084
- select: ['geom', 'no_escola', 'id_escola'].concat(_toConsumableArray(variableIds)).join(','),
5085
- id_municipio: _id_municipio_apiFilterExpr
5086
- }, _fetchMetadataApiFilterExpResolver]
5087
- }], context);
5088
- case 3:
5089
- return _context.abrupt("return", _context.sent);
5090
- case 4:
5091
- case "end":
5092
- return _context.stop();
5093
- }
5094
- }, _callee);
5095
- }));
5096
- return function (_x) {
5097
- return _ref2.apply(this, arguments);
5098
- };
5099
- }();
5100
- })
5101
- })
5102
- };
5103
- var SIZE_DEFAULT = 10;
5104
- var SIZE_MAX = 25;
5105
- var SIZE_MIN = 6;
5106
-
5107
- //
5108
- // Specify some utilities connected to the base setup
5109
- // but that will need specific placement at the indicator_type
5110
- // preset
5111
- //
5112
- var $layerFilter = resolve.fn(function (context) {
5113
- var _context$view2;
5114
- var variantId = (_context$view2 = context.view) === null || _context$view2 === void 0 || (_context$view2 = _context$view2.conf) === null || _context$view2 === void 0 || (_context$view2 = _context$view2.data) === null || _context$view2 === void 0 ? void 0 : _context$view2.variantId;
5115
- var variantSpec = loadVariant(variantId);
5116
- var filter = variantId ? variantSpec.filter : null;
5117
- return ['all', ['==', ['get', 'id_municipio'], ['$get', 'municipioId']]].concat(_toConsumableArray(isPlainObject(filter) ? fmtMaplibreGlFilterExp(filter) : []));
5118
- });
5119
- var $circleRadius = sizing_variable_id ? ['$if', ['$and', ['$get', 'view.conf.data.showSize'], ['$gt', ['$get', 'length', ['$get', 'view.metadata.sizingValues']], 1]], zoomSensitiveLinearSizes({
5120
- variable: ['get', sizing_variable_id],
5121
- minValue: ['$min', ['$get', 'view.metadata.sizingValues']],
5122
- maxValue: ['$max', ['$get', 'view.metadata.sizingValues']],
5123
- minSize: SIZE_MIN,
5124
- maxSize: SIZE_MAX
5125
- }), SIZE_DEFAULT] : SIZE_DEFAULT;
5126
- var $tooltip = {
5127
- title: ['$literal', ['$get', 'feature.properties.no_escola']],
5128
- entries: [[indicator_label, ['$literal', ['$coalesce', ['$get', "feature.properties.".concat(VARIABLE_ID, "::string({\n number: ").concat(JSON.stringify(number_format), ",\n boolean: {\n true: 'Sim',\n false: 'N\xE3o'\n }\n })")], 'Sem dados']]], sizing_variable_id ? [sizing_variable_label, ['$literal', ['$get', "feature.properties.".concat(sizing_variable_id, "::string")]]] : null, ['Etapas de ensino', ['$literal', resolve.fn(function (context) {
5129
- var ETAPAS = {
5130
- in_inf_cre: 'Infantil / Creche',
5131
- in_inf_pre: 'Infantil / Pré-escola',
5132
- in_fund_ai: 'Fundamental I',
5133
- in_fund_af: 'Fundamental II',
5134
- in_med: 'Ensino Médio'
5135
- };
5136
- return Object.entries(ETAPAS).filter(function (_ref3) {
5137
- var _context$feature, _context$feature2;
5138
- var _ref4 = _slicedToArray(_ref3, 2),
5139
- key = _ref4[0];
5140
- _ref4[1];
5141
- return (context === null || context === void 0 || (_context$feature = context.feature) === null || _context$feature === void 0 ? void 0 : _context$feature.properties) && (context === null || context === void 0 || (_context$feature2 = context.feature) === null || _context$feature2 === void 0 ? void 0 : _context$feature2.properties[key]);
5142
- }).map(function (_ref5) {
5143
- var _ref6 = _slicedToArray(_ref5, 2);
5144
- _ref6[0];
5145
- var label = _ref6[1];
5146
- return label;
5147
- }).join(', ');
5148
- })]], ['Rede de ensino', ['$literal', ['$get', 'feature.properties.tp_dependencia']]]].filter(Boolean)
5149
- };
5150
- var $legends = sizing_variable_id ? [['$if', ['$get', 'view.conf.data.showSize'], {
5151
- type: 'ProportionalSymbolLegend',
5152
- unit: 'Matrículas',
5153
- title: sizing_variable_label,
5154
- min: ['$min', ['$get', 'view.metadata.sizingValues']],
5155
- max: ['$max', ['$get', 'view.metadata.sizingValues']],
5156
- sizeMin: SIZE_MIN * 2,
5157
- sizeMax: SIZE_MAX * 2,
5158
- numberFormat: ['pt-BR', {
5159
- maximumFractionDigits: 0
5160
- }]
5161
- }, null]] : [];
5162
- var typeParser = BY_TYPE$1[indicator_type];
5163
- if (!typeParser) {
5164
- console.warn("Ignoring unknown indicator_type ".concat(indicator_type));
5165
- return null;
5166
- }
5167
- return typeParser(base, _objectSpread2(_objectSpread2({}, config), {}, {
5168
- $circleRadius: $circleRadius,
5169
- $tooltip: $tooltip,
5170
- $legends: $legends,
5171
- $layerFilter: $layerFilter
5172
- }));
5173
- }
5174
-
5175
1914
  var variable_ids$1 = ["dom_bas_dom_tot_dom_pct", "dom_bas_dom_tot_dpp_pct", "dom_bas_dom_tot_imp_pct", "dom_bas_mor_sex_dpp_fem_pct", "dom_bas_mor_sex_dpp_mas_pct", "dom_bas_mor_tot_dom_pct", "dom_bas_mor_tot_dpp_pct", "dom_mor_dom_sex_6mor_fem_pct", "dom_mor_dom_sex_6mor_mas_pct", "dom_mor_dom_tot_6mor_pct", "dom_mor_dom_tot_alu_pct", "dom_mor_dom_tot_apt_pct", "dom_mor_dom_tot_cas_pct", "dom_mor_dom_tot_mor_ina_pct", "dom_mor_dom_tot_pro_pct", "dom_mor_mor_sex_alu_fem_pct", "dom_mor_mor_sex_alu_mas_pct", "dom_mor_mor_sex_apt_fem_pct", "dom_mor_mor_sex_apt_mas_pct", "dom_mor_mor_sex_cas_fem_pct", "dom_mor_mor_sex_cas_mas_pct", "dom_mor_mor_sex_pro_fem_pct", "dom_mor_mor_sex_pro_mas_pct", "dom_mor_mor_tot_alu_pct", "dom_mor_mor_tot_apt_pct", "dom_mor_mor_tot_cas_pct", "dom_mor_mor_tot_med_mor_pct", "dom_mor_mor_tot_mor_ina_pct", "dom_mor_mor_tot_pro_pct", "dom_ren_dom_tot_meiosm_pct", "dom_ren_mor_tot_med_pct", "dom_ren_mor_tot_med_res_pct", "edu_pop_mor_tot_0_3_pct", "edu_pop_mor_tot_11_14_pct", "edu_pop_mor_tot_15_17_pct", "edu_pop_mor_tot_4_5_pct", "edu_pop_mor_tot_6_10_pct", "ent_arb_dom_ren_12sm_pct", "ent_arb_dom_ren_1sm_pct", "ent_arb_dom_ren_2sm_pct", "ent_arb_dom_ren_meiosm_pct", "ent_arb_dom_sex_fem_res_pct", "ent_arb_dom_sex_mas_res_pct", "ent_arb_dom_tot_dom_pct", "ent_arb_mor_cor_ama_pct", "ent_arb_mor_cor_bra_pct", "ent_arb_mor_cor_ind_pct", "ent_arb_mor_cor_neg_pct", "ent_arb_mor_ren_12sm_pct", "ent_arb_mor_ren_1sm_pct", "ent_arb_mor_ren_2sm_pct", "ent_arb_mor_ren_meiosm_pct", "ent_arb_mor_sex_fem_res_pct", "ent_arb_mor_sex_mas_res_pct", "ent_arb_mor_tot_dom_pct", "ent_bue_dom_ren_12sm_pct", "ent_bue_dom_ren_1sm_pct", "ent_bue_dom_ren_2sm_pct", "ent_bue_dom_ren_meiosm_pct", "ent_bue_dom_sex_fem_res_pct", "ent_bue_dom_sex_mas_res_pct", "ent_bue_dom_tot_dom_pct", "ent_bue_mor_cor_ama_pct", "ent_bue_mor_cor_bra_pct", "ent_bue_mor_cor_ind_pct", "ent_bue_mor_cor_neg_pct", "ent_bue_mor_ren_12sm_pct", "ent_bue_mor_ren_1sm_pct", "ent_bue_mor_ren_2sm_pct", "ent_bue_mor_ren_meiosm_pct", "ent_bue_mor_sex_fem_res_pct", "ent_bue_mor_sex_mas_res_pct", "ent_bue_mor_tot_dom_pct", "ent_cal_dom_ren_12sm_pct", "ent_cal_dom_ren_1sm_pct", "ent_cal_dom_ren_2sm_pct", "ent_cal_dom_ren_meiosm_pct", "ent_cal_dom_sex_fem_res_pct", "ent_cal_dom_sex_mas_res_pct", "ent_cal_dom_tot_dom_pct", "ent_cal_mor_cor_ama_pct", "ent_cal_mor_cor_bra_pct", "ent_cal_mor_cor_ind_pct", "ent_cal_mor_cor_neg_pct", "ent_cal_mor_ren_12sm_pct", "ent_cal_mor_ren_1sm_pct", "ent_cal_mor_ren_2sm_pct", "ent_cal_mor_ren_meiosm_pct", "ent_cal_mor_sex_fem_res_pct", "ent_cal_mor_sex_mas_res_pct", "ent_cal_mor_tot_dom_pct", "ent_esg_dom_ren_12sm_pct", "ent_esg_dom_ren_1sm_pct", "ent_esg_dom_ren_2sm_pct", "ent_esg_dom_ren_meiosm_pct", "ent_esg_dom_sex_fem_res_pct", "ent_esg_dom_sex_mas_res_pct", "ent_esg_mor_cor_ama_pct", "ent_esg_mor_cor_bra_pct", "ent_esg_mor_cor_ind_pct", "ent_esg_mor_cor_neg_pct", "ent_esg_mor_ren_12sm_pct", "ent_esg_mor_ren_1sm_pct", "ent_esg_mor_ren_2sm_pct", "ent_esg_mor_ren_meiosm_pct", "ent_esg_mor_sex_fem_res_pct", "ent_esg_mor_sex_mas_res_pct", "ent_esg_mor_tot_dom_pct", "ent_ide_dom_ren_12sm_pct", "ent_ide_dom_ren_1sm_pct", "ent_ide_dom_ren_2sm_pct", "ent_ide_dom_ren_meiosm_pct", "ent_ide_dom_sex_fem_res_pct", "ent_ide_dom_sex_mas_res_pct", "ent_ide_dom_tot_dom_pct", "ent_ide_mor_cor_ind_pct", "ent_ide_mor_cor_neg_pct", "ent_ide_mor_ren_12sm_pct", "ent_ide_mor_ren_1sm_pct", "ent_ide_mor_ren_2sm_pct", "ent_ide_mor_ren_meiosm_pct", "ent_ide_mor_sex_fem_res_pct", "ent_ide_mor_sex_mas_res_pct", "ent_ide_mor_tot_dom_pct", "ent_ilu_dom_ren_12sm_pct", "ent_ilu_dom_ren_1sm_pct", "ent_ilu_dom_ren_2sm_pct", "ent_ilu_dom_ren_meiosm_pct", "ent_ilu_dom_sex_fem_res_pct", "ent_ilu_dom_sex_mas_res_pct", "ent_ilu_dom_tot_dom_pct", "ent_ilu_mor_cor_ama_pct", "ent_ilu_mor_cor_bra_pct", "ent_ilu_mor_cor_ind_pct", "ent_ilu_mor_cor_neg_pct", "ent_ilu_mor_ren_12sm_pct", "ent_ilu_mor_ren_1sm_pct", "ent_ilu_mor_ren_2sm_pct", "ent_ilu_mor_ren_meiosm_pct", "ent_ilu_mor_sex_fem_res_pct", "ent_ilu_mor_sex_mas_res_pct", "ent_ilu_mor_tot_dom_pct", "ent_lix_dom_ren_12sm_pct", "ent_lix_dom_ren_1sm_pct", "ent_lix_dom_ren_2sm_pct", "ent_lix_dom_ren_meiosm_pct", "ent_lix_dom_sex_fem_res_pct", "ent_lix_dom_sex_mas_res_pct", "ent_lix_dom_tot_dom_pct", "ent_lix_mor_cor_ama_pct", "ent_lix_mor_cor_bra_pct", "ent_lix_mor_cor_ind_pct", "ent_lix_mor_cor_neg_pct", "ent_lix_mor_ren_12sm_pct", "ent_lix_mor_ren_1sm_pct", "ent_lix_mor_ren_2sm_pct", "ent_lix_mor_ren_meiosm_pct", "ent_lix_mor_sex_fem_res_pct", "ent_lix_mor_sex_mas_res_pct", "ent_lix_mor_tot_dom_pct", "ent_mei_dom_ren_12sm_pct", "ent_mei_dom_ren_1sm_pct", "ent_mei_dom_ren_2sm_pct", "ent_mei_dom_ren_meiosm_pct", "ent_mei_dom_sex_fem_res_pct", "ent_mei_dom_sex_mas_res_pct", "ent_mei_dom_tot_dom_pct", "ent_mei_mor_cor_ind_pct", "ent_mei_mor_cor_neg_pct", "ent_mei_mor_ren_12sm_pct", "ent_mei_mor_ren_1sm_pct", "ent_mei_mor_ren_2sm_pct", "ent_mei_mor_ren_meiosm_pct", "ent_mei_mor_sex_fem_res_pct", "ent_mei_mor_sex_mas_res_pct", "ent_mei_mor_tot_dom_pct", "ent_pav_dom_ren_12sm_pct", "ent_pav_dom_ren_1sm_pct", "ent_pav_dom_ren_2sm_pct", "ent_pav_dom_ren_meiosm_pct", "ent_pav_dom_sex_fem_res_pct", "ent_pav_dom_sex_mas_res_pct", "ent_pav_dom_tot_dom_pct", "ent_pav_mor_cor_ama_pct", "ent_pav_mor_cor_bra_pct", "ent_pav_mor_cor_ind_pct", "ent_pav_mor_cor_neg_pct", "ent_pav_mor_ren_12sm_pct", "ent_pav_mor_ren_1sm_pct", "ent_pav_mor_ren_2sm_pct", "ent_pav_mor_ren_meiosm_pct", "ent_pav_mor_sex_fem_res_pct", "ent_pav_mor_sex_mas_res_pct", "ent_pav_mor_tot_dom_pct", "ent_ram_dom_ren_12sm_pct", "ent_ram_dom_ren_1sm_pct", "ent_ram_dom_ren_2sm_pct", "ent_ram_dom_ren_meiosm_pct", "ent_ram_dom_sex_fem_res_pct", "ent_ram_dom_sex_mas_res_pct", "ent_ram_dom_tot_dom_pct", "ent_ram_mor_cor_ama_pct", "ent_ram_mor_cor_bra_pct", "ent_ram_mor_cor_ind_pct", "ent_ram_mor_cor_neg_pct", "ent_ram_mor_ren_12sm_pct", "ent_ram_mor_sex_fem_res_pct", "ent_ram_mor_tot_dom_pct", "pop_alf_mor_cor_10_14_ama_pct", "pop_alf_mor_cor_10_14_bra_pct", "pop_alf_mor_cor_10_14_ind_pct", "pop_alf_mor_cor_10_14_neg_pct", "pop_alf_mor_cor_sex_10_14_ama_fem_pct", "pop_alf_mor_cor_sex_10_14_ama_mas_pct", "pop_alf_mor_cor_sex_10_14_bra_fem_pct", "pop_alf_mor_cor_sex_10_14_bra_mas_pct", "pop_alf_mor_cor_sex_10_14_ind_fem_pct", "pop_alf_mor_cor_sex_10_14_ind_mas_pct", "pop_alf_mor_cor_sex_10_14_neg_fem_pct", "pop_alf_mor_cor_sex_10_14_neg_mas_pct", "pop_alf_mor_sex_10_14_fem_pct", "pop_alf_mor_sex_10_14_mas_pct", "pop_alf_mor_tot_10_14_pct", "pop_bas_mor_cor_0_4_ama_pct", "pop_bas_mor_cor_0_4_bra_pct", "pop_bas_mor_cor_0_4_ind_pct", "pop_bas_mor_cor_0_4_neg_pct", "pop_bas_mor_cor_10_14_ama_pct", "pop_bas_mor_cor_10_14_bra_pct", "pop_bas_mor_cor_10_14_ind_pct", "pop_bas_mor_cor_10_14_neg_pct", "pop_bas_mor_cor_15_19_ama_pct", "pop_bas_mor_cor_15_19_bra_pct", "pop_bas_mor_cor_15_19_ind_pct", "pop_bas_mor_cor_15_19_neg_pct", "pop_bas_mor_cor_20_59_ama_pct", "pop_bas_mor_cor_20_59_bra_pct", "pop_bas_mor_cor_20_59_ind_pct", "pop_bas_mor_cor_20_59_neg_pct", "pop_bas_mor_cor_5_9_ama_pct", "pop_bas_mor_cor_5_9_bra_pct", "pop_bas_mor_cor_5_9_ind_pct", "pop_bas_mor_cor_5_9_neg_pct", "pop_bas_mor_cor_60_mais_ama_pct", "pop_bas_mor_cor_60_mais_bra_pct", "pop_bas_mor_cor_60_mais_ind_pct", "pop_bas_mor_cor_60_mais_neg_pct", "pop_bas_mor_cor_ama_pct", "pop_bas_mor_cor_bra_pct", "pop_bas_mor_cor_ind_pct", "pop_bas_mor_cor_neg_pct", "pop_bas_mor_cor_sex_10_14_ama_fem_pct", "pop_bas_mor_cor_sex_10_14_ama_mas_pct", "pop_bas_mor_cor_sex_10_14_bra_fem_pct", "pop_bas_mor_cor_sex_10_14_bra_mas_pct", "pop_bas_mor_cor_sex_10_14_ind_fem_pct", "pop_bas_mor_cor_sex_10_14_ind_mas_pct", "pop_bas_mor_cor_sex_10_14_neg_fem_pct", "pop_bas_mor_cor_sex_10_14_neg_mas_pct", "pop_bas_mor_cor_sex_15_19_ama_fem_pct", "pop_bas_mor_cor_sex_15_19_ama_mas_pct", "pop_bas_mor_cor_sex_15_19_bra_fem_pct", "pop_bas_mor_cor_sex_15_19_bra_mas_pct", "pop_bas_mor_cor_sex_15_19_ind_fem_pct", "pop_bas_mor_cor_sex_15_19_ind_mas_pct", "pop_bas_mor_cor_sex_15_19_neg_fem_pct", "pop_bas_mor_cor_sex_15_19_neg_mas_pct", "pop_bas_mor_cor_sex_20_59_ama_fem_pct", "pop_bas_mor_cor_sex_20_59_ama_mas_pct", "pop_bas_mor_cor_sex_20_59_bra_fem_pct", "pop_bas_mor_cor_sex_20_59_bra_mas_pct", "pop_bas_mor_cor_sex_20_59_ind_fem_pct", "pop_bas_mor_cor_sex_20_59_ind_mas_pct", "pop_bas_mor_cor_sex_20_59_neg_fem_pct", "pop_bas_mor_cor_sex_20_59_neg_mas_pct", "pop_bas_mor_cor_sex_5_9_ama_fem_pct", "pop_bas_mor_cor_sex_5_9_ama_mas_pct", "pop_bas_mor_cor_sex_5_9_bra_fem_pct", "pop_bas_mor_cor_sex_5_9_bra_mas_pct", "pop_bas_mor_cor_sex_5_9_ind_fem_pct", "pop_bas_mor_cor_sex_5_9_ind_mas_pct", "pop_bas_mor_cor_sex_5_9_neg_fem_pct", "pop_bas_mor_cor_sex_5_9_neg_mas_pct", "pop_bas_mor_cor_sex_60_mais_ama_fem_pct", "pop_bas_mor_cor_sex_60_mais_ama_mas_pct", "pop_bas_mor_cor_sex_60_mais_bra_fem_pct", "pop_bas_mor_cor_sex_60_mais_bra_mas_pct", "pop_bas_mor_cor_sex_60_mais_ind_fem_pct", "pop_bas_mor_cor_sex_60_mais_ind_mas_pct", "pop_bas_mor_cor_sex_60_mais_neg_fem_pct", "pop_bas_mor_cor_sex_60_mais_neg_mas_pct", "pop_bas_mor_cor_sex_ama_fem_pct", "pop_bas_mor_cor_sex_ama_mas_pct", "pop_bas_mor_cor_sex_bra_fem_pct", "pop_bas_mor_cor_sex_bra_mas_pct", "pop_bas_mor_cor_sex_ind_mas_pct", "pop_bas_mor_cor_sex_neg_fem_pct", "pop_bas_mor_cor_sex_neg_mas_pct", "pop_bas_mor_sex_0_4_fem_pct", "pop_bas_mor_sex_0_4_mas_pct", "pop_bas_mor_sex_10_14_fem_pct", "pop_bas_mor_sex_10_14_mas_pct", "pop_bas_mor_sex_15_19_fem_pct", "pop_bas_mor_sex_15_19_mas_pct", "pop_bas_mor_sex_20_59_fem_pct", "pop_bas_mor_sex_20_59_mas_pct", "pop_bas_mor_sex_5_9_fem_pct", "pop_bas_mor_sex_5_9_mas_pct", "pop_bas_mor_sex_60_mais_fem_pct", "pop_bas_mor_sex_60_mais_mas_pct", "pop_bas_mor_sex_fem_pct", "pop_bas_mor_sex_mas_pct", "pop_bas_mor_sex_res_fem_pct", "pop_bas_mor_sex_res_mas_pct", "pop_bas_mor_tot_0_4_pct", "pop_bas_mor_tot_10_14_pct", "pop_bas_mor_tot_15_19_pct", "pop_bas_mor_tot_20_59_pct", "pop_bas_mor_tot_5_9_pct", "pop_bas_mor_tot_60_mais_pct", "pop_bas_mor_tot_pes_pct", "pop_bas_mor_tot_res_pct", "pop_ren_mor_ren_10anos_0sm_pct", "pop_ren_mor_ren_10anos_10sm_pct", "pop_ren_mor_ren_10anos_15sm_pct", "pop_ren_mor_ren_10anos_1sm_pct", "pop_ren_mor_ren_10anos_20msm_pct", "pop_ren_mor_ren_10anos_20sm_pct", "pop_ren_mor_ren_10anos_2sm_pct", "pop_ren_mor_ren_10anos_3sm_pct", "pop_ren_mor_ren_10anos_5sm_pct", "pop_ren_mor_ren_10anos_meiosm_pct", "pop_ren_mor_ren_res_0sm_pct", "pop_ren_mor_ren_res_10sm_pct", "pop_ren_mor_ren_res_15sm_pct", "pop_ren_mor_ren_res_1sm_pct", "pop_ren_mor_ren_res_20msm_pct", "pop_ren_mor_ren_res_20sm_pct", "pop_ren_mor_ren_res_2sm_pct", "pop_ren_mor_ren_res_3sm_pct", "pop_ren_mor_ren_res_5sm_pct", "pop_ren_mor_ren_res_meiosm_pct", "pop_ren_mor_ren_sex_10anos_0sm_fem_pct", "pop_ren_mor_ren_sex_10anos_0sm_mas_pct", "pop_ren_mor_ren_sex_10anos_10sm_fem_pct", "pop_ren_mor_ren_sex_10anos_10sm_mas_pct", "pop_ren_mor_ren_sex_10anos_15sm_fem_pct", "pop_ren_mor_ren_sex_10anos_15sm_mas_pct", "pop_ren_mor_ren_sex_10anos_1sm_fem_pct", "pop_ren_mor_ren_sex_10anos_1sm_mas_pct", "pop_ren_mor_ren_sex_10anos_20msm_fem_pct", "pop_ren_mor_ren_sex_10anos_20msm_mas_pct", "pop_ren_mor_ren_sex_10anos_20sm_fem_pct", "pop_ren_mor_ren_sex_10anos_20sm_mas_pct", "pop_ren_mor_ren_sex_10anos_2sm_fem_pct", "pop_ren_mor_ren_sex_10anos_2sm_mas_pct", "pop_ren_mor_ren_sex_10anos_3sm_fem_pct", "pop_ren_mor_ren_sex_10anos_3sm_mas_pct", "pop_ren_mor_ren_sex_10anos_5sm_fem_pct", "pop_ren_mor_ren_sex_10anos_5sm_mas_pct", "pop_ren_mor_ren_sex_10anos_meiosm_fem_pct", "pop_ren_mor_ren_sex_10anos_meiosm_mas_pct", "pop_ren_mor_ren_sex_res_0sm_fem_pct", "pop_ren_mor_ren_sex_res_0sm_mas_pct", "pop_ren_mor_ren_sex_res_10sm_fem_pct", "pop_ren_mor_ren_sex_res_10sm_mas_pct", "pop_ren_mor_ren_sex_res_15sm_fem_pct", "pop_ren_mor_ren_sex_res_15sm_mas_pct", "pop_ren_mor_ren_sex_res_1sm_fem_pct", "pop_ren_mor_ren_sex_res_1sm_mas_pct", "pop_ren_mor_ren_sex_res_20msm_fem_pct", "pop_ren_mor_ren_sex_res_20msm_mas_pct", "pop_ren_mor_ren_sex_res_20sm_fem_pct", "pop_ren_mor_ren_sex_res_20sm_mas_pct", "pop_ren_mor_ren_sex_res_2sm_fem_pct", "pop_ren_mor_ren_sex_res_2sm_mas_pct", "pop_ren_mor_ren_sex_res_3sm_fem_pct", "pop_ren_mor_ren_sex_res_3sm_mas_pct", "pop_ren_mor_ren_sex_res_5sm_fem_pct", "pop_ren_mor_ren_sex_res_5sm_mas_pct", "pop_ren_mor_ren_sex_res_meiosm_fem_pct", "pop_ren_mor_ren_sex_res_meiosm_mas_pct", "dom_bas_dom_tot_dom", "dom_bas_dom_tot_dpp", "dom_bas_dom_tot_imp", "dom_bas_mor_sex_dpp_fem", "dom_bas_mor_sex_dpp_mas", "dom_bas_mor_tot_dom", "dom_bas_mor_tot_dpp", "dom_mor_dom_sex_6mor_fem", "dom_mor_dom_sex_6mor_mas", "dom_mor_dom_tot_6mor", "dom_mor_dom_tot_alu", "dom_mor_dom_tot_apt", "dom_mor_dom_tot_cas", "dom_mor_dom_tot_mor_ina", "dom_mor_dom_tot_pro", "dom_mor_mor_sex_alu_fem", "dom_mor_mor_sex_alu_mas", "dom_mor_mor_sex_apt_fem", "dom_mor_mor_sex_apt_mas", "dom_mor_mor_sex_cas_fem", "dom_mor_mor_sex_cas_mas", "dom_mor_mor_sex_pro_fem", "dom_mor_mor_sex_pro_mas", "dom_mor_mor_tot_alu", "dom_mor_mor_tot_apt", "dom_mor_mor_tot_cas", "dom_mor_mor_tot_med_mor", "dom_mor_mor_tot_mor_ina", "dom_mor_mor_tot_pro", "dom_ren_dom_tot_meiosm", "dom_ren_mor_tot_med", "dom_ren_mor_tot_med_res", "edu_pop_mor_tot_0_3", "edu_pop_mor_tot_11_14", "edu_pop_mor_tot_15_17", "edu_pop_mor_tot_4_5", "edu_pop_mor_tot_6_10", "ent_arb_dom_ren_12sm", "ent_arb_dom_ren_1sm", "ent_arb_dom_ren_2sm", "ent_arb_dom_ren_meiosm", "ent_arb_dom_sex_fem_res", "ent_arb_dom_sex_mas_res", "ent_arb_dom_tot_dom", "ent_arb_mor_cor_ama", "ent_arb_mor_cor_bra", "ent_arb_mor_cor_ind", "ent_arb_mor_cor_neg", "ent_arb_mor_ren_12sm", "ent_arb_mor_ren_1sm", "ent_arb_mor_ren_2sm", "ent_arb_mor_ren_meiosm", "ent_arb_mor_sex_fem_res", "ent_arb_mor_sex_mas_res", "ent_arb_mor_tot_dom", "ent_bue_dom_ren_12sm", "ent_bue_dom_ren_1sm", "ent_bue_dom_ren_2sm", "ent_bue_dom_ren_meiosm", "ent_bue_dom_sex_fem_res", "ent_bue_dom_sex_mas_res", "ent_bue_dom_tot_dom", "ent_bue_mor_cor_ama", "ent_bue_mor_cor_bra", "ent_bue_mor_cor_ind", "ent_bue_mor_cor_neg", "ent_bue_mor_ren_12sm", "ent_bue_mor_ren_1sm", "ent_bue_mor_ren_2sm", "ent_bue_mor_ren_meiosm", "ent_bue_mor_sex_fem_res", "ent_bue_mor_sex_mas_res", "ent_bue_mor_tot_dom", "ent_cal_dom_ren_12sm", "ent_cal_dom_ren_1sm", "ent_cal_dom_ren_2sm", "ent_cal_dom_ren_meiosm", "ent_cal_dom_sex_fem_res", "ent_cal_dom_sex_mas_res", "ent_cal_dom_tot_dom", "ent_cal_mor_cor_ama", "ent_cal_mor_cor_bra", "ent_cal_mor_cor_ind", "ent_cal_mor_cor_neg", "ent_cal_mor_ren_12sm", "ent_cal_mor_ren_1sm", "ent_cal_mor_ren_2sm", "ent_cal_mor_ren_meiosm", "ent_cal_mor_sex_fem_res", "ent_cal_mor_sex_mas_res", "ent_cal_mor_tot_dom", "ent_esg_dom_ren_12sm", "ent_esg_dom_ren_1sm", "ent_esg_dom_ren_2sm", "ent_esg_dom_ren_meiosm", "ent_esg_dom_sex_fem_res", "ent_esg_dom_sex_mas_res", "ent_esg_mor_cor_ama", "ent_esg_mor_cor_bra", "ent_esg_mor_cor_ind", "ent_esg_mor_cor_neg", "ent_esg_mor_ren_12sm", "ent_esg_mor_ren_1sm", "ent_esg_mor_ren_2sm", "ent_esg_mor_ren_meiosm", "ent_esg_mor_sex_fem_res", "ent_esg_mor_sex_mas_res", "ent_esg_mor_tot_dom", "ent_ide_dom_ren_12sm", "ent_ide_dom_ren_1sm", "ent_ide_dom_ren_2sm", "ent_ide_dom_ren_meiosm", "ent_ide_dom_sex_fem_res", "ent_ide_dom_sex_mas_res", "ent_ide_dom_tot_dom", "ent_ide_mor_cor_ind", "ent_ide_mor_cor_neg", "ent_ide_mor_ren_12sm", "ent_ide_mor_ren_1sm", "ent_ide_mor_ren_2sm", "ent_ide_mor_ren_meiosm", "ent_ide_mor_sex_fem_res", "ent_ide_mor_sex_mas_res", "ent_ide_mor_tot_dom", "ent_ilu_dom_ren_12sm", "ent_ilu_dom_ren_1sm", "ent_ilu_dom_ren_2sm", "ent_ilu_dom_ren_meiosm", "ent_ilu_dom_sex_fem_res", "ent_ilu_dom_sex_mas_res", "ent_ilu_dom_tot_dom", "ent_ilu_mor_cor_ama", "ent_ilu_mor_cor_bra", "ent_ilu_mor_cor_ind", "ent_ilu_mor_cor_neg", "ent_ilu_mor_ren_12sm", "ent_ilu_mor_ren_1sm", "ent_ilu_mor_ren_2sm", "ent_ilu_mor_ren_meiosm", "ent_ilu_mor_sex_fem_res", "ent_ilu_mor_sex_mas_res", "ent_ilu_mor_tot_dom", "ent_lix_dom_ren_12sm", "ent_lix_dom_ren_1sm", "ent_lix_dom_ren_2sm", "ent_lix_dom_ren_meiosm", "ent_lix_dom_sex_fem_res", "ent_lix_dom_sex_mas_res", "ent_lix_dom_tot_dom", "ent_lix_mor_cor_ama", "ent_lix_mor_cor_bra", "ent_lix_mor_cor_ind", "ent_lix_mor_cor_neg", "ent_lix_mor_ren_12sm", "ent_lix_mor_ren_1sm", "ent_lix_mor_ren_2sm", "ent_lix_mor_ren_meiosm", "ent_lix_mor_sex_fem_res", "ent_lix_mor_sex_mas_res", "ent_lix_mor_tot_dom", "ent_mei_dom_ren_12sm", "ent_mei_dom_ren_1sm", "ent_mei_dom_ren_2sm", "ent_mei_dom_ren_meiosm", "ent_mei_dom_sex_fem_res", "ent_mei_dom_sex_mas_res", "ent_mei_dom_tot_dom", "ent_mei_mor_cor_ind", "ent_mei_mor_cor_neg", "ent_mei_mor_ren_12sm", "ent_mei_mor_ren_1sm", "ent_mei_mor_ren_2sm", "ent_mei_mor_ren_meiosm", "ent_mei_mor_sex_fem_res", "ent_mei_mor_sex_mas_res", "ent_mei_mor_tot_dom", "ent_pav_dom_ren_12sm", "ent_pav_dom_ren_1sm", "ent_pav_dom_ren_2sm", "ent_pav_dom_ren_meiosm", "ent_pav_dom_sex_fem_res", "ent_pav_dom_sex_mas_res", "ent_pav_dom_tot_dom", "ent_pav_mor_cor_ama", "ent_pav_mor_cor_bra", "ent_pav_mor_cor_ind", "ent_pav_mor_cor_neg", "ent_pav_mor_ren_12sm", "ent_pav_mor_ren_1sm", "ent_pav_mor_ren_2sm", "ent_pav_mor_ren_meiosm", "ent_pav_mor_sex_fem_res", "ent_pav_mor_sex_mas_res", "ent_pav_mor_tot_dom", "ent_ram_dom_ren_12sm", "ent_ram_dom_ren_1sm", "ent_ram_dom_ren_2sm", "ent_ram_dom_ren_meiosm", "ent_ram_dom_sex_fem_res", "ent_ram_dom_sex_mas_res", "ent_ram_dom_tot_dom", "ent_ram_mor_cor_ama", "ent_ram_mor_cor_bra", "ent_ram_mor_cor_ind", "ent_ram_mor_cor_neg", "ent_ram_mor_ren_12sm", "ent_ram_mor_sex_fem_res", "ent_ram_mor_tot_dom", "pop_alf_mor_cor_10_14_ama", "pop_alf_mor_cor_10_14_bra", "pop_alf_mor_cor_10_14_ind", "pop_alf_mor_cor_10_14_neg", "pop_alf_mor_cor_sex_10_14_ama_fem", "pop_alf_mor_cor_sex_10_14_ama_mas", "pop_alf_mor_cor_sex_10_14_bra_fem", "pop_alf_mor_cor_sex_10_14_bra_mas", "pop_alf_mor_cor_sex_10_14_ind_fem", "pop_alf_mor_cor_sex_10_14_ind_mas", "pop_alf_mor_cor_sex_10_14_neg_fem", "pop_alf_mor_cor_sex_10_14_neg_mas", "pop_alf_mor_sex_10_14_fem", "pop_alf_mor_sex_10_14_mas", "pop_alf_mor_tot_10_14", "pop_bas_mor_cor_0_4_ama", "pop_bas_mor_cor_0_4_bra", "pop_bas_mor_cor_0_4_ind", "pop_bas_mor_cor_0_4_neg", "pop_bas_mor_cor_10_14_ama", "pop_bas_mor_cor_10_14_bra", "pop_bas_mor_cor_10_14_ind", "pop_bas_mor_cor_10_14_neg", "pop_bas_mor_cor_15_19_ama", "pop_bas_mor_cor_15_19_bra", "pop_bas_mor_cor_15_19_ind", "pop_bas_mor_cor_15_19_neg", "pop_bas_mor_cor_20_59_ama", "pop_bas_mor_cor_20_59_bra", "pop_bas_mor_cor_20_59_ind", "pop_bas_mor_cor_20_59_neg", "pop_bas_mor_cor_5_9_ama", "pop_bas_mor_cor_5_9_bra", "pop_bas_mor_cor_5_9_ind", "pop_bas_mor_cor_5_9_neg", "pop_bas_mor_cor_60_mais_ama", "pop_bas_mor_cor_60_mais_bra", "pop_bas_mor_cor_60_mais_ind", "pop_bas_mor_cor_60_mais_neg", "pop_bas_mor_cor_ama", "pop_bas_mor_cor_bra", "pop_bas_mor_cor_ind", "pop_bas_mor_cor_neg", "pop_bas_mor_cor_sex_10_14_ama_fem", "pop_bas_mor_cor_sex_10_14_ama_mas", "pop_bas_mor_cor_sex_10_14_bra_fem", "pop_bas_mor_cor_sex_10_14_bra_mas", "pop_bas_mor_cor_sex_10_14_ind_fem", "pop_bas_mor_cor_sex_10_14_ind_mas", "pop_bas_mor_cor_sex_10_14_neg_fem", "pop_bas_mor_cor_sex_10_14_neg_mas", "pop_bas_mor_cor_sex_15_19_ama_fem", "pop_bas_mor_cor_sex_15_19_ama_mas", "pop_bas_mor_cor_sex_15_19_bra_fem", "pop_bas_mor_cor_sex_15_19_bra_mas", "pop_bas_mor_cor_sex_15_19_ind_fem", "pop_bas_mor_cor_sex_15_19_ind_mas", "pop_bas_mor_cor_sex_15_19_neg_fem", "pop_bas_mor_cor_sex_15_19_neg_mas", "pop_bas_mor_cor_sex_20_59_ama_fem", "pop_bas_mor_cor_sex_20_59_ama_mas", "pop_bas_mor_cor_sex_20_59_bra_fem", "pop_bas_mor_cor_sex_20_59_bra_mas", "pop_bas_mor_cor_sex_20_59_ind_fem", "pop_bas_mor_cor_sex_20_59_ind_mas", "pop_bas_mor_cor_sex_20_59_neg_fem", "pop_bas_mor_cor_sex_20_59_neg_mas", "pop_bas_mor_cor_sex_5_9_ama_fem", "pop_bas_mor_cor_sex_5_9_ama_mas", "pop_bas_mor_cor_sex_5_9_bra_fem", "pop_bas_mor_cor_sex_5_9_bra_mas", "pop_bas_mor_cor_sex_5_9_ind_fem", "pop_bas_mor_cor_sex_5_9_ind_mas", "pop_bas_mor_cor_sex_5_9_neg_fem", "pop_bas_mor_cor_sex_5_9_neg_mas", "pop_bas_mor_cor_sex_60_mais_ama_fem", "pop_bas_mor_cor_sex_60_mais_ama_mas", "pop_bas_mor_cor_sex_60_mais_bra_fem", "pop_bas_mor_cor_sex_60_mais_bra_mas", "pop_bas_mor_cor_sex_60_mais_ind_fem", "pop_bas_mor_cor_sex_60_mais_ind_mas", "pop_bas_mor_cor_sex_60_mais_neg_fem", "pop_bas_mor_cor_sex_60_mais_neg_mas", "pop_bas_mor_cor_sex_ama_fem", "pop_bas_mor_cor_sex_ama_mas", "pop_bas_mor_cor_sex_bra_fem", "pop_bas_mor_cor_sex_bra_mas", "pop_bas_mor_cor_sex_ind_mas", "pop_bas_mor_cor_sex_neg_fem", "pop_bas_mor_cor_sex_neg_mas", "pop_bas_mor_sex_0_4_fem", "pop_bas_mor_sex_0_4_mas", "pop_bas_mor_sex_10_14_fem", "pop_bas_mor_sex_10_14_mas", "pop_bas_mor_sex_15_19_fem", "pop_bas_mor_sex_15_19_mas", "pop_bas_mor_sex_20_59_fem", "pop_bas_mor_sex_20_59_mas", "pop_bas_mor_sex_5_9_fem", "pop_bas_mor_sex_5_9_mas", "pop_bas_mor_sex_60_mais_fem", "pop_bas_mor_sex_60_mais_mas", "pop_bas_mor_sex_fem", "pop_bas_mor_sex_mas", "pop_bas_mor_sex_res_fem", "pop_bas_mor_sex_res_mas", "pop_bas_mor_tot_0_4", "pop_bas_mor_tot_10_14", "pop_bas_mor_tot_15_19", "pop_bas_mor_tot_20_59", "pop_bas_mor_tot_5_9", "pop_bas_mor_tot_60_mais", "pop_bas_mor_tot_pes", "pop_bas_mor_tot_res", "pop_ren_mor_ren_10anos_0sm", "pop_ren_mor_ren_10anos_10sm", "pop_ren_mor_ren_10anos_15sm", "pop_ren_mor_ren_10anos_1sm", "pop_ren_mor_ren_10anos_20msm", "pop_ren_mor_ren_10anos_20sm", "pop_ren_mor_ren_10anos_2sm", "pop_ren_mor_ren_10anos_3sm", "pop_ren_mor_ren_10anos_5sm", "pop_ren_mor_ren_10anos_meiosm", "pop_ren_mor_ren_res_0sm", "pop_ren_mor_ren_res_10sm", "pop_ren_mor_ren_res_15sm", "pop_ren_mor_ren_res_1sm", "pop_ren_mor_ren_res_20msm", "pop_ren_mor_ren_res_20sm", "pop_ren_mor_ren_res_2sm", "pop_ren_mor_ren_res_3sm", "pop_ren_mor_ren_res_5sm", "pop_ren_mor_ren_res_meiosm", "pop_ren_mor_ren_sex_10anos_0sm_fem", "pop_ren_mor_ren_sex_10anos_0sm_mas", "pop_ren_mor_ren_sex_10anos_10sm_fem", "pop_ren_mor_ren_sex_10anos_10sm_mas", "pop_ren_mor_ren_sex_10anos_15sm_fem", "pop_ren_mor_ren_sex_10anos_15sm_mas", "pop_ren_mor_ren_sex_10anos_1sm_fem", "pop_ren_mor_ren_sex_10anos_1sm_mas", "pop_ren_mor_ren_sex_10anos_20msm_fem", "pop_ren_mor_ren_sex_10anos_20msm_mas", "pop_ren_mor_ren_sex_10anos_20sm_fem", "pop_ren_mor_ren_sex_10anos_20sm_mas", "pop_ren_mor_ren_sex_10anos_2sm_fem", "pop_ren_mor_ren_sex_10anos_2sm_mas", "pop_ren_mor_ren_sex_10anos_3sm_fem", "pop_ren_mor_ren_sex_10anos_3sm_mas", "pop_ren_mor_ren_sex_10anos_5sm_fem", "pop_ren_mor_ren_sex_10anos_5sm_mas", "pop_ren_mor_ren_sex_10anos_meiosm_fem", "pop_ren_mor_ren_sex_10anos_meiosm_mas", "pop_ren_mor_ren_sex_res_0sm_fem", "pop_ren_mor_ren_sex_res_0sm_mas", "pop_ren_mor_ren_sex_res_10sm_fem", "pop_ren_mor_ren_sex_res_10sm_mas", "pop_ren_mor_ren_sex_res_15sm_fem", "pop_ren_mor_ren_sex_res_15sm_mas", "pop_ren_mor_ren_sex_res_1sm_fem", "pop_ren_mor_ren_sex_res_1sm_mas", "pop_ren_mor_ren_sex_res_20msm_fem", "pop_ren_mor_ren_sex_res_20msm_mas", "pop_ren_mor_ren_sex_res_20sm_fem", "pop_ren_mor_ren_sex_res_20sm_mas", "pop_ren_mor_ren_sex_res_2sm_fem", "pop_ren_mor_ren_sex_res_2sm_mas", "pop_ren_mor_ren_sex_res_3sm_fem", "pop_ren_mor_ren_sex_res_3sm_mas", "pop_ren_mor_ren_sex_res_5sm_fem", "pop_ren_mor_ren_sex_res_5sm_mas", "pop_ren_mor_ren_sex_res_meiosm_fem", "pop_ren_mor_ren_sex_res_meiosm_mas", "ser_agu_dom_tot_dom", "ser_agu_mor_sex_fem", "ser_agu_mor_sex_mas", "ser_agu_mor_tot_dom", "ser_ene_dom_tot_dom", "ser_ene_mor_sex_fem", "ser_ene_mor_sex_mas", "ser_ene_mor_tot_dom", "ser_esg_dom_tot_dom", "ser_esg_mor_sex_fem", "ser_esg_mor_sex_mas", "ser_esg_mor_tot_dom", "ser_lix_dom_tot_dom", "ser_lix_mor_sex_fem", "ser_lix_mor_sex_mas", "ser_lix_mor_tot_dom"];
5176
1915
  var ibge_malha_br_setor_censitario_2010 = {
5177
1916
  variable_ids: variable_ids$1
5178
1917
  };
5179
1918
 
5180
- var variable_ids = ["dom_bas_dom_tot_dom_pct", "dom_bas_dom_tot_dpp_pct", "dom_bas_dom_tot_imp_pct", "dom_bas_mor_sex_dpp_fem_pct", "dom_bas_mor_sex_dpp_mas_pct", "dom_bas_mor_tot_dom_pct", "dom_bas_mor_tot_dpp_pct", "dom_mor_dom_tot_6mor_pct", "dom_mor_dom_tot_apt_pct", "dom_mor_dom_tot_cas_pct", "dom_mor_mor_sex_apt_fem_pct", "dom_mor_mor_sex_apt_mas_pct", "dom_mor_mor_sex_cas_fem_pct", "dom_mor_mor_sex_cas_mas_pct", "dom_mor_mor_tot_apt_pct", "dom_mor_mor_tot_cas_pct", "dom_mor_mor_tot_med_mor_pct", "pop_bas_mor_cor_ama_pct", "pop_bas_mor_cor_bra_pct", "pop_bas_mor_cor_ind_pct", "pop_bas_mor_cor_neg_pct", "pop_bas_mor_cor_res_ama_pct", "pop_bas_mor_cor_res_bra_pct", "pop_bas_mor_cor_res_ind_pct", "pop_bas_mor_cor_res_neg_pct", "pop_bas_mor_cor_sex_ama_fem_pct", "pop_bas_mor_cor_sex_ama_mas_pct", "pop_bas_mor_cor_sex_bra_fem_pct", "pop_bas_mor_cor_sex_bra_mas_pct", "pop_bas_mor_cor_sex_ind_mas_pct", "pop_bas_mor_cor_sex_neg_fem_pct", "pop_bas_mor_cor_sex_neg_mas_pct", "pop_bas_mor_cor_sex_res_ama_fem_pct", "pop_bas_mor_cor_sex_res_ama_mas_pct", "pop_bas_mor_cor_sex_res_bra_fem_pct", "pop_bas_mor_cor_sex_res_bra_mas_pct", "pop_bas_mor_cor_sex_res_ind_fem_pct", "pop_bas_mor_cor_sex_res_ind_mas_pct", "pop_bas_mor_cor_sex_res_neg_fem_pct", "pop_bas_mor_cor_sex_res_neg_mas_pct", "pop_bas_mor_sex_0_4_fem_pct", "pop_bas_mor_sex_0_4_mas_pct", "pop_bas_mor_sex_10_14_fem_pct", "pop_bas_mor_sex_10_14_mas_pct", "pop_bas_mor_sex_15_19_fem_pct", "pop_bas_mor_sex_15_19_mas_pct", "pop_bas_mor_sex_20_59_fem_pct", "pop_bas_mor_sex_20_59_mas_pct", "pop_bas_mor_sex_5_9_fem_pct", "pop_bas_mor_sex_5_9_mas_pct", "pop_bas_mor_sex_60_mais_fem_pct", "pop_bas_mor_sex_60_mais_mas_pct", "pop_bas_mor_sex_fem_pct", "pop_bas_mor_sex_mas_pct", "pop_bas_mor_sex_res_fem_pct", "pop_bas_mor_sex_res_mas_pct", "pop_bas_mor_tot_0_4_pct", "pop_bas_mor_tot_10_14_pct", "pop_bas_mor_tot_15_19_pct", "pop_bas_mor_tot_20_59_pct", "pop_bas_mor_tot_5_9_pct", "pop_bas_mor_tot_60_mais_pct", "pop_bas_mor_tot_pes_pct", "pop_bas_mor_tot_res_pct", "ser_agu_dom_tot_dom_pct", "ser_agu_mor_sex_fem_pct", "ser_agu_mor_sex_mas_pct", "ser_agu_mor_tot_dom_pct", "ser_esg_dom_tot_dom_pct", "ser_esg_mor_sex_fem_pct", "ser_esg_mor_sex_mas_pct", "ser_esg_mor_tot_dom_pct", "ser_lix_dom_tot_dom_pct", "ser_lix_mor_sex_fem_pct", "ser_lix_mor_sex_mas_pct", "ser_lix_mor_tot_dom_pct", "dom_mor_mor_tot_med_mor", "pop_bas_mor_tot_pes", "pop_bas_mor_sex_mas", "pop_bas_mor_sex_fem", "ser_lix_dom_tot_dom", "ser_lix_mor_tot_dom", "ser_lix_mor_sex_mas", "ser_lix_mor_sex_fem", "ser_agu_dom_tot_dom", "ser_esg_dom_tot_dom", "ser_esg_mor_tot_dom", "ser_esg_mor_sex_mas", "ser_esg_mor_sex_fem", "dom_bas_mor_tot_dpp", "ser_agu_mor_tot_dom", "dom_bas_mor_tot_dom", "dom_bas_mor_sex_dpp_mas", "ser_agu_mor_sex_mas", "dom_bas_mor_sex_dpp_fem", "ser_agu_mor_sex_fem", "dom_mor_dom_tot_6mor", "dom_mor_mor_tot_cas", "dom_mor_mor_tot_apt", "dom_mor_mor_sex_cas_mas", "dom_mor_mor_sex_apt_mas", "dom_mor_mor_sex_cas_fem", "dom_mor_mor_sex_apt_fem", "nome_bairro", "nome_distrito", "nome_municipio", "nome_subdistrito", "nome_uf", "pop_bas_mor_tot_res", "pop_bas_mor_sex_res_mas", "pop_bas_mor_sex_res_fem", "dom_bas_dom_tot_dpp", "dom_bas_dom_tot_dom", "dom_bas_dom_tot_imp", "dom_mor_dom_tot_cas", "dom_mor_dom_tot_apt", "pop_bas_mor_sex_0_4_mas", "pop_bas_mor_sex_5_9_mas", "pop_bas_mor_sex_10_14_mas", "pop_bas_mor_sex_15_19_mas", "pop_bas_mor_sex_20_59_mas", "pop_bas_mor_sex_60_mais_mas", "pop_bas_mor_sex_0_4_fem", "pop_bas_mor_sex_5_9_fem", "pop_bas_mor_sex_10_14_fem", "pop_bas_mor_sex_15_19_fem", "pop_bas_mor_sex_20_59_fem", "pop_bas_mor_sex_60_mais_fem", "pop_bas_mor_tot_0_4", "pop_bas_mor_tot_5_9", "pop_bas_mor_tot_10_14", "pop_bas_mor_tot_15_19", "pop_bas_mor_tot_20_59", "pop_bas_mor_tot_60_mais", "pop_bas_mor_cor_bra", "pop_bas_mor_cor_neg", "pop_bas_mor_cor_ama", "pop_bas_mor_cor_ind", "pop_bas_mor_cor_sex_bra_mas", "pop_bas_mor_cor_sex_ind_mas", "pop_bas_mor_cor_sex_neg_mas", "pop_bas_mor_cor_sex_ama_mas", "pop_bas_mor_cor_sex_bra_fem", "pop_bas_mor_cor_sex_neg_fem", "pop_bas_mor_cor_sex_ama_fem", "pop_bas_mor_cor_res_bra", "pop_bas_mor_cor_res_neg", "pop_bas_mor_cor_res_ama", "pop_bas_mor_cor_res_ind", "pop_bas_mor_cor_sex_res_bra_mas", "pop_bas_mor_cor_sex_res_bra_fem", "pop_bas_mor_cor_sex_res_neg_mas", "pop_bas_mor_cor_sex_res_neg_fem", "pop_bas_mor_cor_sex_res_ama_mas", "pop_bas_mor_cor_sex_res_ama_fem", "pop_bas_mor_cor_sex_res_ind_mas", "pop_bas_mor_cor_sex_res_ind_fem", "pop_bas_mor_cor_60_mais_bra", "pop_bas_mor_cor_60_mais_neg", "pop_bas_mor_cor_60_mais_ama", "pop_bas_mor_cor_60_mais_ind"];
1919
+ var variable_ids = ["dom_bas_dom_tot_dom_pct", "dom_bas_dom_tot_dpp_pct", "dom_bas_dom_tot_imp_pct", "dom_bas_mor_sex_dpp_fem_pct", "dom_bas_mor_sex_dpp_mas_pct", "dom_bas_mor_tot_dom_pct", "dom_bas_mor_tot_dpp_pct", "dom_mor_dom_tot_6mor_pct", "dom_mor_dom_tot_apt_pct", "dom_mor_dom_tot_cas_pct", "dom_mor_mor_sex_apt_fem_pct", "dom_mor_mor_sex_apt_mas_pct", "dom_mor_mor_sex_cas_fem_pct", "dom_mor_mor_sex_cas_mas_pct", "dom_mor_mor_tot_apt_pct", "dom_mor_mor_tot_cas_pct", "dom_mor_mor_tot_med_mor_pct", "pop_bas_mor_cor_ama_pct", "pop_bas_mor_cor_bra_pct", "pop_bas_mor_cor_ind_pct", "pop_bas_mor_cor_neg_pct", "pop_bas_mor_cor_res_ama_pct", "pop_bas_mor_cor_res_bra_pct", "pop_bas_mor_cor_res_ind_pct", "pop_bas_mor_cor_res_neg_pct", "pop_bas_mor_cor_sex_ama_fem_pct", "pop_bas_mor_cor_sex_ama_mas_pct", "pop_bas_mor_cor_sex_bra_fem_pct", "pop_bas_mor_cor_sex_bra_mas_pct", "pop_bas_mor_cor_sex_ind_mas_pct", "pop_bas_mor_cor_sex_neg_fem_pct", "pop_bas_mor_cor_sex_neg_mas_pct", "pop_bas_mor_cor_sex_res_ama_fem_pct", "pop_bas_mor_cor_sex_res_ama_mas_pct", "pop_bas_mor_cor_sex_res_bra_fem_pct", "pop_bas_mor_cor_sex_res_bra_mas_pct", "pop_bas_mor_cor_sex_res_ind_fem_pct", "pop_bas_mor_cor_sex_res_ind_mas_pct", "pop_bas_mor_cor_sex_res_neg_fem_pct", "pop_bas_mor_cor_sex_res_neg_mas_pct", "pop_bas_mor_sex_0_4_fem_pct", "pop_bas_mor_sex_0_4_mas_pct", "pop_bas_mor_sex_10_14_fem_pct", "pop_bas_mor_sex_10_14_mas_pct", "pop_bas_mor_sex_15_19_fem_pct", "pop_bas_mor_sex_15_19_mas_pct", "pop_bas_mor_sex_20_59_fem_pct", "pop_bas_mor_sex_20_59_mas_pct", "pop_bas_mor_sex_5_9_fem_pct", "pop_bas_mor_sex_5_9_mas_pct", "pop_bas_mor_sex_60_mais_fem_pct", "pop_bas_mor_sex_60_mais_mas_pct", "pop_bas_mor_sex_fem_pct", "pop_bas_mor_sex_mas_pct", "pop_bas_mor_sex_res_fem_pct", "pop_bas_mor_sex_res_mas_pct", "pop_bas_mor_tot_0_4_pct", "pop_bas_mor_tot_10_14_pct", "pop_bas_mor_tot_15_19_pct", "pop_bas_mor_tot_20_59_pct", "pop_bas_mor_tot_5_9_pct", "pop_bas_mor_tot_60_mais_pct", "pop_bas_mor_tot_pes_pct", "pop_bas_mor_tot_res_pct", "ser_agu_dom_tot_dom_pct", "ser_agu_mor_sex_fem_pct", "ser_agu_mor_sex_mas_pct", "ser_agu_mor_tot_dom_pct", "ser_esg_dom_tot_dom_pct", "ser_esg_mor_sex_fem_pct", "ser_esg_mor_sex_mas_pct", "ser_esg_mor_tot_dom_pct", "ser_lix_dom_tot_dom_pct", "ser_lix_mor_sex_fem_pct", "ser_lix_mor_sex_mas_pct", "ser_lix_mor_tot_dom_pct", "dom_mor_mor_tot_med_mor", "pop_bas_mor_tot_pes", "pop_bas_mor_sex_mas", "pop_bas_mor_sex_fem", "ser_lix_dom_tot_dom", "ser_lix_mor_tot_dom", "ser_lix_mor_sex_mas", "ser_lix_mor_sex_fem", "ser_agu_dom_tot_dom", "ser_esg_dom_tot_dom", "ser_esg_mor_tot_dom", "ser_esg_mor_sex_mas", "ser_esg_mor_sex_fem", "dom_bas_mor_tot_dpp", "ser_agu_mor_tot_dom", "dom_bas_mor_tot_dom", "dom_bas_mor_sex_dpp_mas", "ser_agu_mor_sex_mas", "dom_bas_mor_sex_dpp_fem", "ser_agu_mor_sex_fem", "dom_mor_dom_tot_6mor", "dom_mor_mor_tot_cas", "dom_mor_mor_tot_apt", "dom_mor_mor_sex_cas_mas", "dom_mor_mor_sex_apt_mas", "dom_mor_mor_sex_cas_fem", "dom_mor_mor_sex_apt_fem", "nome_bairro", "nome_distrito", "nome_municipio", "nome_subdistrito", "nome_uf", "pop_bas_mor_tot_res", "pop_bas_mor_sex_res_mas", "pop_bas_mor_sex_res_fem", "dom_bas_dom_tot_dpp", "dom_bas_dom_tot_dom", "dom_bas_dom_tot_imp", "dom_mor_dom_tot_cas", "dom_mor_dom_tot_apt", "pop_bas_mor_sex_0_4_mas", "pop_bas_mor_sex_5_9_mas", "pop_bas_mor_sex_10_14_mas", "pop_bas_mor_sex_15_19_mas", "pop_bas_mor_sex_20_59_mas", "pop_bas_mor_sex_60_mais_mas", "pop_bas_mor_sex_0_4_fem", "pop_bas_mor_sex_5_9_fem", "pop_bas_mor_sex_10_14_fem", "pop_bas_mor_sex_15_19_fem", "pop_bas_mor_sex_20_59_fem", "pop_bas_mor_sex_60_mais_fem", "pop_bas_mor_tot_0_4", "pop_bas_mor_tot_5_9", "pop_bas_mor_tot_10_14", "pop_bas_mor_tot_15_19", "pop_bas_mor_tot_20_59", "pop_bas_mor_tot_60_mais", "pop_bas_mor_cor_bra", "pop_bas_mor_cor_neg", "pop_bas_mor_cor_ama", "pop_bas_mor_cor_ind", "pop_bas_mor_cor_sex_bra_mas", "pop_bas_mor_cor_sex_ind_mas", "pop_bas_mor_cor_sex_neg_mas", "pop_bas_mor_cor_sex_ama_mas", "pop_bas_mor_cor_sex_bra_fem", "pop_bas_mor_cor_sex_neg_fem", "pop_bas_mor_cor_sex_ama_fem", "pop_bas_mor_cor_res_bra", "pop_bas_mor_cor_res_neg", "pop_bas_mor_cor_res_ama", "pop_bas_mor_cor_res_ind", "pop_bas_mor_cor_sex_res_bra_mas", "pop_bas_mor_cor_sex_res_bra_fem", "pop_bas_mor_cor_sex_res_neg_mas", "pop_bas_mor_cor_sex_res_neg_fem", "pop_bas_mor_cor_sex_res_ama_mas", "pop_bas_mor_cor_sex_res_ama_fem", "pop_bas_mor_cor_sex_res_ind_mas", "pop_bas_mor_cor_sex_res_ind_fem", "pop_bas_mor_cor_60_mais_bra", "pop_bas_mor_cor_60_mais_neg", "pop_bas_mor_cor_60_mais_ama", "pop_bas_mor_cor_60_mais_ind", "dom_sem_arb_pct", "dom_sem_calcada_pct", "dom_sem_ilu_pub_pct"];
5181
1920
  var ibge_malha_br_setor_censitario_2022 = {
5182
1921
  variable_ids: variable_ids
5183
1922
  };
@@ -5206,1153 +1945,6 @@ function variableIdValidator(schema) {
5206
1945
  }
5207
1946
  });
5208
1947
 
5209
- var DEFAULT_BUFFER_SIZE = 200;
5210
- var INSUFFICIENT_DATA_COLOR = 'red';
5211
- var BUILDINGS_MIN_ZOOM = 14;
5212
- var BUILDINGS_3D_MIN_ZOOM = 16;
5213
-
5214
- //
5215
- //
5216
- //
5217
- function _applyBuffers(geometry) {
5218
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
5219
- _ref$bufferSize = _ref.bufferSize,
5220
- bufferSize = _ref$bufferSize === void 0 ? DEFAULT_BUFFER_SIZE : _ref$bufferSize;
5221
- switch (geometry === null || geometry === void 0 ? void 0 : geometry.type) {
5222
- case 'Point':
5223
- {
5224
- return buffer(geometry, bufferSize || DEFAULT_BUFFER_SIZE, {
5225
- units: 'meters'
5226
- }).geometry;
5227
- }
5228
- case 'LineString':
5229
- {
5230
- return buffer(geometry, bufferSize || DEFAULT_BUFFER_SIZE, {
5231
- units: 'meters'
5232
- }).geometry;
5233
- }
5234
- default:
5235
- {
5236
- return geometry;
5237
- }
5238
- }
5239
- }
5240
- function cem_censo_2010_2022(viewSpec, allViewSpecs, context) {
5241
- var collection_id = viewSpec.collection_id,
5242
- source_table_id = viewSpec.source_table_id,
5243
- indicator_path = viewSpec.indicator_path,
5244
- indicator_id = viewSpec.indicator_id,
5245
- indicator_label = viewSpec.indicator_label,
5246
- _viewSpec$year = viewSpec.year,
5247
- year = _viewSpec$year === void 0 ? collection_id.endsWith('2010') ? '2010' : '2022' : _viewSpec$year,
5248
- variable_id = viewSpec.variable_id,
5249
- metodology = viewSpec.metodology,
5250
- keywords = viewSpec.keywords,
5251
- variant_label = viewSpec.variant_label;
5252
- viewSpec.measure_unit;
5253
- viewSpec.variable_id_pct;
5254
- var variant_path = viewSpec.variant_path;
5255
- viewSpec.description;
5256
- viewSpec.preset;
5257
- var METADATA_API_ENDPOINT = context.METADATA_API_ENDPOINT,
5258
- VECTOR_TILE_SERVER_ENDPOINT = context.VECTOR_TILE_SERVER_ENDPOINT;
5259
- var COLLECTION = COLLECTION_SCHEMAS[collection_id];
5260
- var VECTOR_SOURCE_ID = "".concat(collection_id, ".geom");
5261
- var globalRes = globalResources(context);
5262
- var viewId = "".concat(collection_id, ".").concat(variable_id);
5263
-
5264
- // const isPercentage = variable_id.endsWith('_pct')
5265
-
5266
- // const number_format =
5267
- // viewSpec.number_format || isPercentage ? 'percent' : ['pt-BR']
5268
-
5269
- var NUMBER_FMT = ['$if', ['$endsWith', ['$get', 'view.conf.data.variableId'], '_pct'], ['pt-BR', {
5270
- style: 'percent'
5271
- }], ['pt-BR', {}]];
5272
-
5273
- // const NUMBER_FMT = ['pt-BR', {}]
5274
- // typeof number_format === 'string'
5275
- // ? ['pt-BR', { style: number_format }]
5276
- // : number_format
5277
-
5278
- if (variable_id !== indicator_id) {
5279
- return null;
5280
- }
5281
- if (!COLLECTION || !COLLECTION.variable_ids.includes(variable_id)) {
5282
- console.warn("found invalid variable ".concat(variable_id, ", will ignore"));
5283
- return null;
5284
- }
5285
- if (!source_table_id) {
5286
- console.warn("found variable without source source_table_id, will ignore ".concat(variable_id));
5287
- return null;
5288
- }
5289
- var variants = uniqBy(allViewSpecs.filter(function (otherViewSpec) {
5290
- return otherViewSpec.indicator_id === indicator_id;
5291
- }), function (viewSpec) {
5292
- return viewSpec.variable_id;
5293
- });
5294
- var variantsByVariableId = Object.fromEntries(variants.map(function (variant) {
5295
- return [variant.variable_id, variant];
5296
- }));
5297
- var labels = Object.fromEntries(variants.map(function (variant) {
5298
- return [variant.variable_id, [variant.variable_id === indicator_id ? indicator_label : [indicator_label, variant.variant_label].join(' | '), year ? "(".concat(year, ")") : null].filter(Boolean).join(' ')];
5299
- }));
5300
- var measureUnits = Object.fromEntries(variants.map(function (variant) {
5301
- return [variant.variable_id, variant.measure_unit];
5302
- }));
5303
- var _color_scheme = indicator_path.toLowerCase().includes('infraestrutura') ? COLOR_SCHEMES.schemeBlues : COLOR_SCHEMES.schemeOranges;
5304
- var _legends = [{
5305
- type: 'SequentialColorLegend',
5306
- title: ['$get', ['$get', 'view.conf.data.variableId'], ['$get', 'view.metadata.labels']],
5307
- unit: ['$get', ['$get', 'view.conf.data.variableId'], ['$get', 'view.metadata.measureUnits']],
5308
- steps: ['$coalesce', ['$get', 'view.metadata.colorScaleStops'], ['transparent', ['$min', ['$get', 'view.metadata.variableValues']], INSUFFICIENT_DATA_COLOR, ['$max', ['$get', 'view.metadata.variableValues']]]],
5309
- format: {
5310
- number: NUMBER_FMT || ['pt-BR', {}],
5311
- below: 'Sem dados',
5312
- above: ['$if', ['$empty', ['$get', 'view.metadata.colorScaleStops']], null, 'Acima de ${0}']
5313
- },
5314
- //
5315
- // TODO: review! Clearly not structured manner.
5316
- // Currently used @ GeoReDUS/GeoReDUS.jsx
5317
- //
5318
- __filterFeaturesForStep: function __filterFeaturesForStep(stepInfo, features) {
5319
- return features.filter(function (feature) {
5320
- var _feature$properties;
5321
- var value = (_feature$properties = feature.properties) === null || _feature$properties === void 0 ? void 0 : _feature$properties[variable_id];
5322
- return typeof value === 'number' && value >= stepInfo.min && (value <= stepInfo.max || stepInfo.max === null);
5323
- });
5324
- }
5325
-
5326
- // format: {
5327
- // number: NUMBER_FMT,
5328
- // below: 'Sem dados',
5329
- // },
5330
- // steps: ['$get', 'view.metadata.colorScaleStops'],
5331
- }];
5332
- var _variableValueTooltipEntry = [['$get', ['$get', 'view.conf.data.variableId'], ['$get', 'view.metadata.labels']], ['$literal', ['$fmt', ['$get', ['$template', 'feature.properties.${0}',
5333
- // `::string({ "number": ${JSON.stringify(NUMBER_FMT)} })`,
5334
- ['$get', 'view.conf.data.variableId']]], {
5335
- number: NUMBER_FMT
5336
- }]]];
5337
- var _customGeoJsonFeatureInfoTooltip = {
5338
- title: ['$literal', ['$coalesce', ['$get', 'feature.properties.name'], ['$get', 'feature.properties.nome'], ['$get', 'feature.properties.label'], ['$get', 'feature.properties.title'], ['$get', 'feature.properties.id'], ['$get', ['$get', '0', ['$keys', ['$get', 'feature.properties']]], ['$get', 'feature.properties']]]],
5339
- entries: ['$literal', ['$entries', ['$get', 'feature.properties']]]
5340
- };
5341
-
5342
- //
5343
- // Fill color expression for data loaded from
5344
- // vector source
5345
- //
5346
- var _vectorSourceFillColor = ['$flat', [['step', ['coalesce', ['get', ['$get', 'view.conf.data.variableId']], -1]], ['$get', 'view.metadata.colorScaleStops']]];
5347
- var sourceLabel = "CENSO ".concat(year);
5348
- return {
5349
- // debug: true,
5350
- id: viewId,
5351
- path: indicator_path,
5352
- label: indicator_label,
5353
- metodology: metodology,
5354
- sourceLabel: sourceLabel,
5355
- viewType: VIEW_TYPE_SURFACE_CHOROPLETH,
5356
- keywords: [indicator_path, sourceLabel, variant_path, variant_label, variable_id, keywords].filter(Boolean),
5357
- confSchema: {
5358
- data: {
5359
- variableId: {
5360
- label: 'Recorte:',
5361
- type: 'treeSelect',
5362
- options: variants.map(function (variant) {
5363
- return {
5364
- path: variant.variant_path,
5365
- label: variant.variant_label || variant.variable_id,
5366
- value: variant.variable_id
5367
- };
5368
- }),
5369
- placeholder: 'Selecione uma variante',
5370
- clearable: false,
5371
- defaultValue: variable_id
5372
- },
5373
- customSpatialAggregationUnit: {
5374
- type: 'geoFile',
5375
- label: 'Malha territorial customizada',
5376
- helperText: 'Carregue um arquivo georreferenciado para visualizar os dados de acordo' + ' com sua própria malha territorial. Formatos de arquivo suportados: ' + ['GeoPackage (.gpkg)', 'KML (.kml)', 'GML (.gml)',
5377
- // 'CSV (.csv)',
5378
- 'TIFF/GeoTIFF (.tif/.tiff)', 'GeoJSON (.json/.geojson)', 'ESRI Shapefile (armazenar arquivos .shp, .shx, .dbf, etc. em um arquivo .zip único)'].join(', ')
5379
- },
5380
- pointsDisplayMode: {
5381
- inactive: resolve.literal(resolve.fn(function (context) {
5382
- var _context$value;
5383
- var geometryTypes = (_context$value = context.value) === null || _context$value === void 0 || (_context$value = _context$value.customSpatialAggregationUnit) === null || _context$value === void 0 || (_context$value = _context$value.GEO_FILE_METADATA) === null || _context$value === void 0 ? void 0 : _context$value.geometryTypes;
5384
- return !Array.isArray(geometryTypes) || !geometryTypes.includes('Point');
5385
- })),
5386
- clearable: false,
5387
- type: 'treeSelect',
5388
- label: 'Visualizar pontos',
5389
- options: [{
5390
- path: null,
5391
- label: 'Círculos',
5392
- value: 'circle'
5393
- }, {
5394
- path: null,
5395
- label: 'Mapa de calor',
5396
- value: 'heatmap'
5397
- }],
5398
- defaultValue: 'circle'
5399
- },
5400
- bufferSize: {
5401
- type: 'slider',
5402
- label: resolve.literal(resolve.fn(function (context) {
5403
- var _context$value2;
5404
- return "Raio de influ\xEAncia (".concat(((_context$value2 = context.value) === null || _context$value2 === void 0 ? void 0 : _context$value2.bufferSize) || DEFAULT_BUFFER_SIZE, "m)");
5405
- })),
5406
- helperText: 'Raio de influência do ponto',
5407
- min: 0,
5408
- max: 2000,
5409
- step: 50,
5410
- defaultValue: DEFAULT_BUFFER_SIZE,
5411
- inactive: resolve.literal(resolve.fn(function (context) {
5412
- var _context$value3, _context$value4;
5413
- var geometryTypes = (_context$value3 = context.value) === null || _context$value3 === void 0 || (_context$value3 = _context$value3.customSpatialAggregationUnit) === null || _context$value3 === void 0 || (_context$value3 = _context$value3.GEO_FILE_METADATA) === null || _context$value3 === void 0 ? void 0 : _context$value3.geometryTypes;
5414
- return !Array.isArray(geometryTypes) || !geometryTypes.includes('Point') && !geometryTypes.includes('LineString') || ((_context$value4 = context.value) === null || _context$value4 === void 0 ? void 0 : _context$value4.pointsDisplayMode) === 'heatmap';
5415
- }))
5416
- },
5417
- dissolveOverlappingGeometries: {
5418
- inactive: resolve.literal(resolve.fn(function (context) {
5419
- var _context$value5, _context$value6;
5420
- return !Boolean((_context$value5 = context.value) === null || _context$value5 === void 0 || (_context$value5 = _context$value5.customSpatialAggregationUnit) === null || _context$value5 === void 0 ? void 0 : _context$value5.GEO_FILE_METADATA) || ((_context$value6 = context.value) === null || _context$value6 === void 0 ? void 0 : _context$value6.pointsDisplayMode) === 'heatmap';
5421
- })),
5422
- type: 'booleanCheckbox',
5423
- label: 'Dissolver geometrias',
5424
- description: 'Unir geometrias sobrepostas',
5425
- defaultValue: false
5426
- }
5427
- },
5428
- style: {
5429
- layerOpacity: {
5430
- type: 'slider',
5431
- label: 'Opacidade da camada',
5432
- size: '1',
5433
- min: 0,
5434
- max: 1,
5435
- step: 0.01,
5436
- defaultValue: 0.6
5437
- }
5438
- }
5439
- },
5440
- metadata: {
5441
- _dependencies: function _dependencies(_ref2) {
5442
- _ref2.viewConfState;
5443
- // console.log('run dependencies', omit(viewConfState.byId, [viewId]))
5444
-
5445
- // return omit(viewConfState.byId, [viewId])
5446
- return 'STABLE';
5447
-
5448
- // return omit(viewConfState.byId, [viewId])
5449
- },
5450
- _value: ['$let', {
5451
- customGeoJSON: ['$if', ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']], null, resolveAsync.fn(/*#__PURE__*/function () {
5452
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(context) {
5453
- var contents, BASE, POINTS, LINE_STRINGS, AREAS_FEATURES, AREAS_BASE, AREAS;
5454
- return _regeneratorRuntime().wrap(function _callee$(_context) {
5455
- while (1) switch (_context.prev = _context.next) {
5456
- case 0:
5457
- _context.prev = 0;
5458
- _context.next = 3;
5459
- return fileReadAs(context.view.conf.data.customSpatialAggregationUnit, 'text');
5460
- case 3:
5461
- contents = _context.sent;
5462
- BASE = JSON.parse(contents); //
5463
- // Generate a layer with points only
5464
- //
5465
- POINTS = _objectSpread2(_objectSpread2({}, BASE), {}, {
5466
- features: BASE.features.filter(function (feat) {
5467
- var _feat$geometry;
5468
- return ((_feat$geometry = feat.geometry) === null || _feat$geometry === void 0 ? void 0 : _feat$geometry.type) === 'Point';
5469
- })
5470
- });
5471
- LINE_STRINGS = _objectSpread2(_objectSpread2({}, BASE), {}, {
5472
- features: BASE.features.filter(function (feat) {
5473
- var _feat$geometry2;
5474
- return ((_feat$geometry2 = feat.geometry) === null || _feat$geometry2 === void 0 ? void 0 : _feat$geometry2.type) === 'LineString';
5475
- })
5476
- }); //
5477
- // Layer with areas
5478
- //
5479
- AREAS_FEATURES = context.view.conf.data.pointsDisplayMode === 'heatmap' ?
5480
- //
5481
- // If points are set to be displayed as heatmap,
5482
- // remove them from area calculation
5483
- //
5484
- BASE.features.filter(function (feat) {
5485
- var _feat$geometry3;
5486
- return ((_feat$geometry3 = feat.geometry) === null || _feat$geometry3 === void 0 ? void 0 : _feat$geometry3.type) !== 'Point';
5487
- }) : BASE.features;
5488
- AREAS_BASE = _objectSpread2(_objectSpread2({}, BASE), {}, {
5489
- features: AREAS_FEATURES.map(function (feat) {
5490
- return _objectSpread2(_objectSpread2({}, feat), {}, {
5491
- geometry: _applyBuffers(feat.geometry, pick(context.view.conf.data, ['bufferSize']))
5492
- });
5493
- })
5494
- });
5495
- if (!(context.view.conf.data.pointsDisplayMode === 'heatmap')) {
5496
- _context.next = 13;
5497
- break;
5498
- }
5499
- _context.t0 = null;
5500
- _context.next = 21;
5501
- break;
5502
- case 13:
5503
- if (!(context.view.conf.data.dissolveOverlappingGeometries && AREAS_BASE)) {
5504
- _context.next = 19;
5505
- break;
5506
- }
5507
- _context.next = 16;
5508
- return GeoReDUSWorker.dissolveAreasPreservingIsolated(AREAS_BASE);
5509
- case 16:
5510
- _context.t1 = _context.sent;
5511
- _context.next = 20;
5512
- break;
5513
- case 19:
5514
- _context.t1 = AREAS_BASE;
5515
- case 20:
5516
- _context.t0 = _context.t1;
5517
- case 21:
5518
- AREAS = _context.t0;
5519
- return _context.abrupt("return", {
5520
- BASE: BASE,
5521
- POINTS: POINTS,
5522
- LINE_STRINGS: LINE_STRINGS,
5523
- AREAS: AREAS
5524
- });
5525
- case 25:
5526
- _context.prev = 25;
5527
- _context.t2 = _context["catch"](0);
5528
- console.error(_context.t2);
5529
- return _context.abrupt("return", null);
5530
- case 29:
5531
- case "end":
5532
- return _context.stop();
5533
- }
5534
- }, _callee, null, [[0, 25]]);
5535
- }));
5536
- return function (_x) {
5537
- return _ref3.apply(this, arguments);
5538
- };
5539
- }())]
5540
- }, ['$let', {
5541
- variableValues: ['$if', ['$empty', ['$get', 'customGeoJSON.AREAS']], ['$get', ['$template', '[].${0}', ['$get', 'view.conf.data.variableId']], ['$fetch', ['$template', "".concat(METADATA_API_ENDPOINT) + '/${source_table_id}?select=' + '${variableId}' + '&cd_mun=eq.' + '${municipioId}', {
5542
- variableId: ['$get', 'view.conf.data.variableId'],
5543
- municipioId: ['$context', 'municipioId'],
5544
- source_table_id: ['$get', ['$template', '${0}.source_table_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId]
5545
- }]]], ['$fetch', {
5546
- href: METADATA_API_ENDPOINT,
5547
- pathname: 'rpc/aggregate_by_geojson'
5548
- }, {
5549
- method: 'POST',
5550
- headers: {
5551
- 'Content-Type': 'application/json'
5552
- },
5553
- body: {
5554
- geometries: ['$get', 'features[].geometry', ['$get', 'customGeoJSON.AREAS']],
5555
- view: 'ibge_malha_br_setor_censitario_2010_spatial_agg',
5556
- agg_column: ['$get', 'view.conf.data.variableId'],
5557
- agg_type: ['$if', ['$endsWith', ['$get', 'view.conf.data.variableId'], '_pct'], 'weighted_avg', 'sum']
5558
- }
5559
- }]]
5560
- }, {
5561
- labels: labels,
5562
- measureUnits: measureUnits,
5563
- variableValues: ['$get', 'variableValues'],
5564
- customGeoJSON: ['$get', 'customGeoJSON'],
5565
- customGeoJSON2: resolveAsync.fn(/*#__PURE__*/function () {
5566
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(context) {
5567
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5568
- while (1) switch (_context2.prev = _context2.next) {
5569
- case 0:
5570
- case "end":
5571
- return _context2.stop();
5572
- }
5573
- }, _callee2);
5574
- }));
5575
- return function (_x2) {
5576
- return _ref4.apply(this, arguments);
5577
- };
5578
- }()),
5579
- colorScaleStops: ['$naturalBreaks', ['$get', 'variableValues'], _objectSpread2(_objectSpread2({}, _color_scheme), {}, {
5580
- minK: 5
5581
- })]
5582
- }]]
5583
- },
5584
- sources: _objectSpread2(_objectSpread2({}, globalRes.sources), {}, _defineProperty(_defineProperty({
5585
- //
5586
- // Points in custom GeoJson
5587
- //
5588
- customGeoJSON_Points: ['$if', [['$empty', ['$get', 'view.metadata.customGeoJSON.POINTS']]], null, resolve.fn(function (context) {
5589
- var customGeoJSON = context.view.metadata.customGeoJSON;
5590
- if (!(customGeoJSON !== null && customGeoJSON !== void 0 && customGeoJSON.POINTS)) {
5591
- return null;
5592
- }
5593
- return {
5594
- type: 'geojson',
5595
- data: customGeoJSON.POINTS
5596
- };
5597
- })],
5598
- //
5599
- // LineStrings in custom GeoJson
5600
- //
5601
- customGeoJSON_LineStrings: ['$if', [['$empty', ['$get', 'view.metadata.customGeoJSON.LINE_STRINGS']]], null, resolve.fn(function (context) {
5602
- var customGeoJSON = context.view.metadata.customGeoJSON;
5603
- if (!(customGeoJSON !== null && customGeoJSON !== void 0 && customGeoJSON.LINE_STRINGS)) {
5604
- return null;
5605
- }
5606
- return {
5607
- type: 'geojson',
5608
- data: customGeoJSON.LINE_STRINGS
5609
- };
5610
- })],
5611
- //
5612
- // The area of customGeoJson
5613
- //
5614
- customGeoJSON_Areas: ['$if', [['$empty', ['$get', 'view.metadata.customGeoJSON.AREAS']]], null, resolve.fn(function (context) {
5615
- // ['$get', 'view.metadata.customGeoJSON'],
5616
- var _context$view$metadat = context.view.metadata,
5617
- customGeoJSON = _context$view$metadat.customGeoJSON,
5618
- variableValues = _context$view$metadat.variableValues;
5619
- if (!(customGeoJSON !== null && customGeoJSON !== void 0 && customGeoJSON.AREAS)) {
5620
- return null;
5621
- }
5622
-
5623
- //
5624
- // Join geometry with variableValues
5625
- //
5626
- var features = customGeoJSON.AREAS.features.map(function (feat, featIndex) {
5627
- return _objectSpread2(_objectSpread2({}, feat), {}, {
5628
- properties: _objectSpread2(_objectSpread2({}, feat.properties || {}), {}, _defineProperty({}, context.view.conf.data.variableId, variableValues[featIndex]))
5629
- });
5630
- });
5631
- return {
5632
- type: 'geojson',
5633
- data: _objectSpread2(_objectSpread2({}, customGeoJSON.AREAS), {}, {
5634
- features: features
5635
- })
5636
- };
5637
- })]
5638
- }, VECTOR_SOURCE_ID, {
5639
- type: 'vector',
5640
- attribution: sourceLabel,
5641
- minzoom: 8,
5642
- maxzoom: 20,
5643
- promoteId: 'cd_setor',
5644
- tiles: [['$join', ["".concat(VECTOR_TILE_SERVER_ENDPOINT, "/dvt/{z}/{x}/{y}?"), ['$urlSearch', {
5645
- view: ['$get', ['$template', '${0}.collection_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId],
5646
- select: ['cd_setor'],
5647
- join_view: ['$get', ['$template', '${0}.source_table_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId],
5648
- join_source_column: 'cd_setor',
5649
- join_target_column: 'cd_setor',
5650
- join_select: [['$get', 'view.conf.data.variableId']],
5651
- where: {
5652
- cd_mun: [['$get', 'municipioId']]
5653
- }
5654
- }]]]]
5655
- }), "".concat(VECTOR_SOURCE_ID, "_buildings"), {
5656
- type: 'vector',
5657
- attribution: sourceLabel,
5658
- minzoom: 6,
5659
- maxzoom: 20,
5660
- tiles: [['$join', ["".concat(VECTOR_TILE_SERVER_ENDPOINT, "/dvt/{z}/{x}/{y}?"), ['$urlSearch', {
5661
- view: 'overture_br_buildings',
5662
- // view: [
5663
- // '$get',
5664
- // [
5665
- // '$template',
5666
- // '${0}.collection_id',
5667
- // ['$get', 'view.conf.data.variableId'],
5668
- // ],
5669
- // variantsByVariableId,
5670
- // ],
5671
- select: ['height', 'subtype'],
5672
- join_view: ['$get', ['$template', '${0}.source_table_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId],
5673
- join_source_column: "setor_".concat(year, "_id"),
5674
- join_target_column: 'cd_setor',
5675
- join_select: [['$get', 'view.conf.data.variableId']],
5676
- where: {
5677
- municipio_id: [['$get', 'municipioId']]
5678
- }
5679
- }]]]]
5680
- })),
5681
- layers: _objectSpread2(_objectSpread2({}, globalRes.layers), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
5682
- customGeoJSON_Areas_fill: {
5683
- hidden: ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']],
5684
- source: 'customGeoJSON_Areas',
5685
- type: 'fill',
5686
- legends: _legends,
5687
- tooltip: {
5688
- title: ['$literal', ['$coalesce', ['$get', 'feature.properties.name'], ['$get', 'feature.properties.nome'], ['$get', 'feature.properties.label'], ['$get', 'feature.properties.title'], ['$get', 'feature.properties.id'], ['$get', ['$get', '0', ['$keys', ['$get', 'feature.properties']]], ['$get', 'feature.properties']]]],
5689
- entries: [_variableValueTooltipEntry]
5690
- },
5691
- paint: {
5692
- 'fill-color': ['$if', ['$empty', ['$get', 'view.metadata.colorScaleStops']], INSUFFICIENT_DATA_COLOR, ['$flat', [['step', ['coalesce', ['get', ['$get', 'view.conf.data.variableId']], -1]], ['$get', 'view.metadata.colorScaleStops']]]],
5693
- // 'fill-color': [
5694
- // '$flat',
5695
- // [
5696
- // [
5697
- // 'step',
5698
- // [
5699
- // 'coalesce',
5700
- // ['get', ['$get', 'view.conf.data.variableId']],
5701
- // -1,
5702
- // ],
5703
- // ],
5704
- // ['$get', 'view.metadata.colorScaleStops'],
5705
- // ],
5706
- // ],
5707
- 'fill-opacity': ['$get', 'view.conf.style.layerOpacity'],
5708
- 'fill-outline-color': 'transparent'
5709
- }
5710
- },
5711
- customGeoJSON_Areas_line: {
5712
- hidden: ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']],
5713
- source: 'customGeoJSON_Areas',
5714
- type: 'line',
5715
- paint: {
5716
- 'line-color': _color_scheme.scalesByK[5][4],
5717
- 'line-width': 2
5718
- }
5719
- },
5720
- customGeoJSON_LineStrings_line: {
5721
- hidden: ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']],
5722
- source: 'customGeoJSON_LineStrings',
5723
- type: 'line',
5724
- paint: {
5725
- 'line-color': _color_scheme.scalesByK[5][4],
5726
- 'line-width': 2
5727
- },
5728
- tooltip: _customGeoJsonFeatureInfoTooltip
5729
- },
5730
- customGeoJSON_Points_circle: {
5731
- hidden: ['$or', ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']], ['$not', ['$eq', ['$get', 'view.conf.data.pointsDisplayMode'], 'circle']]],
5732
- source: 'customGeoJSON_Points',
5733
- type: 'circle',
5734
- paint: {
5735
- 'circle-opacity': 1,
5736
- 'circle-radius': 5,
5737
- 'circle-stroke-width': 1,
5738
- 'circle-stroke-color': '#000000',
5739
- 'circle-color': '#dddddd'
5740
- },
5741
- tooltip: _customGeoJsonFeatureInfoTooltip
5742
- }
5743
- }, "".concat(VECTOR_SOURCE_ID, "_fill"), {
5744
- hidden: ['$not', ['$empty', ['$get', 'view.metadata.customGeoJSON.AREAS']]],
5745
- interactive: true,
5746
- legends: _legends,
5747
- tooltip: {
5748
- title: null,
5749
- entries: [_variableValueTooltipEntry]
5750
- },
5751
- source: VECTOR_SOURCE_ID,
5752
- 'source-layer': 'dvt',
5753
- type: 'fill',
5754
- // maxzoom: 14,
5755
- paint: {
5756
- 'fill-color': _vectorSourceFillColor,
5757
- 'fill-opacity': ['step', ['zoom'],
5758
- //
5759
- // At lower zooms, opacities should be high
5760
- //
5761
- ['case', ['boolean', ['feature-state', 'hover'], false], 1, ['$get', 'view.conf.style.layerOpacity']], BUILDINGS_MIN_ZOOM,
5762
- //
5763
- // At higher zooms, opacity should be low,
5764
- // so that buildings show up
5765
- //
5766
- ['case', ['boolean', ['feature-state', 'hover'], false], 0.2, 0.1]],
5767
- 'fill-outline-color': 'transparent'
5768
- }
5769
- }), "".concat(VECTOR_SOURCE_ID, "_boundary_lines"), {
5770
- hidden: ['$not', ['$empty', ['$get', 'view.metadata.customGeoJSON.AREAS']]],
5771
- source: VECTOR_SOURCE_ID,
5772
- 'source-layer': 'dvt',
5773
- type: 'line',
5774
- interactive: true,
5775
- // minzoom: BUILDINGS_MIN_ZOOM,
5776
- paint: {
5777
- // 'line-color': _vectorSourceFillColor,
5778
- 'line-color': _color_scheme.scalesByK[3][2],
5779
- 'line-width': ['step', ['zoom'],
5780
- // default: zoom < 14 → thin lines
5781
- ['case', ['boolean', ['feature-state', 'hover'], false], 2, 0], BUILDINGS_MIN_ZOOM,
5782
- // zoom ≥ 14 → larger lines
5783
- ['case', ['boolean', ['feature-state', 'hover'], false], 4, 0]],
5784
- 'line-opacity': ['case', ['boolean', ['feature-state', 'hover'], false], 1, ['$get', 'view.conf.style.layerOpacity']]
5785
- }
5786
- }), "".concat(VECTOR_SOURCE_ID, "_buildings_fill"), {
5787
- hidden: ['$not', ['$empty', ['$get', 'view.metadata.customGeoJSON.AREAS']]],
5788
- interactive: false,
5789
- source: "".concat(VECTOR_SOURCE_ID, "_buildings"),
5790
- 'source-layer': 'dvt',
5791
- type: 'fill',
5792
- minzoom: BUILDINGS_MIN_ZOOM,
5793
- paint: {
5794
- //
5795
- // If indicator is about populacao-e-domicilios,
5796
- // do not color paint buildings whose subtype
5797
- // is known and is not residential.
5798
- //
5799
- // Otherwise, apply color to all buildings
5800
- //
5801
- 'fill-color': indicator_path !== null && indicator_path !== void 0 && indicator_path.startsWith('População e domicílios') ? ['case', ['in', ['get', 'subtype'], ['literal', ['agricultural', 'civic', 'commercial', 'education', 'entertainment', 'industrial', 'medical', 'military', 'outbuilding', 'religious',
5802
- // 'residential',
5803
- 'service', 'transportation']]], '#EFEFEF', _vectorSourceFillColor] : _vectorSourceFillColor,
5804
- 'fill-opacity': 1
5805
- }
5806
- }), "".concat(VECTOR_SOURCE_ID, "_buildings_fill_extrusion"), {
5807
- hidden: ['$not', ['$empty', ['$get', 'view.metadata.customGeoJSON.AREAS']]],
5808
- interactive: false,
5809
- // tooltip: {
5810
- // title: ['$literal', ['$get', 'feature.properties.primary_name']],
5811
- // entries: [],
5812
- // // entries: [
5813
- // // _variableValueTooltipEntry,
5814
- // // // ['subtype', ['$literal', ['$get', 'feature.properties.subtype']]],
5815
- // // ],
5816
- // },
5817
- source: "".concat(VECTOR_SOURCE_ID, "_buildings"),
5818
- 'source-layer': 'dvt',
5819
- type: 'fill-extrusion',
5820
- minzoom: BUILDINGS_MIN_ZOOM,
5821
- paint: {
5822
- //
5823
- // If indicator is about populacao-e-domicilios,
5824
- // do not color paint buildings whose subtype
5825
- // is known and is not residential.
5826
- //
5827
- // Otherwise, apply color to all buildings
5828
- //
5829
- 'fill-extrusion-color': indicator_path !== null && indicator_path !== void 0 && indicator_path.startsWith('População e domicílios') ? ['case', ['in', ['get', 'subtype'], ['literal', ['agricultural', 'civic', 'commercial', 'education', 'entertainment', 'industrial', 'medical', 'military', 'outbuilding', 'religious',
5830
- // 'residential',
5831
- 'service', 'transportation']]], '#EFEFEF', _vectorSourceFillColor] : _vectorSourceFillColor,
5832
- 'fill-extrusion-opacity': 0.8,
5833
- // 'fill-extrusion-opacity': ['$get', 'view.conf.style.layerOpacity'],
5834
- // 'fill-extrusion-outline-color': 'transparent',
5835
- 'fill-extrusion-height': ['step', ['zoom'], 0, BUILDINGS_3D_MIN_ZOOM, ['coalesce', ['get', 'height'], 0]]
5836
- // ['get', 'height'], // Adjust as needed
5837
- }
5838
- }), "customGeoJSON_Points_heatmap", {
5839
- hidden: ['$or', ['$empty', ['$get', 'view.conf.data.customSpatialAggregationUnit']], ['$not', ['$eq', ['$get', 'view.conf.data.pointsDisplayMode'], 'heatmap']]],
5840
- source: 'customGeoJSON_Points',
5841
- type: 'heatmap'
5842
- })),
5843
- download: downloadResolver({
5844
- fileNameBase: ['$template', '${0}_${1}_georedus_censo_${2}', [['$get', 'view.conf.data.variableId'], ['$get', 'municipioId'], year]],
5845
- mainVariableId: ['$get', 'view.conf.data.variableId'],
5846
- availableVariableIds: [],
5847
- // availableVariableIds: [variable_id, 'str_nome_fantasia', 'id_cnes'],
5848
- fetchData: resolve.fn(function (context) {
5849
- return /*#__PURE__*/function () {
5850
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref5) {
5851
- var data, geometries;
5852
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5853
- while (1) switch (_context3.prev = _context3.next) {
5854
- case 0:
5855
- _ref5.variableIds, _ref5.options;
5856
- _context3.next = 3;
5857
- return resolveExprAsync(['$fetch', ['$template', "".concat(METADATA_API_ENDPOINT) + '/${source_table_id}?select=' + '${variableId},' + 'cd_setor' + '&cd_mun=eq.' + '${municipioId}', {
5858
- variableId: ['$get', 'view.conf.data.variableId'],
5859
- municipioId: ['$context', 'municipioId'],
5860
- source_table_id: ['$get', ['$template', '${0}.source_table_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId]
5861
- }]], context);
5862
- case 3:
5863
- data = _context3.sent;
5864
- _context3.next = 6;
5865
- return resolveExprAsync(['$fetch', ['$template', "".concat(METADATA_API_ENDPOINT) + '/${collection_id}?select=geom,cd_setor' + '&cd_mun=eq.' + '${municipioId}', {
5866
- municipioId: ['$context', 'municipioId'],
5867
- collection_id: ['$get', ['$template', '${0}.collection_id', ['$get', 'view.conf.data.variableId']], variantsByVariableId]
5868
- }]], context);
5869
- case 6:
5870
- geometries = _context3.sent;
5871
- return _context3.abrupt("return", dataJoin([geometries, data], {
5872
- key: 'cd_setor'
5873
- }));
5874
- case 8:
5875
- case "end":
5876
- return _context3.stop();
5877
- }
5878
- }, _callee3);
5879
- }));
5880
- return function (_x3) {
5881
- return _ref6.apply(this, arguments);
5882
- };
5883
- }();
5884
- })
5885
- })
5886
- };
5887
- }
5888
-
5889
- function numerical_size(base, _ref) {
5890
- var collection_id = _ref.collection_id,
5891
- variable_id = _ref.variable_id,
5892
- indicator_label = _ref.indicator_label,
5893
- _ref$color_scheme = _ref.color_scheme,
5894
- color_scheme = _ref$color_scheme === void 0 ? 'schemeSet1.colors[1]' : _ref$color_scheme,
5895
- measure_unit = _ref.measure_unit,
5896
- $tooltip = _ref.$tooltip,
5897
- $layerFilter = _ref.$layerFilter;
5898
- var VARIABLE_ID = variable_id;
5899
- var TABLE_ID = collection_id;
5900
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
5901
- var SIZE_MAX = 25;
5902
- var SIZE_MIN = 6;
5903
- return _objectSpread2(_objectSpread2({}, base), {}, {
5904
- layers: _objectSpread2(_objectSpread2({}, base.layers), {}, _defineProperty({}, "".concat(VECTOR_SOURCE_ID, "_circle"), vectorLayer(VECTOR_SOURCE_ID, {
5905
- zIndex: ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 2,
5906
- type: 'circle',
5907
- legends: [{
5908
- type: 'ProportionalSymbolLegend',
5909
- unit: measure_unit,
5910
- title: indicator_label,
5911
- min: ['$min', ['$get', 'view.metadata.variableValues']],
5912
- max: ['$max', ['$get', 'view.metadata.variableValues']],
5913
- sizeMin: SIZE_MIN * 2,
5914
- sizeMax: SIZE_MAX * 2,
5915
- numberFormat: ['pt-BR', {
5916
- maximumFractionDigits: 0
5917
- }]
5918
- }],
5919
- interactive: true,
5920
- tooltip: $tooltip,
5921
- filter: $layerFilter,
5922
- paint: {
5923
- 'circle-opacity': 1,
5924
- 'circle-stroke-width': 1,
5925
- 'circle-stroke-color': '#000000',
5926
- 'circle-radius': ['$if', ['$gt', ['$get', 'length', ['$get', 'view.metadata.variableValues']], 1], zoomSensitiveLinearSizes({
5927
- variable: ['get', VARIABLE_ID],
5928
- minValue: ['$min', ['$get', 'view.metadata.variableValues']],
5929
- maxValue: ['$max', ['$get', 'view.metadata.variableValues']],
5930
- minSize: SIZE_MIN,
5931
- maxSize: SIZE_MAX
5932
- }), 10],
5933
- 'circle-color': get(COLOR_SCHEMES, color_scheme) || color_scheme
5934
- }
5935
- })))
5936
- });
5937
- }
5938
-
5939
- function categorical(base, _ref) {
5940
- var collection_id = _ref.collection_id;
5941
- _ref.indicator_id;
5942
- var variable_id = _ref.variable_id,
5943
- indicator_label = _ref.indicator_label,
5944
- categories = _ref.categories;
5945
- _ref.filter;
5946
- var $circleRadius = _ref.$circleRadius,
5947
- $tooltip = _ref.$tooltip,
5948
- $legends = _ref.$legends,
5949
- $layerFilter = _ref.$layerFilter;
5950
- var VARIABLE_ID = variable_id;
5951
- var TABLE_ID = collection_id;
5952
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
5953
- categories = categories ? categories.map(function (category) {
5954
- return _objectSpread2(_objectSpread2({}, category), {}, {
5955
- color: get(COLOR_SCHEMES, category.color) || category.color
5956
- });
5957
- }) : null;
5958
- var $circleColor = categories ? ['match', ['to-string', ['get', VARIABLE_ID]]].concat(_toConsumableArray(categories.flatMap(function (category) {
5959
- return [category.value, category.color];
5960
- })), [DEFAULT_NULL_COLOR]) : DEFAULT_NULL_COLOR;
5961
- return _objectSpread2(_objectSpread2({}, base), {}, {
5962
- layers: _objectSpread2(_objectSpread2({}, base.layers), {}, _defineProperty({
5963
- influenceArea_fill: _objectSpread2(_objectSpread2({}, base.layers.influenceArea_fill), {}, {
5964
- paint: _objectSpread2(_objectSpread2({}, base.layers.influenceArea_fill.paint), {}, {
5965
- 'fill-color': $circleColor
5966
- })
5967
- }),
5968
- influenceArea_boundaries: _objectSpread2(_objectSpread2({}, base.layers.influenceArea_boundaries), {}, {
5969
- paint: _objectSpread2(_objectSpread2({}, base.layers.influenceArea_boundaries.paint), {}, {
5970
- 'line-color': $circleColor
5971
- })
5972
- })
5973
- }, "".concat(VECTOR_SOURCE_ID, "_circle"), vectorLayer(VECTOR_SOURCE_ID, {
5974
- zIndex: ABOVE_BASE_MAP_LAYERS_Z_INDEX_BASE + 2,
5975
- type: 'circle',
5976
- legends: [categories ? {
5977
- type: 'ColorLegend',
5978
- title: indicator_label,
5979
- items: categories
5980
-
5981
- // unit: measure_unit,
5982
- // steps: ['$get', 'view.metadata.colorScaleStops'],
5983
- } : null].concat(_toConsumableArray($legends)),
5984
- // legends: [
5985
- // {
5986
- // type: 'SequentialColorLegend',
5987
- // title: indicator_label,
5988
- // unit: measure_unit,
5989
- // steps: ['$get', 'view.metadata.colorScaleStops'],
5990
- // },
5991
- // ],
5992
- interactive: true,
5993
- tooltip: $tooltip,
5994
- filter: $layerFilter,
5995
- // filter: [
5996
- // 'all',
5997
- // [
5998
- // '==',
5999
- // ['get', 'id_municipio_gestor'],
6000
- // ['$substr', ['$get', 'municipioId'], 0, 6],
6001
- // ],
6002
- // ...(Array.isArray(filter) ? filter : []),
6003
- // ],
6004
- paint: _defineProperty(_defineProperty({
6005
- 'circle-opacity': 1,
6006
- 'circle-radius': 10,
6007
- 'circle-stroke-width': 1,
6008
- 'circle-stroke-color': '#000000'
6009
- }, "circle-radius", $circleRadius), 'circle-color', $circleColor)
6010
- })))
6011
- });
6012
- }
6013
-
6014
- function boolean_categorical(base, config) {
6015
- return categorical(base, _objectSpread2(_objectSpread2({}, config), {}, {
6016
- //
6017
- // Set default categories
6018
- //
6019
- categories: config.categories || [{
6020
- color: 'schemeSet1.colors[2]',
6021
- label: 'Sim',
6022
- value: 'true'
6023
- }, {
6024
- color: 'schemeSet1.colors[0]',
6025
- label: 'Não',
6026
- value: 'false'
6027
- }]
6028
- }));
6029
- }
6030
-
6031
- var BY_TYPE = {
6032
- // numerical_choropleth,
6033
- numerical_size: numerical_size,
6034
- boolean_categorical: boolean_categorical,
6035
- categorical: categorical
6036
- };
6037
- function cem_saude_2024(viewSpec, allViewSpecs, context) {
6038
- var collection_id = viewSpec.collection_id,
6039
- metodology = viewSpec.metodology,
6040
- indicator_id = viewSpec.indicator_id,
6041
- variable_id = viewSpec.variable_id,
6042
- indicator_path = viewSpec.indicator_path,
6043
- indicator_label = viewSpec.indicator_label,
6044
- indicator_type = viewSpec.indicator_type,
6045
- sizing_variable_id = viewSpec.sizing_variable_id,
6046
- tipo_estabelecimento = viewSpec.tipo_estabelecimento,
6047
- _viewSpec$number_form = viewSpec.number_format,
6048
- number_format = _viewSpec$number_form === void 0 ? ['pt-BR', {}] : _viewSpec$number_form,
6049
- keywords = viewSpec.keywords;
6050
- var METADATA_API_ENDPOINT = context.METADATA_API_ENDPOINT;
6051
- var VARIABLE_ID = variable_id;
6052
- var TABLE_ID = collection_id;
6053
- var VECTOR_SOURCE_ID = "".concat(TABLE_ID, ".geom");
6054
- var viewId = "".concat(collection_id, ".").concat(indicator_id);
6055
- var globalRes = globalResources(context);
6056
- var _setupVariants = setupVariants(viewSpec, allViewSpecs),
6057
- loadVariant = _setupVariants.loadVariant;
6058
-
6059
- //
6060
- // common resolver that takes in variant filter and converts into
6061
- // search parameters for metadata api for data fetching
6062
- //
6063
- var _fetchMetadataApiFilterExpResolver = resolve.fn(function (context) {
6064
- var _context$view;
6065
- var variantId = ((_context$view = context.view) === null || _context$view === void 0 || (_context$view = _context$view.conf) === null || _context$view === void 0 || (_context$view = _context$view.data) === null || _context$view === void 0 ? void 0 : _context$view.variantId) || indicator_id;
6066
- var variantSpec = loadVariant(variantId);
6067
- var filter = variantId ? variantSpec.filter : null;
6068
- return filter ? fmtMetadataApiFilterExp(filter) : {};
6069
- });
6070
- var _id_municipio_gestor_apiFilterExp = ['$template', 'eq.${0}', ['$substr', ['$get', 'municipioId'], 0, 6]];
6071
- var $layerFilter = resolve.fn(function (context) {
6072
- var _context$view2;
6073
- var variantId = ((_context$view2 = context.view) === null || _context$view2 === void 0 || (_context$view2 = _context$view2.conf) === null || _context$view2 === void 0 || (_context$view2 = _context$view2.data) === null || _context$view2 === void 0 ? void 0 : _context$view2.variantId) || indicator_id;
6074
- var variantSpec = loadVariant(variantId);
6075
- var filter = variantId ? variantSpec.filter : null;
6076
- return ['all', ['==', ['get', 'id_municipio_gestor'], ['$substr', ['$get', 'municipioId'], 0, 6]]].concat(_toConsumableArray(isPlainObject(filter) ? fmtMaplibreGlFilterExp(filter) : []));
6077
- });
6078
- var $sourceLabel = 'CNES';
6079
- var base = {
6080
- id: viewId,
6081
- label: indicator_label,
6082
- path: indicator_path,
6083
- sourceLabel: $sourceLabel,
6084
- metodology: metodology,
6085
- keywords: [indicator_path, $sourceLabel, 'saúde', 'hospital', 'UBS', keywords].filter(Boolean),
6086
- confSchema: {
6087
- data: _objectSpread2({}, influenceAreaConf({
6088
- defaultBufferSize: tipo_estabelecimento === 'HOSPITAL' ? 2000 : 500,
6089
- maxBufferSize: 5000
6090
- }))
6091
- },
6092
- metadata: {
6093
- _value: ['$let', {
6094
- rawData: ['$fetch', {
6095
- href: METADATA_API_ENDPOINT,
6096
- pathname: collection_id,
6097
- searchParams: ['$merge', {
6098
- select: [VARIABLE_ID, 'geom'].join(','),
6099
- id_municipio_gestor: _id_municipio_gestor_apiFilterExp
6100
- }, _fetchMetadataApiFilterExpResolver]
6101
- }]
6102
- }, _objectSpread2(_objectSpread2({
6103
- variableValues: ['$get', ['$template', 'rawData[].${0}', VARIABLE_ID]]
6104
- }, influenceAreaMetadata()), {}, {
6105
- sizingValues: sizing_variable_id ? ['$filter', ['$get', ['$template', '[].${0}', sizing_variable_id
6106
- // ['$get', 'view.conf.data.sizingVariable'],
6107
- ], ['$fetch', {
6108
- href: METADATA_API_ENDPOINT,
6109
- pathname: collection_id,
6110
- searchParams: ['$merge', {
6111
- select: sizing_variable_id,
6112
- // select: ['$get', 'view.conf.data.sizingVariable'],
6113
- id_municipio_gestor: _id_municipio_gestor_apiFilterExp
6114
- }, _fetchMetadataApiFilterExpResolver]
6115
- }]], ['$and', ['$not', ['$empty', ['$iterator', 'item']]], ['$gt', ['$iterator', 'item'], 0]]] : null
6116
- })]
6117
- },
6118
- sources: _objectSpread2(_objectSpread2({}, globalRes.sources), {}, _defineProperty({}, VECTOR_SOURCE_ID, tableVectorSource(context, collection_id, {
6119
- attribution: $sourceLabel,
6120
- promoteId: 'id_cnes',
6121
- minzoom: 8,
6122
- maxzoom: 20
6123
- })), influenceAreaSources()),
6124
- layers: _objectSpread2(_objectSpread2({}, globalRes.layers), influenceAreaLayers({
6125
- fillPaint: {
6126
- 'fill-color': colorScheme('schemeSet1.colors[2]'),
6127
- 'fill-opacity': 0.3
6128
- },
6129
- boundaryPaint: {
6130
- 'line-color': colorScheme('schemeSet1.colors[2]'),
6131
- 'line-opacity': 0.8,
6132
- 'line-width': 2,
6133
- 'line-dasharray': [2, 2]
6134
- }
6135
- })),
6136
- download: downloadResolver({
6137
- fileNameBase: ['$template', '${0}_${1}_georedus_saude', [VARIABLE_ID, ['$get', 'municipioId']]],
6138
- mainVariableId: VARIABLE_ID,
6139
- availableVariableIds: uniqBy(allViewSpecs.filter(function (spec) {
6140
- return Boolean(spec.variable_id);
6141
- }).map(function (spec) {
6142
- return {
6143
- label: spec.indicator_label,
6144
- value: spec.variable_id
6145
- };
6146
- }), function (opt) {
6147
- return opt.value;
6148
- }),
6149
- // availableVariableIds: [variable_id, 'str_nome_fantasia', 'id_cnes'],
6150
- fetchData: resolve.fn(function (context) {
6151
- return /*#__PURE__*/function () {
6152
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
6153
- var variableIds;
6154
- return _regeneratorRuntime().wrap(function _callee$(_context) {
6155
- while (1) switch (_context.prev = _context.next) {
6156
- case 0:
6157
- variableIds = _ref.variableIds, _ref.options;
6158
- _context.next = 3;
6159
- return resolveExprAsync(['$fetch', {
6160
- href: METADATA_API_ENDPOINT,
6161
- pathname: collection_id,
6162
- searchParams: ['$merge', {
6163
- select: ['geom', 'id_cnes', 'str_nome_fantasia'].concat(_toConsumableArray(variableIds)).join(','),
6164
- id_municipio_gestor: _id_municipio_gestor_apiFilterExp
6165
- }, _fetchMetadataApiFilterExpResolver]
6166
- }], context);
6167
- case 3:
6168
- return _context.abrupt("return", _context.sent);
6169
- case 4:
6170
- case "end":
6171
- return _context.stop();
6172
- }
6173
- }, _callee);
6174
- }));
6175
- return function (_x) {
6176
- return _ref2.apply(this, arguments);
6177
- };
6178
- }();
6179
- })
6180
- })
6181
- };
6182
- var SIZE_DEFAULT = 10;
6183
- var SIZE_MAX = 25;
6184
- var SIZE_MIN = 6;
6185
-
6186
- //
6187
- // Specify some utilities connected to the base setup
6188
- // but that will need specific placement at the indicator_type
6189
- // preset
6190
- //
6191
- // const $circleRadius = dynamic_sizing
6192
- // ? [
6193
- // 'interpolate',
6194
- // ['linear'],
6195
- // ['get', ['$get', 'view.conf.data.sizingVariable']], // Replace "density" with your property name
6196
- // ['$min', ['$get', 'view.metadata.sizingValues']],
6197
- // SIZE_MIN, // When qt_mat_fund_ai is 0, radius is 6
6198
- // ['$max', ['$get', 'view.metadata.sizingValues']],
6199
- // SIZE_MAX, // When qt_mat_fund_ai is 100, radius is 20
6200
- // ]
6201
- // : SIZE_DEFAULT
6202
-
6203
- var $circleRadius = sizing_variable_id ? ['$if', ['$gt', ['$get', 'length', ['$get', 'view.metadata.sizingValues']], 1], zoomSensitiveLinearSizes({
6204
- variable: ['get', sizing_variable_id],
6205
- minValue: ['$min', ['$get', 'view.metadata.sizingValues']],
6206
- maxValue: ['$max', ['$get', 'view.metadata.sizingValues']],
6207
- minSize: SIZE_MIN,
6208
- maxSize: SIZE_MAX
6209
- }),
6210
- // [
6211
- // 'interpolate',
6212
- // ['linear'],
6213
- // ['get', sizing_variable_id], // Replace "density" with your property name
6214
- // ['$min', ['$get', 'view.metadata.sizingValues']],
6215
- // SIZE_MIN, // When qt_mat_fund_ai is 0, radius is 6
6216
- // ['$max', ['$get', 'view.metadata.sizingValues']],
6217
- // SIZE_MAX, // When qt_mat_fund_ai is 100, radius is 20
6218
- // ],
6219
- SIZE_DEFAULT] : SIZE_DEFAULT;
6220
- var $tooltip = {
6221
- title: ['$literal', ['$get', 'feature.properties.str_nome_fantasia']],
6222
- entries: [['ID CNES', ['$literal', ['$get', 'feature.properties.id_cnes']]], [indicator_label, ['$literal', ['$coalesce', ['$get', "feature.properties.".concat(VARIABLE_ID, "::string({\n number: ").concat(JSON.stringify(number_format), ",\n boolean: {\n true: 'Sim',\n false: 'N\xE3o'\n }\n })")], 'Sem dados']]
6223
- // ['$literal', ['$get', `feature.properties.${VARIABLE_ID}::string`]],
6224
- ], sizing_variable_id ? [indicator_label, ['$literal', ['$get', "feature.properties.".concat(sizing_variable_id, "::string")]]] : null].filter(Boolean)
6225
- };
6226
- var $legends = sizing_variable_id ? [{
6227
- type: 'ProportionalSymbolLegend',
6228
- // unit: 'Matrículas',
6229
- title: indicator_label,
6230
- min: ['$min', ['$get', 'view.metadata.sizingValues']],
6231
- max: ['$max', ['$get', 'view.metadata.sizingValues']],
6232
- sizeMin: SIZE_MIN * 2,
6233
- sizeMax: SIZE_MAX * 2,
6234
- numberFormat: ['pt-BR', {
6235
- maximumFractionDigits: 0
6236
- }]
6237
- }] : [];
6238
- var typeParser = BY_TYPE[indicator_type];
6239
- if (!typeParser) {
6240
- console.warn("Ignoring unknown indicator_type ".concat(indicator_type));
6241
- return null;
6242
- }
6243
- return typeParser(base, _objectSpread2(_objectSpread2({}, viewSpec), {}, {
6244
- $circleRadius: $circleRadius,
6245
- $tooltip: $tooltip,
6246
- $legends: $legends,
6247
- $layerFilter: $layerFilter
6248
- }));
6249
- }
6250
-
6251
- var PRESETS = /*#__PURE__*/Object.freeze({
6252
- __proto__: null,
6253
- cem_censo_2010_2022: cem_censo_2010_2022,
6254
- cem_escolas_2022: cem_escolas_2022,
6255
- cem_saude_2024: cem_saude_2024
6256
- });
6257
-
6258
- function parseViewSpec(specInput, otherSpecInputs, context) {
6259
- specInput = unflat(specInput);
6260
- var preset = specInput.preset ? PRESETS[specInput.preset] : null;
6261
- return preset ? preset(specInput, otherSpecInputs, context) : specInput;
6262
- }
6263
-
6264
- //
6265
- // Autocasts values
6266
- //
6267
- function parseFromCsv(csvStr) {
6268
- return csvParse(csvStr).map(function (entry) {
6269
- return Object.fromEntries(Object.entries(entry).map(function (_a) {
6270
- var key = _a[0],
6271
- value = _a[1];
6272
- return [key, typeof value === 'string' ? value === '' ? undefined : strAutoCast(value) : value];
6273
- }));
6274
- });
6275
- }
6276
- function fetchViewSpecs(source) {
6277
- return __awaiter(this, void 0, void 0, function () {
6278
- var _a, _b, first, data;
6279
- return __generator(this, function (_c) {
6280
- switch (_c.label) {
6281
- case 0:
6282
- if (!(typeof source === 'string')) return [3 /*break*/, 2];
6283
- _a = parseFromCsv;
6284
- return [4 /*yield*/, fetch(source).then(function (res) {
6285
- return res.text();
6286
- })];
6287
- case 1:
6288
- return [2 /*return*/, _a.apply(void 0, [_c.sent()])];
6289
- case 2:
6290
- if (!(source instanceof File)) return [3 /*break*/, 4];
6291
- _b = parseFromCsv;
6292
- return [4 /*yield*/, fileReadAs(source, 'text')];
6293
- case 3:
6294
- return [2 /*return*/, _b.apply(void 0, [_c.sent()])];
6295
- case 4:
6296
- if (!Array.isArray(source)) return [3 /*break*/, 8];
6297
- first = source[0];
6298
- if (!isPlainObject(first)) return [3 /*break*/, 5];
6299
- //
6300
- // Assume the input is a resolved viewSpecInput array
6301
- //
6302
- return [2 /*return*/, source];
6303
- case 5:
6304
- return [4 /*yield*/, Promise.all(source.map(function (src) {
6305
- return fetchViewSpecs(src);
6306
- }))];
6307
- case 6:
6308
- data = _c.sent();
6309
- return [2 /*return*/, data.flat(1)];
6310
- case 7:
6311
- return [3 /*break*/, 9];
6312
- case 8:
6313
- throw new Error("Invalid source: ".concat(source));
6314
- case 9:
6315
- return [2 /*return*/];
6316
- }
6317
- });
6318
- });
6319
- }
6320
- var NO_COLLECTION = 'no_collection';
6321
- function resolveViewSpecs(viewSpecsInput, context) {
6322
- //
6323
- // Filter out specs that do not specify
6324
- // - collection_id or indicator_id
6325
- // - as well as those marked as skip
6326
- //
6327
- viewSpecsInput = viewSpecsInput.filter(function (specInput) {
6328
- return specInput.collection_id && specInput.collection_id.trim() && specInput.indicator_id && specInput.indicator_id.trim() && !specInput.skip;
6329
- });
6330
- //
6331
- // Group viewSpecsInput by collection_id
6332
- //
6333
- var byCollectionId = groupBy(viewSpecsInput, function (viewSpec) {
6334
- return viewSpec.collection_id || NO_COLLECTION;
6335
- });
6336
- var parsedSpecs = Object.entries(byCollectionId).flatMap(function (_a) {
6337
- var collection_id = _a[0],
6338
- viewSpecsInput = _a[1];
6339
- if (collection_id === NO_COLLECTION) {
6340
- console.warn("received a list of viewSpecs without collection_id", viewSpecsInput);
6341
- return [];
6342
- }
6343
- return viewSpecsInput.map(function (entry) {
6344
- return parseViewSpec(entry, viewSpecsInput, context);
6345
- })
6346
- // parseViewSpec may return an array of view specs
6347
- .flat(1)
6348
- // or no view spec
6349
- .filter(Boolean);
6350
- });
6351
- return uniqBy(parsedSpecs, function (viewSpec) {
6352
- return viewSpec.id;
6353
- });
6354
- }
6355
-
6356
1948
  var STAGE_VALUE_KEY = '_value';
6357
1949
  var STAGE_SPECIAL_KEYS = ['_dependencies', '_loading', STAGE_VALUE_KEY, '_query'];
6358
1950
  function _stageResolver(stageKey, additionalResolveFn) {
@@ -7076,11 +2668,6 @@ function useMapStyle(input, modifier) {
7076
2668
 
7077
2669
  var _excluded = ["layerId", "__filterFeaturesForStep"];
7078
2670
  var _templateObject, _templateObject2, _templateObject3;
7079
-
7080
- //
7081
- // List of municipio ids that are in the RM (Regiões Metropolitanas) dataset
7082
- //
7083
- var RM_MUNICIPIO_IDS_CEM = '/georedus/data/cem_rm_municipio_ids_20250401.csv';
7084
2671
  var LegendContainer = styled(Flex)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow:\n rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,\n rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;\n background-color: white;\n border-radius: 4px;\n"])));
7085
2672
  var SyncedMaps = makeSyncedMaps({
7086
2673
  components: {
@@ -7238,8 +2825,8 @@ function GeoReDUSInner(_ref2) {
7238
2825
  onSetGlobalState = _ref2.onSetState,
7239
2826
  api = _ref2.api,
7240
2827
  viewSpecs = _ref2.viewSpecs;
7241
- var METADATA_API_ENDPOINT = api.METADATA_API_ENDPOINT,
7242
- VECTOR_TILE_SERVER_ENDPOINT = api.VECTOR_TILE_SERVER_ENDPOINT;
2828
+ var METADATA_API_ENDPOINT = api.METADATA_API_ENDPOINT;
2829
+ api.VECTOR_TILE_SERVER_ENDPOINT;
7243
2830
 
7244
2831
  //
7245
2832
  // TODO: implement utility: useLocalReducer (like useLocalState)
@@ -7291,33 +2878,11 @@ function GeoReDUSInner(_ref2) {
7291
2878
  queryKey: ['ViewSpecs', municipioId],
7292
2879
  queryFn: function () {
7293
2880
  var _queryFn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7294
- var RM_MUNICIPIO_IDS, SPEC_SRCS;
7295
2881
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7296
2882
  while (1) switch (_context.prev = _context.next) {
7297
2883
  case 0:
7298
- _context.t0 = csvParse;
7299
- _context.next = 3;
7300
- return fetch(RM_MUNICIPIO_IDS_CEM).then(function (res) {
7301
- return res.text();
7302
- });
7303
- case 3:
7304
- _context.t1 = _context.sent;
7305
- RM_MUNICIPIO_IDS = (0, _context.t0)(_context.t1);
7306
- SPEC_SRCS = municipioId ? RM_MUNICIPIO_IDS.some(function (m) {
7307
- return m.id_municipio === municipioId;
7308
- }) ? viewSpecs.all : viewSpecs.censo_only : [];
7309
- _context.t2 = resolveViewSpecs;
7310
- _context.next = 9;
7311
- return fetchViewSpecs(SPEC_SRCS);
7312
- case 9:
7313
- _context.t3 = _context.sent;
7314
- _context.t4 = {
7315
- METADATA_API_ENDPOINT: METADATA_API_ENDPOINT,
7316
- VECTOR_TILE_SERVER_ENDPOINT: VECTOR_TILE_SERVER_ENDPOINT,
7317
- MAP_TILER_API_KEY: process.env.NEXT_PUBLIC_MAP_TILER_API_KEY
7318
- };
7319
- return _context.abrupt("return", (0, _context.t2)(_context.t3, _context.t4));
7320
- case 12:
2884
+ return _context.abrupt("return", viewSpecs.all);
2885
+ case 1:
7321
2886
  case "end":
7322
2887
  return _context.stop();
7323
2888
  }