generated from GeoDaCenter/webgeoda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map-config.js
123 lines (116 loc) · 2.62 KB
/
map-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import * as colors from "@webgeoda/utils/colors";
const data = [
{
name: 'Colorado Block Groups', // Plain english name for dataset
geodata: 'colorado_cbgs.geojson', // geospatial data to join to
id: 'GEOID', // fid / geoid join column
tables: {
acsData: {
file:'colorado-acs-cbg.csv',
join:'FIPS',
type:'characteristic'
}
},
},
{
name: 'Colorado Counties', // Plain english name for dataset
geodata: 'colorado_counties.geojson', // geospatial data to join to
id: 'GEOID', // fid / geoid join column
tables: {
acsData:{
file:'colorado-acs-county.csv',
join:'FIPS',
type:'characteristic'
}
},
},
];
const variables = [
{
variable: "Population Density",
numerator: "acsData",
nProperty: "Population",
denominator: "acsData",
dProperty: "Land Area",
binning: "percentileBreaks",
colorScale: colors.colorbrewer.YlGnBu,
},
{
variable: "Median Age",
numerator: "acsData",
nProperty: "Median Age",
binning: "quantileBreaks",
numberOfBins: 8,
colorScale: colors.colorbrewer.RdYlBu,
},
{
variable: "Median Household Income",
numerator: "acsData",
nProperty: "Median HH",
binning: "naturalBreaks",
numberOfBins: 8,
colorScale: colors.colorbrewer.PiYG,
},
{
variable: "Median Structure Year Built",
numerator: "acsData",
nProperty: "Median Structure Year",
binning: "quantileBreaks",
numberOfBins: 8,
colorScale: colors.colorbrewer.PuBuGn,
},
{
variable: "Median House Value",
numerator: "acsData",
nProperty: "Median Value",
binning: "stddev_breaks",
colorScale: colors.colorbrewer.Greens,
}
];
const mapModes = {
"2D": true,
"3D": false,
BubbleCartogram: false,
};
const widgets = [
{
display: "tray",
type: "scatter",
xVariable: "Median Household Income",
yVariable: "Median House Value",
options: {
regression:true
}
},
{
display: "tray",
type: "scatter",
xVariable: "Median Household Income",
yVariable: "Median House Value",
aggregate:"scale",
options: {
regssion:false
}
},
{
display:"tray",
type:"histogram",
variable:"Population Density",
options: {
xAxisLabel: 'People Per Square Mile',
yAxisLabel: 'Count of Geographies'
}
}
];
const style = {
mapboxStyle: 'mapbox://styles/dhalpern/cktkfleo714bm18qqzjhpbsaw?fresh=true',
underLayerId: 'waterway-shadow'
}
// 🦺 exports below -- you can safely ignore! 🦺 //
export const dataPresets = {
data,
variables,
mapModes,
widgets,
style
};