Use the gist: https://gist.github.com/jsundram/1918435
on this data: https://data.sfgov.org/Public-Works/Street-Tree-List/tkzw-k3nq
shapefiles from here: http://www.zillow.com/howto/api/neighborhood-boundaries.htm
minor changes were required.
| # Python Data Science Environment | |
| # | |
| # VERSION 1.0 | |
| # use ubuntu base image from dotCloud | |
| FROM ubuntu | |
| MAINTAINER Tristan Wietsma [email protected] | |
| # update and upgrade repos | |
| RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list |
Use the gist: https://gist.github.com/jsundram/1918435
on this data: https://data.sfgov.org/Public-Works/Street-Tree-List/tkzw-k3nq
shapefiles from here: http://www.zillow.com/howto/api/neighborhood-boundaries.htm
minor changes were required.
| // Start `node d3-server.js` | |
| // Then visit http://localhost:1337/ | |
| // | |
| var d3 = require('d3'), | |
| http = require('http') | |
| http.createServer(function (req, res) { | |
| // Chrome automatically sends a requests for favicons | |
| // Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't | |
| // fixed or this is a regression. |
| me: | |
| ifeq ($(USER), root) | |
| @echo "\c" | |
| else | |
| @echo "make \c" | |
| endif | |
| a: | |
| ifeq ($(USER), root) | |
| @echo "\c" |
| Step One | |
| Fetch URL based on column: | |
| 'http://www.datasciencetoolkit.org/maps/api/geocode/json?sensor=false&address=' + escape(value, 'url')' | |
| Step Two | |
| Parse Json for longitude: | |
| value.parseJson()["results"][0]["geometry"]["location"]["lng"] |
| #!/usr/bin/env python | |
| # A simple Python script to convert csv files to sqlite (with type guessing) | |
| # | |
| # @author: Rufus Pollock | |
| # Placed in the Public Domain | |
| import csv | |
| import sqlite3 | |
| def convert(filepath_or_fileobj, dbpath, table='data'): | |
| if isinstance(filepath_or_fileobj, basestring): |
| Getting started | |
| =============== | |
| # Make sure you have ggplot2 installed | |
| install.packages("ggplot2") | |
| library(ggplot2) | |
| Basic examples | |
| ============== |
| license: gpl-3.0 |
| #!/bin/sh | |
| R -e 'library(Rserve)' -e 'Rserve(args="--vanilla")' |
JSON PML: schemas for models
model-schema.json A generic ML model, containing fields shared by most models despite of their concrete type. It uses:
sample-schema.json The schema for dataset sampling specificationsfield-collection-schema.json Auxiliary schema describing a collection of field (or "properties") descriptorsgeneric-field-schema.json Properties shared by all fields, regardless of their type.field-schema.json The union schema of all field descriptor types, with their specific properties.tree-model-schema.json A specialization of the model schema to decision tree models. It uses:node-schema The schema for the nodes in a decision tree