Skip to content

Instantly share code, notes, and snippets.

View crstn's full-sized avatar
💭
🤓

Carsten Keßler crstn

💭
🤓
View GitHub Profile
@crstn
crstn / gist:6552662
Last active December 23, 2015 00:19
Transforms JSON files exported from the moves API [1] into GeoJSON, which can then be used in a number of applications, such as CartoDB or Leaflet. [1] http://dev.moves-app.com
<?php
// this is the directory where you have your json files from the moves API stored
$dir = "/my/input/dir";
// this is where your geojson files will be stored
$outdir = "/my/output/dir";
$geojsonplaces = [
"type" => "FeatureCollection",
"features" => [ ],
];
@crstn
crstn / Query 1: Get all counts, sorted by date (new to old).sparql
Last active December 20, 2015 12:29
Demo for point in time data in HXL. See comments below for a how-to.
prefix hxl: <http://hxl.humanitarianresponse.info/ns/#>
SELECT ?population ?count ?date
WHERE {
GRAPH ?g {
?population hxl:personCount ?count .
?g hxl:validOn ?date .
}
} ORDER BY ?population DESC(?date)
@crstn
crstn / tomcat-users.xml
Created October 15, 2015 14:51
Tomcat user configuration for Strabon
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<user username="endpoint" password="endpoint" roles="manager"/>
</tomcat-users>
@crstn
crstn / enviroCar-track-1.json
Created October 13, 2015 15:10
enviroCar Track
This file has been truncated, but you can view the full file.
{
"features": [
{
"type": "Feature",
"properties": {
"phenomenons": {
"Engine Load": {
"value": 25.490196228027344
},
"GPS PDOP": {
@crstn
crstn / gist:3990276
Created October 31, 2012 22:09
My Fuseki configuration
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
@crstn
crstn / gist:3830081
Created October 3, 2012 21:47
MUSIL publications list
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:bibo="http://purl.org/ontology/bibo/">
<head>
<meta http-equiv="Content-Type" content="text/html" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
@crstn
crstn / SNIPPET-FROM-single.php
Created September 28, 2012 10:26
Blognavigation zwischen Einträgen
<div class="post" id="post-<?php the_ID(); ?>">
<div id="prev-post"><?php previous_post_link('%link', '&laquo;') ?></div>
<div id="next-post"><?php next_post_link('%link', '&raquo;') ?></div>
...
</div>
name Est. GDP in USD 2015 Applicants since 2011 Est. Pop 2015 Applicants by pop Applicants by GDP
Austria 380.555 104489 8.556 12.21236559 274.5700359
Belgium 463.799 79209 11.239 7.047691076 170.7830332
Bulgaria 51.551 27124 7.166 3.785096288 526.1585614
Denmark 297.359 35302 5.629 6.271451412 118.7184514
Finland 235.276 14361 5.506 2.60824555 61.03895
France 2469.530 255800 64.213 3.983617025 103.5824631
Germany 3413.483 547034 81.360 6.723623402 160.2568403
Greece 207.148 42800 10.993 3.893386701 206.6155599
Hungary 126.691 129203 9.857 13.10774069 1019.82777
<html>
<head>
<title>Leaflet template</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://raw.githubusercontent.com/calvinmetcalf/leaflet-ajax/master/dist/leaflet.ajax.min.js"></script>
<style>
html, body, #map {
height: 100%;
@crstn
crstn / evac_zones-simplified.geojson
Created August 11, 2014 17:02
NYC Flood Evacuation Zones Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.