Skip to content

Instantly share code, notes, and snippets.

View crazycapivara's full-sized avatar
👀

Stefan crazycapivara

👀
  • Kassel, Germany
View GitHub Profile
library(shiny)
library(dplyr)
library(deckgl)
### Setup
aggregate_df <- data.frame(
area = LETTERS[1:2],
count = 110:111,
median_lon = c( 3.39, 3.41 ),
median_lat = c( 49.7, 49.4 ),
function getStyle(feature, resolution) {
var color = "green";
const name = feature.get("name");
if (name.startsWith("A ")) color = "blue";
else if (name.startsWith("L ")) color = "red";
return new ol.style.Style({
stroke: new ol.style.Stroke({
color: color,
width: 2
})
@crazycapivara
crazycapivara / render-graphhopper-spt.html
Created June 7, 2019 08:12
render graphhopper spt endpoint with deckgl and d3
<html>
<head>
<title>graphhopper-csv-d3-deckgl</title>
<script src="https://d3js.org/d3-collection.v1.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v1.min.js"></script>
<script src="https://d3js.org/d3-dsv.v1.min.js"></script>
<script src="https://d3js.org/d3-request.v1.min.js"></script>
<script src="https://unpkg.com/deck.gl@7.0.11/dist.min.js"></script>