Created
November 7, 2017 23:22
-
-
Save JuanBarros2/af1e0aa120b5f2ec8aedaadd6925ce9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"title": "Visualização retirada de dados da AESA/ANA", | |
"data": { | |
"url": "https://api.insa.gov.br/reservatorios/12172/monitoramento", | |
"format": { | |
"type": "json", | |
"property": "volumes", | |
"parse": { | |
"DataInformacao": "utc:'%d/%m/%Y'" | |
} | |
} | |
}, | |
"vconcat": [{ | |
"width": 800, | |
"height": 400, | |
"mark": "area", | |
"encoding": { | |
"x": { | |
"timeUnit": "yearmonthday", | |
"field": "DataInformacao", | |
"type": "temporal", | |
"scale": { | |
"domain": {"selection": "brush"} | |
}, | |
"axis": {"title": "Tempo"} | |
}, | |
"y": { | |
"field": "Volume", | |
"axis": {"title": "Volume"}, | |
"type": "quantitative" | |
}, | |
"color":{ | |
"type":"nominal", | |
"field":"Fonte" | |
} | |
} | |
}, { | |
"width": 800, | |
"height": 100, | |
"mark": "area", | |
"selection": { | |
"brush": {"type": "interval", "encodings": ["x"]} | |
}, | |
"encoding": { | |
"x": { | |
"timeUnit": "yearmonthday", | |
"field": "DataInformacao", | |
"type": "temporal", | |
"axis": {"title": "Tempo"} | |
}, | |
"y": { | |
"field": "VolumePercentual", | |
"type": "quantitative", | |
"axis": { "title": "Volume (%)"} | |
}, | |
"color":{ | |
"type":"nominal", | |
"field":"Fonte" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment