Last active
November 9, 2017 02:04
-
-
Save nathanmrtns/19ff137d1235d95c7f54d138d84f3f90 to your computer and use it in GitHub Desktop.
Lab1 - Visualização de Dados
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.6/vega.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/2.0.0-rc5/vega-lite.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-rc6/vega-embed.js"></script> | |
| <style> | |
| body { | |
| font-family: sans-serif; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="vis"></div> | |
| <script> | |
| const spec = "lab1.json"; | |
| vegaEmbed('#vis', spec).catch(console.warn); | |
| </script> | |
| </body> |
This file contains hidden or 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
| { | |
| "width":700, | |
| "$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
| "data": { | |
| "url":"https://api.insa.gov.br/reservatorios/12172/monitoramento", | |
| "format": { | |
| "type": "json", | |
| "property": "volumes" | |
| } | |
| }, | |
| "mark":"area", | |
| "encoding": { | |
| "x": {"field": "DataInformacao", "type": "temporal", "timeUnit": "year", | |
| "axis":{ | |
| "title": "Data" | |
| } | |
| }, | |
| "y": { | |
| "field": "VolumePercentual", "type": "quantitative", | |
| "axis":{ | |
| "title": "Volume (%)" | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment