Skip to content

Instantly share code, notes, and snippets.

View eterna2's full-sized avatar
🐱
Cat daddy

Eterna2 eterna2

🐱
Cat daddy
View GitHub Profile
@eterna2
eterna2 / cars.json
Created October 17, 2018 10:18
vega-embed example 1
[
{
"Name": "chevrolet chevelle malibu",
"Miles_per_Gallon": 18,
"Cylinders": 8,
"Displacement": 307,
"Horsepower": 130,
"Weight_in_lbs": 3504,
"Acceleration": 12,
"Year": "1970-01-01",
@eterna2
eterna2 / README.md
Last active May 23, 2018 05:46
mapbox-gl-control example
@eterna2
eterna2 / README.md
Last active May 23, 2018 03:14
mapbox-gl-marker & mapbox-gl-popup example

mapbox-gl-marker & mapbox-gl-popup example

This is a simple gist to demonstrate how to plot a marker as well as attaching a popup to the marker.

mapbox-gl is a Polymer 2.0 element that uses WebGL to render interactive maps from vector tiles and Mapbox styles. mapbox-gl uses mapbox gl js under the hoods, and is not an official product by mapbox.

You can view mapbox-gl documentations and more examples at https://www.webcomponents.org/element/PolymerVis/mapbox-gl

@eterna2
eterna2 / README.md
Last active May 23, 2018 02:46
mapbox-layer example

mapbox-layer example

This is a simple gist to demonstrate how to use a dynamically generated mapbox-layer as well as to style the canvas for mapbox-gl.

mapbox-gl is a Polymer 2.0 element that uses WebGL to render interactive maps from vector tiles and Mapbox styles. mapbox-gl uses mapbox gl js under the hoods, and is not an official product by mapbox.

@eterna2
eterna2 / index.html
Last active December 10, 2017 15:02
Mapbox-gl with dom-repeat elements
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>mapbox-layer demo</title>
<base href="http://polygit.org/polymer+v2.3.1/super*+PolymerVis+*/components/">
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.20/webcomponents-lite.js"></script>
@eterna2
eterna2 / README.md
Last active September 28, 2017 10:10
vega-element basic demo

vega-element demo

A simple gist to demonstrate how to embed vega/vega-lite visualization using vega-element.

Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML.

Polymer is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.

Vega-Lite is a high-level grammar of interactive graphics. It provides a concise JSON syntax for rapidly generating visualizations to support analysis. Vega-Lite specifications can be compiled to Vega specifications.

@eterna2
eterna2 / .block
Last active September 28, 2017 08:19
vega-element demo 2
scrolling: yes
@eterna2
eterna2 / .block
Last active September 28, 2017 09:39
vega-element demo 1
scrolling: yes
@eterna2
eterna2 / rainfall-monthly-number-of-rain-days.csv
Created July 19, 2017 08:53
Vegalite viz on rainfall in sg
month no_of_rainy_days
1982-01 10
1982-02 5
1982-03 11
1982-04 14
1982-05 10
1982-06 8
1982-07 8
1982-08 11
1982-09 9
@eterna2
eterna2 / .block
Last active July 18, 2017 19:53
Develop a viz to help inform doctors on the drug effectiveness on bacteria infection.
height: 800
scrolling: yes