{
"width": 3256,
"height": 1318,
"data": [
{
"name": "polytable1",
"format": "polys",
"shapeColGroup": "mapd",
"sql": "SELECT zipcodes.rowid,AVG(contributions_donotmodify.amount) AS avgContrib FROM contributions_donotmodify,zipcodes WHERE contributions_donotmodify.amount IS NOT NULL AND contributions_donotmodify.contributor_zipcode = zipcodes.ZCTA5CE10 GROUP BY zipcodes.rowid ORDER BY avgContrib DESC"
},
{
"name": "pointtable1",
"sql": "SELECT conv_4326_900913_x(lon) as x, conv_4326_900913_y(lat) as y, followers as size, lang as color, tweets_nov_feb.rowid FROM tweets_nov_feb WHERE ((lon >= -106.2517332069384 AND lon <= 20.61782341616376) AND (lat >= 6.994850384885396 AND lat <= 50.29482737427139))"
},
{
"name": "pointtable2",
"sql": "SELECT conv_4326_900913_x(lon) as x, conv_4326_900913_y(lat) as y, recipient_party as color, contributions_donotmodify.rowid FROM contributions_donotmodify WHERE ((lon >= -106.2517332069384 AND lon <= 20.61782341616376) AND (lat >= 6.994850384885396 AND lat <= 50.29482737427139))"
}
],
"scales": [
{
"name": "x",
"type": "linear",
"domain": [
-11827888.834876295,
2295165.6036380744
],
"range": "width"
},
{
"name": "y",
"type": "linear",
"domain": [
780604.6597033557,
6497492.175057318
],
"range": "height"
},
{
"name": "polytable1_fillColor",
"type": "quantize",
"domain": [
0,
5000
],
"range": [
"#115f9a",
"#1984c5",
"#22a7f0",
"#48b5c4",
"#76c68f",
"#a6d75b",
"#c9e52f",
"#d0ee11",
"#d0f400"
],
"default": "green",
"nullValue": "#CACACA"
},
{
"name": "pointtable1_size",
"type": "linear",
"domain": [
0,
5000
],
"range": [
2,
12
],
"clamp": true
},
{
"name": "pointtable1_fillColor",
"type": "ordinal",
"domain": [
"en",
"pt",
"es",
"in",
"und",
"ja",
"tr",
"fr",
"tl",
"ru",
"ar"
],
"range": [
"#27aeef",
"#ea5545",
"#87bc45",
"#b33dc6",
"#f46a9b",
"#ede15b",
"#bdcf32",
"#ef9b20",
"#4db6ac",
"#edbf33",
"#7c4dff"
],
"default": "#27aeef",
"nullValue": "#CACACA"
},
{
"name": "pointtable2_fillColor",
"type": "ordinal",
"domain": [
"D",
"R"
],
"range": [
"blue",
"red"
],
"default": "#27aeef",
"nullValue": "#CACACA"
}
],
"marks": [
{
"type": "polys",
"from": {
"data": "polytable1"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"fillColor": {
"scale": "polytable1_fillColor",
"field": "avgContrib"
},
"strokeColor": "white",
"strokeWidth": 0,
"lineJoin": "miter",
"miterLimit": 10
}
},
{
"type": "points",
"from": {
"data": "pointtable1"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"size": {
"scale": "pointtable1_size",
"field": "size"
},
"fillColor": {
"scale": "pointtable1_fillColor",
"field": "color"
}
}
},
{
"type": "points",
"from": {
"data": "pointtable2"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"size": 4,
"fillColor": {
"scale": "pointtable2_fillColor",
"field": "color"
}
}
}
]
}
Last active
August 30, 2017 17:25
-
-
Save mrblueblue/69186539af5377aa6ca28ab222c483e1 to your computer and use it in GitHub Desktop.
{
"width": 2362,
"height": 1318,
"data": [
{
"name": "polytable1",
"format": "polys",
"shapeColGroup": "mapd",
"sql": "SELECT zipcodes.rowid,AVG(contributions_donotmodify.amount) AS avgContrib FROM contributions_donotmodify,zipcodes WHERE contributions_donotmodify.amount IS NOT NULL AND contributions_donotmodify.contributor_zipcode = zipcodes.ZCTA5CE10 GROUP BY zipcodes.rowid ORDER BY avgContrib DESC"
},
{
"name": "pointtable1",
"sql": "SELECT conv_4326_900913_x(lon) as x,conv_4326_900913_y(lat) as y,lang as color,followers as size,tweets_nov_feb.rowid FROM tweets_nov_feb WHERE (lon >= -88.9108542135614 AND lon <= -41.15357724598496) AND (lat >= 21.678578465557663 AND lat <= 43.83207065845352) LIMIT 500000"
},
{
"name": "pointtable2",
"sql": "SELECT conv_4326_900913_x(lon) as x,conv_4326_900913_y(lat) as y,recipient_party as color,contributions_donotmodify.rowid FROM contributions_donotmodify WHERE (lon >= -88.9108542135614 AND lon <= -41.15357724598496) AND (lat >= 21.678578465557663 AND lat <= 43.83207065845352) LIMIT 500000"
}
],
"scales": [
{
"name": "x",
"type": "linear",
"domain": [
-9897511.01569065,
-4581195.262716134
],
"range": "width"
},
{
"name": "y",
"type": "linear",
"domain": [
2472978.207534605,
5439491.400774166
],
"range": "height"
},
{
"name": "polytable1_fillColor",
"type": "quantize",
"domain": [
0,
5000
],
"range": [
"#115f9a",
"#1984c5",
"#22a7f0",
"#48b5c4",
"#76c68f",
"#a6d75b",
"#c9e52f",
"#d0ee11",
"#d0f400"
],
"default": "green",
"nullValue": "#CACACA"
},
{
"name": "pointtable1_size",
"type": "linear",
"domain": [
0,
5000
],
"range": [
4,
24
],
"clamp": true
},
{
"name": "pointtable1_fillColor",
"type": "ordinal",
"domain": [
"en",
"pt",
"es",
"in",
"und",
"ja",
"tr",
"fr",
"tl",
"ru",
"ar"
],
"range": [
"#27aeef",
"#ea5545",
"#87bc45",
"#b33dc6",
"#f46a9b",
"#ede15b",
"#bdcf32",
"#ef9b20",
"#4db6ac",
"#edbf33",
"#7c4dff"
],
"default": "#80DEEA",
"nullValue": "#CACACA"
},
{
"name": "pointtable2_fillColor",
"type": "ordinal",
"domain": [
"D",
"R"
],
"range": [
"blue",
"red"
],
"default": "green",
"nullValue": "#CACACA"
}
],
"marks": [
{
"type": "polys",
"from": {
"data": "polytable1"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"fillColor": {
"scale": "polytable1_fillColor",
"field": "avgContrib"
},
"strokeColor": "white",
"strokeWidth": 0,
"lineJoin": "miter",
"miterLimit": 10
}
},
{
"type": "points",
"from": {
"data": "pointtable1"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"size": {
"scale": "pointtable1_size",
"field": "size"
},
"fillColor": {
"scale": "pointtable1_fillColor",
"field": "color"
}
}
},
{
"type": "points",
"from": {
"data": "pointtable2"
},
"properties": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"size": 4,
"fillColor": {
"scale": "pointtable2_fillColor",
"field": "color"
}
}
}
]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment