code stringlengths 2 1.05M |
|---|
import * as model from "./model";
import { getTestRun } from "../testRun/redux";
import { handleActions } from "redux-actions";
// Actions
const PREFIX = "STEP_DEFINITIONS";
const GET_STEP_DEFINITIONS = `${PREFIX}/GET_STEP_DEFINITIONS`;
const GET_STEP_DEFINITIONS_FULFILLED = `${GET_STEP_DEFINITIONS}_FULFILLED`;
// Action creators
export function loadTestRunStepDefinitionsPage({ testRunId }) {
return async (dispatch) => {
const testRunResult$ = dispatch(getTestRun({ testRunId }));
const stepDefinitionsResult$ = dispatch(getTestRunStepDefinitions({ testRunId }));
await testRunResult$;
await stepDefinitionsResult$;
return null;
};
}
export function getTestRunStepDefinitions({ testRunId }) {
return {
type: GET_STEP_DEFINITIONS,
payload: model.getStepDefinitions({ testRunId }),
meta: {
testRunId
}
};
}
// Reducer
const initialState = {
stepDefinitions: []
};
export const stepDefinitions = handleActions(
{
[GET_STEP_DEFINITIONS_FULFILLED]: (state, action) => ({
...state,
stepDefinitions: action.payload
})
},
initialState
);
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M9 11h3.63L9 15.2V17h6v-2h-3.63L15 10.8V9H9v2zM16.0564 3.3465l1.2812-1.5358 4.6074 3.8436-1.2812 1.5358zM3.3367 7.1896L2.0555 5.6538l4.6074-3.8436L7.944 3.346z" /><path d="M12 6c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7m0-2c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9z" /></React.Fragment>
, 'SnoozeSharp');
|
const scope = {};
const utils = require('./utils');
scope.defaultOptions = require('./defaultOptions');
scope.events = require('./utils/events');
scope.signals = new (require('./utils/Signals'));
utils.extend(scope, require('./utils/window'));
utils.extend(scope, require('./utils/domObjects'));
scope.documents = []; // all documents being listened to
scope.eventTypes = []; // all event types specific to interact.js
scope.withinInteractionLimit = function (interactable, element, action) {
const options = interactable.options;
const maxActions = options[action.name].max;
const maxPerElement = options[action.name].maxPerElement;
let activeInteractions = 0;
let targetCount = 0;
let targetElementCount = 0;
for (let i = 0, len = scope.interactions.length; i < len; i++) {
const interaction = scope.interactions[i];
const otherAction = interaction.prepared.name;
if (!interaction.interacting()) { continue; }
activeInteractions++;
if (activeInteractions >= scope.maxInteractions) {
return false;
}
if (interaction.target !== interactable) { continue; }
targetCount += (otherAction === action.name)|0;
if (targetCount >= maxActions) {
return false;
}
if (interaction.element === element) {
targetElementCount++;
if (otherAction !== action.name || targetElementCount >= maxPerElement) {
return false;
}
}
}
return scope.maxInteractions > 0;
};
scope.endAllInteractions = function (event) {
for (let i = 0; i < scope.interactions.length; i++) {
scope.interactions[i].pointerEnd(event, event);
}
};
scope.prefixedPropREs = utils.prefixedPropREs;
scope.signals.on('listen-to-document', function ({ doc }) {
// if document is already known
if (utils.contains(scope.documents, doc)) {
// don't call any further signal listeners
return false;
}
});
module.exports = scope;
|
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7H6V5h12v5zM4 15.5C4 17.43 5.57 19 7.5 19l-1.14 1.15c-.32.31-.1.85.35.85h10.58c.45 0 .67-.54.35-.85L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7H6V5h12v5z"
}), 'DirectionsRailwayRounded'); |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var configuration_1 = require('../jwt/configuration');
var Rx_1 = require('rxjs/Rx');
var base_http_service_1 = require('./base-http.service');
var core_1 = require('@angular/core');
var _ = require('underscore');
var ColumnService = (function () {
function ColumnService(baseHttp, configuration) {
this.baseHttp = baseHttp;
this.configuration = configuration;
this.getData = function getData(jsonFileName) {
var buildNumberUrl = "?buildNumber=" + this.getMeditureBuildNumber();
var jsonUrl = this.configuration.getJsonUrl(jsonFileName, buildNumberUrl);
return this.baseHttp.invoke(jsonUrl);
};
this.getColumns = function getColumns(jsonFileName) {
var _this = this;
var buildNumberUrl = "?buildNumber=" + this.getMeditureBuildNumber();
var jsonUrl = this.configuration.getJsonUrl(jsonFileName, buildNumberUrl);
var httpColumnSource = new Rx_1.Subject();
var httpColumnSource$ = httpColumnSource.asObservable();
var columns = {};
this.baseHttp.invoke(jsonUrl).subscribe(function (resp) {
var definitionMap = JSON.parse(resp._body);
_.forEach(definitionMap, function (definition) {
if (definition['attr']) {
columns[definition['attr']] = definition;
columns[definition['attr']]['id'] = definition['attr'];
}
});
/* definitionMap.map(definition => {
if (_.isString(definition)) {
let defaults = {
title: this.sentencify(definition.attr),
visible: true,
sortAttr: definition.attr,
editable: false,
viewTemplate: undefined,
editTemplate: undefined,
searchTemplate: undefined,
searchDescriptionTemplate: undefined
};
let outResp = _.chain(definition)
.defaults(defaults)
.tap(function (obj) {
_.each(obj, function (val, key) {
if (angular.isFunction(val)) {
obj[key] = val(obj);
}
});
})
.value();
}
}) */
httpColumnSource.next(columns);
}, function (error) {
_this.handleError(error);
});
return httpColumnSource$;
};
this.handleError = function handleError(error) {
console.error(error);
return Rx_1.Observable.throw(error || 'Server error');
};
this.sentencify = function sentencify(str) {
return str && str.replace(/([a-z])([A-Z])/g, "$1 $2");
};
this.getMeditureBuildNumber = function getMeditureBuildNumber() {
return window['buildNumber'] || window.top['buildNumber'] || Math.random();
};
}
ColumnService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [base_http_service_1.BaseHttpService, configuration_1.Configuration])
], ColumnService);
return ColumnService;
}());
exports.ColumnService = ColumnService;
//# sourceMappingURL=column.service.js.map |
// Nitrogen Compatibility Layer
function querySourceRaw(Id) {
var val, el = document.getElementById(Id);
if (!el) return "";
switch (el.tagName) {
case 'FIELDSET': val = document.querySelector('#' + Id + ' :checked');
val = val ? val.value : ""; break;
case 'INPUT':
switch (el.getAttribute("type")) {
case 'radio': case 'checkbox': val = el.checked ? el.value : ""; break;
case 'date': val = new Date(Date.parse(el.value)) || ""; break;
case 'calendar': val = pickers[el.id]._d || ""; break; //only 4 nitro #calendar{}
default: var edit = el.contentEditable;
if (edit && edit === 'true') val = el.innerHTML;
else val = el.value; }
break;
default: var edit = el.contentEditable;
if (edit && edit === 'true') val = el.innerHTML;
else val = el.value; }
return val; }
function querySource(Id) {
var qs = querySourceRaw(Id);
if(qs instanceof Date) { return tuple(qs.getFullYear(),(qs.getMonth()+1),qs.getDate()); }
else { return utf8_toByteArray(qs); } }
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime");
var _default = (0, _createSvgIcon.default)([/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M10 14h.74L8.82 5.56C8.61 4.65 7.8 4 6.87 4H4c-.55 0-1 .45-1 1s.45 1 1 1h2.87l1.42 6.25h-.01c-2.16.65-3.81 2.48-4.19 4.75H0v2h6v-1c0-2.21 1.79-4 4-4zm8.75-6h-.56l-1.35-3.69C16.55 3.52 15.8 3 14.96 3H12c-.55 0-1 .45-1 1s.45 1 1 1h2.96l1.1 3H10.4l.46 2H15c-.43.58-.75 1.25-.9 2h-2.79l.46 2h2.33c.44 2.23 2.31 3.88 4.65 3.99 3.16.15 5.88-2.83 5.12-6.1C23.34 9.57 21.13 8 18.75 8zm.13 8c-1.54-.06-2.84-1.37-2.88-2.92-.02-.96.39-1.8 1.05-2.36l.62 1.7c.19.52.76.79 1.28.6.52-.19.79-.76.6-1.28l-.63-1.73.01-.01c1.71-.04 3.07 1.29 3.07 3 0 1.72-1.38 3.06-3.12 3z"
}, "0"), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M10 15c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm0 4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"
}, "1")], 'BikeScooterRounded');
exports.default = _default; |
import UserType from 'kolibri.utils.UserType';
/**
* Vuex State Mappers
*
* The methods below help map data from
* the API to state in the Vuex store
*/
export function _userState(facilityUser) {
return {
id: facilityUser.id,
facility_id: facilityUser.facility,
username: facilityUser.username,
full_name: facilityUser.full_name,
kind: UserType(facilityUser),
is_superuser: facilityUser.is_superuser,
roles: facilityUser.roles,
};
}
|
/* @flow */
export default function noop(): void {
return undefined
}
|
/**
* @version: 1.2
* @author: Dan Grossman http://www.dangrossman.info/
* @date: 2013-07-25
* @copyright: Copyright (c) 2012-2013 Dan Grossman. All rights reserved.
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
* @website: http://www.improvely.com/
*/
!function ($) {
var DateRangePicker = function (element, options, cb) {
var hasOptions = typeof options == 'object';
var localeObject;
//option defaults
this.startDate = moment().startOf('day');
this.endDate = moment().startOf('day');
this.minDate = false;
this.maxDate = false;
this.dateLimit = false;
this.showDropdowns = false;
this.showWeekNumbers = false;
this.timePicker = false;
this.timePickerIncrement = 30;
this.timePicker12Hour = true;
this.ranges = {};
this.opens = 'right';
this.buttonClasses = ['btn', 'btn-small'];
this.applyClass = 'btn-success';
this.cancelClass = 'btn-default';
this.format = 'MM/DD/YYYY';
this.separator = ' - ';
this.locale = {
applyLabel: 'Apply',
cancelLabel: 'Cancel',
fromLabel: 'From',
toLabel: 'To',
weekLabel: 'W',
customRangeLabel: 'Custom Range',
daysOfWeek: moment()._lang._weekdaysMin,
monthNames: moment()._lang._monthsShort,
firstDay: 0
};
this.cb = function () {
};
//element that triggered the date range picker
this.element = $(element);
if (this.element.hasClass('pull-right'))
this.opens = 'left';
if (this.element.is('input')) {
this.element.on({
click: $.proxy(this.show, this),
focus: $.proxy(this.show, this)
});
} else {
this.element.on('click', $.proxy(this.show, this));
}
localeObject = this.locale;
if (hasOptions) {
if (typeof options.locale == 'object') {
$.each(localeObject, function (property, value) {
localeObject[property] = options.locale[property] || value;
});
}
if (options.applyClass) {
this.applyClass = options.applyClass;
}
if (options.cancelClass) {
this.cancelClass = options.cancelClass;
}
}
var DRPTemplate = '<div class="daterangepicker dropdown-menu">' +
'<div class="calendar left"></div>' +
'<div class="calendar right"></div>' +
'<div class="ranges">' +
'<div class="range_inputs">' +
'<div class="daterangepicker_start_input" style="float: left">' +
'<label for="daterangepicker_start">' + this.locale.fromLabel + '</label>' +
'<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />' +
'</div>' +
'<div class="daterangepicker_end_input" style="float: left; padding-left: 11px">' +
'<label for="daterangepicker_end">' + this.locale.toLabel + '</label>' +
'<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />' +
'</div>' +
'<button class="' + this.applyClass + ' applyBtn" disabled="disabled">' + this.locale.applyLabel + '</button> ' +
'<button class="' + this.cancelClass + ' cancelBtn">' + this.locale.cancelLabel + '</button>' +
'</div>' +
'</div>' +
'</div>';
this.container = $(DRPTemplate).appendTo('body');
if (hasOptions) {
if (typeof options.format == 'string')
this.format = options.format;
if (typeof options.separator == 'string')
this.separator = options.separator;
if (typeof options.startDate == 'string')
this.startDate = moment(options.startDate, this.format);
if (typeof options.endDate == 'string')
this.endDate = moment(options.endDate, this.format);
if (typeof options.minDate == 'string')
this.minDate = moment(options.minDate, this.format);
if (typeof options.maxDate == 'string')
this.maxDate = moment(options.maxDate, this.format);
if (typeof options.startDate == 'object')
this.startDate = moment(options.startDate);
if (typeof options.endDate == 'object')
this.endDate = moment(options.endDate);
if (typeof options.minDate == 'object')
this.minDate = moment(options.minDate);
if (typeof options.maxDate == 'object')
this.maxDate = moment(options.maxDate);
if (typeof options.ranges == 'object') {
for (var range in options.ranges) {
var start = moment(options.ranges[range][0]);
var end = moment(options.ranges[range][1]);
// If we have a min/max date set, bound this range
// to it, but only if it would otherwise fall
// outside of the min/max.
if (this.minDate && start.isBefore(this.minDate))
start = moment(this.minDate);
if (this.maxDate && end.isAfter(this.maxDate))
end = moment(this.maxDate);
// If the end of the range is before the minimum (if min is set) OR
// the start of the range is after the max (also if set) don't display this
// range option.
if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) {
continue;
}
this.ranges[range] = [start, end];
}
var list = '<ul>';
for (var range in this.ranges) {
list += '<li>' + range + '</li>';
}
list += '<li>' + this.locale.customRangeLabel + '</li>';
list += '</ul>';
this.container.find('.ranges').prepend(list);
}
if (typeof options.dateLimit == 'object')
this.dateLimit = options.dateLimit;
// update day names order to firstDay
if (typeof options.locale == 'object') {
if (typeof options.locale.firstDay == 'number') {
this.locale.firstDay = options.locale.firstDay;
var iterator = options.locale.firstDay;
while (iterator > 0) {
this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
iterator--;
}
}
}
if (typeof options.opens == 'string')
this.opens = options.opens;
if (typeof options.showWeekNumbers == 'boolean') {
this.showWeekNumbers = options.showWeekNumbers;
}
if (typeof options.buttonClasses == 'string') {
this.buttonClasses = [options.buttonClasses];
}
if (typeof options.buttonClasses == 'object') {
this.buttonClasses = options.buttonClasses;
}
if (typeof options.showDropdowns == 'boolean') {
this.showDropdowns = options.showDropdowns;
}
if (typeof options.timePicker == 'boolean') {
this.timePicker = options.timePicker;
}
if (typeof options.timePickerIncrement == 'number') {
this.timePickerIncrement = options.timePickerIncrement;
}
if (typeof options.timePicker12Hour == 'boolean') {
this.timePicker12Hour = options.timePicker12Hour;
}
}
if (!this.timePicker) {
this.startDate = this.startDate.startOf('day');
this.endDate = this.endDate.startOf('day');
}
//apply CSS classes to buttons
var c = this.container;
$.each(this.buttonClasses, function (idx, val) {
c.find('button').addClass(val);
});
if (this.opens == 'right') {
//swap calendar positions
var left = this.container.find('.calendar.left');
var right = this.container.find('.calendar.right');
left.removeClass('left').addClass('right');
right.removeClass('right').addClass('left');
}
if (typeof options == 'undefined' || typeof options.ranges == 'undefined') {
this.container.find('.calendar').show();
this.move();
}
if (typeof cb == 'function')
this.cb = cb;
this.container.addClass('opens' + this.opens);
//try parse date if in text input
if (!hasOptions || (typeof options.startDate == 'undefined' && typeof options.endDate == 'undefined')) {
if ($(this.element).is('input[type=text]')) {
var val = $(this.element).val();
var split = val.split(this.separator);
var start, end;
if (split.length == 2) {
start = moment(split[0], this.format);
end = moment(split[1], this.format);
}
if (start != null && end != null) {
this.startDate = start;
this.endDate = end;
}
}
}
//state
this.oldStartDate = this.startDate;
this.oldEndDate = this.endDate;
this.leftCalendar = {
month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute()]),
calendar: []
};
this.rightCalendar = {
month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute()]),
calendar: []
};
//event listeners
this.container.on('mousedown', $.proxy(this.mousedown, this));
this.container.find('.calendar').on('click', '.prev', $.proxy(this.clickPrev, this));
this.container.find('.calendar').on('click', '.next', $.proxy(this.clickNext, this));
this.container.find('.ranges').on('click', 'button.applyBtn', $.proxy(this.clickApply, this));
this.container.find('.ranges').on('click', 'button.cancelBtn', $.proxy(this.clickCancel, this));
this.container.find('.calendar').on('click', 'td.available', $.proxy(this.clickDate, this));
this.container.find('.calendar').on('mouseenter', 'td.available', $.proxy(this.enterDate, this));
this.container.find('.calendar').on('mouseleave', 'td.available', $.proxy(this.updateView, this));
this.container.find('.ranges').on('click', 'li', $.proxy(this.clickRange, this));
this.container.find('.ranges').on('mouseenter', 'li', $.proxy(this.enterRange, this));
this.container.find('.ranges').on('mouseleave', 'li', $.proxy(this.updateView, this));
this.container.find('.calendar').on('change', 'select.yearselect', $.proxy(this.updateYear, this));
this.container.find('.calendar').on('change', 'select.monthselect', $.proxy(this.updateMonth, this));
this.container.find('.calendar').on('change', 'select.hourselect', $.proxy(this.updateTime, this));
this.container.find('.calendar').on('change', 'select.minuteselect', $.proxy(this.updateTime, this));
this.container.find('.calendar').on('change', 'select.ampmselect', $.proxy(this.updateTime, this));
this.element.on('keyup', $.proxy(this.updateFromControl, this));
this.updateView();
this.updateCalendars();
};
DateRangePicker.prototype = {
constructor: DateRangePicker,
mousedown: function (e) {
e.stopPropagation();
},
updateView: function () {
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());
this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));
this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));
if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) {
this.container.find('button.applyBtn').removeAttr('disabled');
} else {
this.container.find('button.applyBtn').attr('disabled', 'disabled');
}
},
updateFromControl: function () {
if (!this.element.is('input')) return;
if (!this.element.val().length) return;
var dateString = this.element.val().split(this.separator);
var start = moment(dateString[0], this.format);
var end = moment(dateString[1], this.format);
if (start == null || end == null) return;
if (end.isBefore(start)) return;
this.startDate = start;
this.endDate = end;
this.updateView();
this.cb(this.startDate, this.endDate);
this.updateCalendars();
},
notify: function () {
this.updateView();
this.cb(this.startDate, this.endDate);
},
move: function () {
var minWidth = $(this.container).find('.ranges').outerWidth();
if ($(this.container).find('.calendar').is(':visible')) {
var padding = 24; // FIXME: this works for the default styling, but isn't flexible
minWidth += $(this.container).find('.calendar').outerWidth() * 2 + padding;
}
if (this.opens == 'left') {
this.container.css({
top: this.element.offset().top + this.element.outerHeight(),
right: $(window).width() - this.element.offset().left - this.element.outerWidth(),
left: 'auto',
'min-width': minWidth
});
if (this.container.offset().left < 0) {
this.container.css({
right: 'auto',
left: 9
});
}
} else {
this.container.css({
top: this.element.offset().top + this.element.outerHeight(),
left: this.element.offset().left,
right: 'auto',
'min-width': minWidth
});
if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {
this.container.css({
left: 'auto',
right: 0
});
}
}
},
show: function (e) {
this.container.show();
this.move();
if (e) {
e.stopPropagation();
e.preventDefault();
}
this.oldStartDate = this.startDate;
this.oldEndDate = this.endDate;
$(document).on('mousedown', $.proxy(this.hide, this));
this.element.trigger('shown', {target: e.target, picker: this});
},
hide: function (e) {
this.container.hide();
if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
this.notify();
$(document).off('mousedown', this.hide);
this.element.trigger('hidden', {picker: this});
},
enterRange: function (e) {
var label = e.target.innerHTML;
if (label == this.locale.customRangeLabel) {
this.updateView();
} else {
var dates = this.ranges[label];
this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));
this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));
}
},
clickRange: function (e) {
var label = e.target.innerHTML;
if (label == this.locale.customRangeLabel) {
this.container.find('.calendar').show();
this.move();
} else {
var dates = this.ranges[label];
this.startDate = dates[0];
this.endDate = dates[1];
if (!this.timePicker) {
this.startDate.startOf('day');
this.endDate.startOf('day');
}
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());
this.updateCalendars();
this.container.find('.calendar').hide();
this.hide();
}
},
clickPrev: function (e) {
var cal = $(e.target).parents('.calendar');
if (cal.hasClass('left')) {
this.leftCalendar.month.subtract('month', 1);
} else {
this.rightCalendar.month.subtract('month', 1);
}
this.updateCalendars();
},
clickNext: function (e) {
var cal = $(e.target).parents('.calendar');
if (cal.hasClass('left')) {
this.leftCalendar.month.add('month', 1);
} else {
this.rightCalendar.month.add('month', 1);
}
this.updateCalendars();
},
enterDate: function (e) {
var title = $(e.target).attr('data-title');
var row = title.substr(1, 1);
var col = title.substr(3, 1);
var cal = $(e.target).parents('.calendar');
if (cal.hasClass('left')) {
this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));
} else {
this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));
}
},
clickDate: function (e) {
var title = $(e.target).attr('data-title');
var row = title.substr(1, 1);
var col = title.substr(3, 1);
var cal = $(e.target).parents('.calendar');
if (cal.hasClass('left')) {
var startDate = this.leftCalendar.calendar[row][col];
var endDate = this.endDate;
if (typeof this.dateLimit == 'object') {
var maxDate = moment(startDate).add(this.dateLimit).startOf('day');
if (endDate.isAfter(maxDate)) {
endDate = maxDate;
}
}
} else {
var startDate = this.startDate;
var endDate = this.rightCalendar.calendar[row][col];
if (typeof this.dateLimit == 'object') {
var minDate = moment(endDate).subtract(this.dateLimit).startOf('day');
if (startDate.isBefore(minDate)) {
startDate = minDate;
}
}
}
cal.find('td').removeClass('active');
if (startDate.isSame(endDate) || startDate.isBefore(endDate)) {
$(e.target).addClass('active');
this.startDate = startDate;
this.endDate = endDate;
} else if (startDate.isAfter(endDate)) {
$(e.target).addClass('active');
this.startDate = startDate;
this.endDate = moment(startDate).add('day', 1).startOf('day');
}
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());
this.updateCalendars();
},
clickApply: function (e) {
if (this.element.is('input'))
this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format));
this.hide();
},
clickCancel: function (e) {
this.startDate = this.oldStartDate;
this.endDate = this.oldEndDate;
this.updateView();
this.updateCalendars();
this.hide();
},
updateYear: function (e) {
var year = parseInt($(e.target).val());
var isLeft = $(e.target).closest('.calendar').hasClass('left');
if (isLeft) {
this.leftCalendar.month.month(this.startDate.month()).year(year);
} else {
this.rightCalendar.month.month(this.endDate.month()).year(year);
}
this.updateCalendars();
},
updateMonth: function (e) {
var month = parseInt($(e.target).val());
var isLeft = $(e.target).closest('.calendar').hasClass('left');
if (isLeft) {
this.leftCalendar.month.month(month).year(this.startDate.year());
} else {
this.rightCalendar.month.month(month).year(this.endDate.year());
}
this.updateCalendars();
},
updateTime: function (e) {
var isLeft = $(e.target).closest('.calendar').hasClass('left');
var cal = this.container.find('.calendar.left');
if (!isLeft)
cal = this.container.find('.calendar.right');
var hour = parseInt(cal.find('.hourselect').val());
var minute = parseInt(cal.find('.minuteselect').val());
if (this.timePicker12Hour) {
var ampm = cal.find('.ampmselect').val();
if (ampm == 'PM' && hour < 12)
hour += 12;
}
if (isLeft) {
var start = this.startDate;
start.hour(hour);
start.minute(minute);
this.startDate = start;
this.leftCalendar.month.hour(hour).minute(minute);
} else {
var end = this.endDate;
end.hour(hour);
end.minute(minute);
this.endDate = end;
this.rightCalendar.month.hour(hour).minute(minute);
}
this.updateCalendars();
},
updateCalendars: function () {
this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), 'left');
this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), 'right');
this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate));
this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.startDate, this.maxDate));
this.container.find('.ranges li').removeClass('active');
var customRange = true;
var i = 0;
for (var range in this.ranges) {
if (this.timePicker) {
if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {
customRange = false;
this.container.find('.ranges li:eq(' + i + ')').addClass('active');
}
} else {
//ignore times when comparing dates if time picker is not enabled
if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
customRange = false;
this.container.find('.ranges li:eq(' + i + ')').addClass('active');
}
}
i++;
}
if (customRange)
this.container.find('.ranges li:last').addClass('active');
},
buildCalendar: function (month, year, hour, minute, side) {
var firstDay = moment([year, month, 1]);
var lastMonth = moment(firstDay).subtract('month', 1).month();
var lastYear = moment(firstDay).subtract('month', 1).year();
var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
var dayOfWeek = firstDay.day();
//initialize a 6 rows x 7 columns array for the calendar
var calendar = [];
for (var i = 0; i < 6; i++) {
calendar[i] = [];
}
//populate the calendar with date objects
var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
if (startDay > daysInLastMonth)
startDay -= 7;
if (dayOfWeek == this.locale.firstDay)
startDay = daysInLastMonth - 6;
var curDate = moment([lastYear, lastMonth, startDay, hour, minute]);
for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('day', 1)) {
if (i > 0 && col % 7 == 0) {
col = 0;
row++;
}
calendar[row][col] = curDate;
}
return calendar;
},
renderDropdowns: function (selected, minDate, maxDate) {
var currentMonth = selected.month();
var monthHtml = '<select class="monthselect">';
var inMinYear = false;
var inMaxYear = false;
for (var m = 0; m < 12; m++) {
if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {
monthHtml += "<option value='" + m + "'" +
(m === currentMonth ? " selected='selected'" : "") +
">" + this.locale.monthNames[m] + "</option>";
}
}
monthHtml += "</select>";
var currentYear = selected.year();
var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
var minYear = (minDate && minDate.year()) || (currentYear - 50);
var yearHtml = '<select class="yearselect">'
for (var y = minYear; y <= maxYear; y++) {
yearHtml += '<option value="' + y + '"' +
(y === currentYear ? ' selected="selected"' : '') +
'>' + y + '</option>';
}
yearHtml += '</select>';
return monthHtml + yearHtml;
},
renderCalendar: function (calendar, selected, minDate, maxDate) {
var html = '<div class="calendar-date">';
html += '<table class="table-condensed">';
html += '<thead>';
html += '<tr>';
// add empty cell for week number
if (this.showWeekNumbers)
html += '<th></th>';
if (!minDate || minDate.isBefore(calendar[1][1])) {
html += '<th class="prev available"><i class="icon-arrow-left"></i></th>';
} else {
html += '<th></th>';
}
var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
if (this.showDropdowns) {
dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate);
}
html += '<th colspan="5" style="width: auto">' + dateHtml + '</th>';
if (!maxDate || maxDate.isAfter(calendar[1][1])) {
html += '<th class="next available"><i class="icon-arrow-right"></i></th>';
} else {
html += '<th></th>';
}
html += '</tr>';
html += '<tr>';
// add week number label
if (this.showWeekNumbers)
html += '<th class="week">' + this.locale.weekLabel + '</th>';
$.each(this.locale.daysOfWeek, function (index, dayOfWeek) {
html += '<th>' + dayOfWeek + '</th>';
});
html += '</tr>';
html += '</thead>';
html += '<tbody>';
for (var row = 0; row < 6; row++) {
html += '<tr>';
// add week number
if (this.showWeekNumbers)
html += '<td class="week">' + calendar[row][0].week() + '</td>';
for (var col = 0; col < 7; col++) {
var cname = 'available ';
cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off';
if ((minDate && calendar[row][col].isBefore(minDate)) || (maxDate && calendar[row][col].isAfter(maxDate))) {
cname = ' off disabled ';
} else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) {
cname += ' active ';
if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) {
cname += ' start-date ';
}
if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) {
cname += ' end-date ';
}
} else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) {
cname += ' in-range ';
if (calendar[row][col].isSame(this.startDate)) {
cname += ' start-date ';
}
if (calendar[row][col].isSame(this.endDate)) {
cname += ' end-date ';
}
}
var title = 'r' + row + 'c' + col;
html += '<td class="' + cname.replace(/\s+/g, ' ').replace(/^\s?(.*?)\s?$/, '$1') + '" data-title="' + title + '">' + calendar[row][col].date() + '</td>';
}
html += '</tr>';
}
html += '</tbody>';
html += '</table>';
html += '</div>';
if (this.timePicker) {
html += '<div class="calendar-time">';
html += '<select class="hourselect">';
var start = 0;
var end = 23;
var selected_hour = selected.hour();
if (this.timePicker12Hour) {
start = 1;
end = 12;
if (selected_hour >= 12)
selected_hour -= 12;
if (selected_hour == 0)
selected_hour = 12;
}
for (var i = start; i <= end; i++) {
if (i == selected_hour) {
html += '<option value="' + i + '" selected="selected">' + i + '</option>';
} else {
html += '<option value="' + i + '">' + i + '</option>';
}
}
html += '</select> : ';
html += '<select class="minuteselect">';
for (var i = 0; i < 60; i += this.timePickerIncrement) {
var num = i;
if (num < 10)
num = '0' + num;
if (i == selected.minute()) {
html += '<option value="' + i + '" selected="selected">' + num + '</option>';
} else {
html += '<option value="' + i + '">' + num + '</option>';
}
}
html += '</select> ';
if (this.timePicker12Hour) {
html += '<select class="ampmselect">';
if (selected.hour() >= 12) {
html += '<option value="AM">AM</option><option value="PM" selected="selected">PM</option>';
} else {
html += '<option value="AM" selected="selected">AM</option><option value="PM">PM</option>';
}
html += '</select>';
}
html += '</div>';
}
return html;
}
};
$.fn.daterangepicker = function (options, cb) {
this.each(function () {
var el = $(this);
if (!el.data('daterangepicker'))
el.data('daterangepicker', new DateRangePicker(el, options, cb));
});
return this;
};
}(window.jQuery); |
/* jshint node: true */
'use strict';
module.exports = {
name: 'yebo-ember-storefront',
included: function(app) {
this._super.included(app);
// Nested Addons don't contribute to the Host Application filestructure.
// To ensure the initializers from core and checkouts are run, we include
// them as dependencies rather than devDependencies, and manually invoke
// the Addon included hooks as necessary.
this.addons.forEach(function(addon){
if (addon.name.substring(0, 11) === "yebo-ember") {
addon.included.apply(addon, [app]);
}
});
app.import('vendor/register-storefront.js');
var options = app.options['yebo-ember-storefront'] || {};
if (!options.disableNormalize) {
app.import('vendor/normalize.css');
}
if (!options.disableFoundation) {
app.import('vendor/foundation.min.css');
}
}
};
|
describe('User signout', function() {
it('Perform signout', function() {
// Click dropdown button
element(by.id('profile_dropdown'))
.element(by.className('dropdown')).click();
// Click signout
element(by.className('dropdown-menu'))
.element(by.linkText('Signout')).click();
});
}); |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z" />
, 'FontDownload');
|
var Annotation = (function Annotation() {
var Annotation = {
annotator: null,
// Range that we got from the current selection
_selectedRange: null,
range: {
startContainerXPath: null,
endContainerXPath: null,
parentContainerXPath: null,
startOffset: null,
endOffset: null
},
id: null,
selectedText: null,
color: null,
note: null,
tags: [],
init: function(obj) {
if(!obj) return;
if(obj.annotator) {
this.annotator = obj.annotator;
}
if(obj.selectedRange) {
this.saveSelection(obj.selectedRange);
} else if(obj.savedAnnotation) {
var savedAnnotation = obj.savedAnnotation;
this.range = savedAnnotation.range;
this.id = savedAnnotation.id;
this.selectedText = savedAnnotation.selectedText;
this.color = savedAnnotation.color;
this.note = savedAnnotation.note;
this.tags = savedAnnotation.tags;
}
},
render: function(opts) {
if(opts && opts.temporary) {
this.wrapNodes(true);
} else if(opts && opts.convert) {
this.convertFromTemporary();
} else if(opts && opts.update) {
this.updateAnnotation();
} else {
this.wrapNodes();
}
},
updateAnnotation: function() {
var $parentContainer = $(this.annotator.findElementByXPath(this.range.parentContainerXPath));
var renderedAnnotation = $parentContainer
.find(".annotation[data-id='" + this.id + "']");
renderedAnnotation.removeClass("annotation");
renderedAnnotation
.removeAttr("class")
.addClass("annotation")
.addClass(this.color)
.removeAttr("style");
},
saveSelection: function(range) {
var parentContainer = range.commonAncestorContainer;
var startContainer = range.startContainer;
var endContainer = range.endContainer;
var startOffset = range.startOffset;
var endOffset = range.endOffset;
var parentNode = this.getParentNodeFor(parentContainer);
var startNode = this.getParentNodeFor(startContainer);
var endNode = this.getParentNodeFor(endContainer);
var nodesBetweenStart = this.getNodesToWrap(parentNode, startNode.firstChild, startContainer);
var nodesBetweenEnd = this.getNodesToWrap(parentNode, endNode.firstChild, endContainer);
void 0;
if(nodesBetweenStart.length) {
for(var i = 0; i < nodesBetweenStart.length; i++) {
var characterLength = nodesBetweenStart[i].nodeValue.length;
startOffset += characterLength;
// endOffset += characterLength;
}
}
if(nodesBetweenEnd.length) {
for(var i = 0; i < nodesBetweenEnd.length; i++) {
endOffset += nodesBetweenEnd[i].nodeValue.length;
}
}
var selectedContent = this.getSelectionContent(range);
// clone this for easily wrapping children
// without having to go through the full circle of
// looking up by xpath
this._selectedRange = range.cloneRange();
// store range properties because
// we need it when we save this annotation
// to server
this.range = {
startContainerXPath: this.annotator.createXPathFromElement(startNode),
endContainerXPath: this.annotator.createXPathFromElement(endNode),
parentContainerXPath: this.annotator.createXPathFromElement(parentNode),
startOffset: startOffset,
endOffset: endOffset,
};
this.id = this.generateRandomID();
this.selectedText = selectedContent;
},
getSelectionContent: function(range) {
var container = document.createElement("div");
container.appendChild(range.cloneContents());
var text = container.textContent;
return text;
},
getParentNodeFor: function(node) {
while(node.nodeType != 1) {
node = node.parentNode;
}
return node;
},
generateRandomID: function() {
return 'annotation-' + new Date().getTime();
},
save: function(obj) {
if(!obj) return;
this.color = obj.color;
if(obj.note)
this.note = obj.note;
if(obj.tags && obj.tags.length) {
this.tags = obj.tags
}
var data = this.serialize();
if(obj && obj.debug) {
void 0;
} else {
this.postToRemote();
}
if(obj && obj.cbk) obj.cbk(this);
},
destroy: function(cbk) {
void 0;
if(cbk) cbk();
},
postToRemote: function() {
// TODO
void 0;
},
serialize: function() {
var range = this.range;
return {
range: {
startOffset: range.startOffset,
endOffset: range.endOffset,
startContainerXPath: range.startContainerXPath,
endContainerXPath: range.endContainerXPath,
parentContainerXPath: range.parentContainerXPath
},
id: this.id,
selectedText: this.selectedText,
color: this.color,
note: this.note,
tags: this.tags
}
},
getContainedNodes: function() {
var range, startContainer, endContainer, parentContainer, startOffset, endOffset;
var nodes = [];
if(this._selectedRange) {
range = this._selectedRange;
parentContainer = range.commonAncestorContainer;
startContainer = range.startContainer;
endContainer = range.endContainer
} else {
range = this.range;
range.parentContainer = parentContainer = this.annotator.findElementByXPath(range.parentContainerXPath);
range.startContainer = startContainer = this.annotator.findElementByXPath(range.startContainerXPath);
range.endContainer = endContainer = this.annotator.findElementByXPath(range.endContainerXPath);
}
startOffset = range.startOffset;
endOffset = range.endOffset;
if(startContainer.nodeType == Node.ELEMENT_NODE) {
var startContainerParams = this.getTextNodeAtOffset(startContainer, startOffset);
startContainer = startContainerParams[0];
startOffset = startOffset - startContainerParams[1];
}
if(endContainer.nodeType == Node.ELEMENT_NODE) {
var endContainerParams = this.getTextNodeAtOffset(endContainer, endOffset);
endContainer = endContainerParams[0];
endOffset = endOffset - endContainerParams[1];
}
if(startContainer == endContainer) {
if(startContainer.nodeType != Node.ELEMENT_NODE) {
var startTextNode = startContainer.splitText(startOffset);
endContainer = startTextNode;
endOffset = endOffset - startOffset;
var endTextNode = endContainer.splitText(endOffset);
nodes.push(endContainer);
}
} else {
if(startContainer.nodeType != Node.ELEMENT_NODE) {
var startTextNode = startContainer.splitText(startOffset);
nodes.push(startTextNode);
}
if(endContainer.nodeType != Node.ELEMENT_NODE) {
var endTextNode = endContainer.splitText(endOffset);
nodes.push(endContainer);
}
var innerNodes = this.getNodesToWrap(parentContainer, startContainer.nextSibling, endContainer);
for(var i = 0; i < innerNodes.length; i++) {
nodes.push(innerNodes[i]);
}
}
return nodes;
},
getTextNodeAtOffset: function(rootNode, offset) {
var textNode,
count = 0,
found = false,
countUptoPrev = 0;
function getTextNodes(node) {
if (node.nodeType == Node.TEXT_NODE && !/^\s*$/.test(node.nodeValue)) {
count += node.nodeValue.length;
if (count >= offset && found != true) {
textNode = node;
countUptoPrev = count - node.nodeValue.length;
found = true;
}
} else if (node.nodeType == Node.ELEMENT_NODE) {
for (var i = 0, len = node.childNodes.length; i < len; ++i) {
getTextNodes(node.childNodes[i]);
}
}
}
getTextNodes(rootNode);
return [textNode, countUptoPrev];
},
getNodesToWrap: function(rootNode, startNode, endNode) {
var pastStartNode = false, reachedEndNode = false, textNodes = [];
function getTextNodes(node) {
if (node == startNode) {
pastStartNode = true;
}
if (node == endNode) {
reachedEndNode = true;
} else if (node.nodeType == Node.TEXT_NODE) {
if (pastStartNode && !reachedEndNode && !/^\s*$/.test(node.nodeValue)) {
textNodes.push(node);
}
} else {
for (var i = 0, len = node.childNodes.length; !reachedEndNode && i < len; ++i) {
getTextNodes(node.childNodes[i]);
}
}
}
getTextNodes(rootNode);
return textNodes;
},
wrapNodes: function(temporary) {
var nodes = this.getContainedNodes();
var newNode = this.createWrapperElement(temporary)
for(var i = 0; i < nodes.length; i++) {
$(nodes[i]).wrap(newNode);
}
},
createWrapperElement: function(temporary) {
var annotationID = this.id;
var span = document.createElement("span");
if(!temporary) {
span.classList.add("annotation");
span.classList.add(this.color);
} else {
span.classList.add("temporary");
}
span.setAttribute("data-id", annotationID);
return span;
},
removeTemporary: function() {
var range, parentContainer;
if(this._selectedRange) {
range = this._selectedRange;
parentContainer = range.commonAncestorContainer;
} else {
range = this.range;
range.parentContainer = parentContainer = this.annotator.findElementByXPath(range.parentContainerXPath);
}
var temporary = $(parentContainer).find(".temporary")
for(var i = 0; i < temporary.length; i++) {
var elem = temporary[i];
$(elem.childNodes[0]).unwrap();
}
},
convertFromTemporary: function() {
var range, parentContainer;
if(this._selectedRange) {
range = this._selectedRange;
parentContainer = range.commonAncestorContainer;
} else {
range = this.range;
range.parentContainer = parentContainer = this.annotator.findElementByXPath(range.parentContainerXPath);
}
var temporary = $(parentContainer).find(".temporary")
temporary
.removeClass("temporary")
.addClass("annotation")
.addClass(this.color);
}
};
return Annotation;
})();
var Editor = (function Editor() {
var Editor = {
annotator: null,
annotation: null,
events: [
{
element: ".js-note-form",
event: "submit",
action: "addNote"
},
{
selector: ".js-color-picker",
event: "click",
action: "setColor"
},
{
selector: ".js-copy",
event: "click",
action: "copyToClipboard"
},
{
selector: ".js-share",
event: "click",
action: "share"
},
{
selector: ".js-remove-annotation",
event: "click",
action: "removeAnnotation"
}
],
init: function(opts) {
this.annotator = opts.annotator;
var $containerElement = $("body");
this.$popoverElement = $(this.renderEditorTemplate());
$containerElement.append(this.$popoverElement);
// autocomplete
if(Awesomplete){
this._awesomplete = new Awesomplete(this.$popoverElement.find(".js-tags-field")[0]);
}
this.events.forEach(function(eventMap) {
var editor = this;
this.$popoverElement.on(eventMap["event"], eventMap["selector"], function(e) {
e.preventDefault();
editor[eventMap["action"]].call(editor, e);
})
}, this);
},
renderEditorTemplate: function() {
var html = '<div id="annotation-editor">'
+ '<ul class="dropdown-list">'
+ '<li class="colors">'
;
this.annotator.colors.forEach(function(color, index) {
var className = 'js-color-picker color'
+ ' ' + color.className
+ ' ' + (index == 0 ? 'active' : '')
;
html += '<span data-color="' + color.className + '" class="' + className + '"></span>';
});
html += '</li>'
+ '<li class="note-input">'
+ '<form class="js-note-form">'
+ '<input type="text" class="js-tags-field" placeholder="#revision, #later">'
+ '<textarea class="js-note-field" placeholder="Add a note..."></textarea>'
+ '<input type="submit" id="add-button" value="Add Note" />'
+ '</form>'
+ '</li>'
+ '<li><a href="#" class="js-copy">Copy</a></li>'
+ '<li><span class="link">Share</span>'
+ '<ul class="dropdown-list sub-list">'
+ '<li class="js-facebook-share"><a href="#" class="js-share facebook">Facebook</a></li>'
+ '<li><a href="#" class="js-share twitter">Twitter</a></li>'
+ '</ul>'
+ '</li>'
+ '<li class="js-remove-annotation-wrapper"><a href="#" class="js-remove-annotation">Remove Highlight</a></li>'
+ '</ul>'
+ '</div>'
;
return html;
},
showEditor: function(opts) {
var $popover = this.$popoverElement;
var position = opts.position,
annotation = opts.annotation,
temporary = opts.temporary;
var top = position.top - 30;
var left = position.left - 90;
if(annotation) {
this.annotation = annotation;
this.activateAnnotationColor();
this.renderContents();
if(!temporary) {
this.showRemoveBtn();
}
}
// FB Share
if( !(window.FB) ) this.$popoverElement.find(".js-facebook-share").hide();
else { this.$popoverElement.find(".js-facebook-share").show(); }
if(temporary) {
this.annotation.render({ temporary: true });
}
if(this._awesomplete) {
this._awesomplete.list = this.annotator.tags;
}
$popover.removeClass("anim").css("top", top - 20).css("left", left).show();
setTimeout(function() {
$popover.addClass("anim").css("top", top );
$popover.find("#annotation-input").focus();
}, 0);
},
isVisible: function() {
return this.$popoverElement.is(":visible");
},
reset: function() {
this.annotation.removeTemporary();
this.resetNoteForm();
this.hideRemoveBtn();
this.annotation = null;
this.$popoverElement.removeAttr("style");
},
resetNoteForm: function() {
this.$popoverElement.find(".js-note-field, .js-tags-field").val("");
},
activateAnnotationColor: function() {
this.$popoverElement
.find(".js-color-picker.active").removeClass("active");
this.$popoverElement
.find(".js-color-picker." + (this.annotation.color || 'yellow'))
.addClass("active");
},
renderContents: function() {
this.$popoverElement.find(".js-note-field").val(this.annotation.note);
if(this.annotation.tags)
this.$popoverElement.find(".js-tags-field").val(this.annotation.tags.join(", "));
},
showRemoveBtn: function() {
this.$popoverElement.find(".js-remove-annotation-wrapper").show();
},
hideRemoveBtn: function() {
this.$popoverElement.find(".js-remove-annotation-wrapper").hide();
},
hideEditor: function(event) {
this.reset();
this.$popoverElement.hide();
},
getTagsFromString: function(string) {
var tags = string
.split(this.annotator.tagRegex)
.map(function(tag) {
var t = $.trim(tag);
if(t.length) return t;
});
return tags;
},
setColor: function(e) {
var $target = $(e.target);
var color = $target.data("color");
var $form = this.$popoverElement.find(".js-note-form");
var note = $form.find(".js-note-field").val();
var tags = this.getTagsFromString($form.find(".js-tags-field").val());
this.saveAndClose({ color: color, note: note, tags: tags });
},
addNote: function(e) {
var $form = $(e.target);
var note = $form.find(".js-note-field").val();
var tags = this.getTagsFromString($form.find(".js-tags-field").val());
var color = this.annotation.color || this.annotator.defaultColor;
this.saveAndClose({ color: color, note: note, tags: tags });
},
saveAndClose: function(data) {
if(!data) return;
var params = {
debug: this.annotator.debug,
cbk: function(annotation) {
if(!this.annotator.findAnnotation(annotation.id)) {
this.annotation.render({ convert: true });
this.annotator.annotations.push(annotation);
} else {
this.annotator.updateAnnotation(annotation.id, annotation);
this.annotation.render({ update: true });
}
// save tags to global list
this.annotator.addTags(annotation.tags);
if(this.annotator.debug)
this.saveToLocalStorage();
this.hideEditor();
}.bind(this)
}
$.extend(params, data);
void 0;
this.annotation.save(params);
},
copyToClipboard: function() {
var text = this.annotation.selectedText;
var textarea = $("<textarea class='js-hidden-textarea'></textarea>");
$(this.annotator.containerElement).append(textarea);
textarea.val(text).select();
try {
document.execCommand("copy");
} catch(e) {
void 0;
}
this.hideEditor();
textarea.remove();
},
truncate: function(str, limit) {
if(str.length <= limit) return str;
while(str.length >= limit) {
str = str.substr(0, str.lastIndexOf(" "));
}
return str + "...";
},
removeAnnotation: function() {
var annotation = this.annotation;
var annotator = this.annotator;
if(!annotation) return;
var renderedAnnotation = $(this.annotator.containerElement)
.find(".annotation[data-id='" + annotation.id + "']");
this.annotation.destroy(function() {
annotator.removeAnnotation(annotation.id);
renderedAnnotation.contents().unwrap();
});
if(this.annotator.debug)
this.saveToLocalStorage();
this.hideEditor();
},
share: function(e) {
var text = this.annotation.selectedText;
var $target = $(e.target);
if($target.hasClass("facebook")) {
if( !(FB && FB.ui) ) return;
void 0;
FB.ui(
{
method: 'feed',
link: window.location.href,
description: text,
display: "popup"
},
function(response) {
if (response && !response.error_code) {
void 0;
} else {
void 0;
}
}
);
} else if($target.hasClass("twitter")) {
var width = 575,
height = 400,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left,
textLimit = 140 - '...'.length - window.location.href.length,
windowURL = "http://twitter.com/share?text=" + window.encodeURIComponent( this.truncate(text, textLimit) || "");
window.open(windowURL, 'Share', opts);
}
this.hideEditor();
},
saveToLocalStorage: function() {
// save to localStorage
if(window.localStorage) {
var serializedAnnotations = this.annotator.annotations.map(function(annotation) {
return annotation.serialize();
});
window.localStorage.setItem("annotations", JSON.stringify(serializedAnnotations));
}
}
}
return Editor;
})();
var Annotator = (function Annotator() {
var Annotator = {
containerElement: "body",
annotations: [],
editor: null,
defaultColor: "yellow",
colors: [
{
className: "yellow",
},
{
className: "green",
},
{
className: "pink",
},
{
className: "blue",
},
],
tags: [],
init: function(opts) {
this.containerElement = opts.containerElement || "body";
this.debug = opts.debug || "true";
this.remoteURL = opts.remoteURL || "";
if(opts.existingTags) {
this.tags = opts.existingTags;
}
if(opts.colors) {
this.colors = opts.colors;
}
if(opts.annotations) {
this.renderExistingAnnotations(opts.annotations);
}
// Setup editor
var editor = Object.create(Editor);
editor.init({ annotator: this });
this.setEditor(editor);
},
addTags: function(tags) {
this.tags = this.tags.concat(tags);
},
setEditor: function(editor) {
this.editor = editor;
},
findAnnotation: function(annotationID) {
return this.annotations.filter(function(annotation) {
return annotation.id == annotationID;
})[0];
},
updateAnnotation: function(annotationID, newAnnotation) {
var index = this.annotations.map(function(i) { return i.id }).indexOf(annotationID);
if(index <= -1) return;
this.annotations[index] = newAnnotation;
},
removeAnnotation: function(annotationID) {
var index = this.annotations.map(function(i) { return i.id }).indexOf(annotationID);
if(index <= -1) return;
this.annotations.splice(index, 1);
},
renderExistingAnnotations: function(annotations) {
for(var i = 0; i < annotations.length; i++) {
var annotation = Object.create(Annotation);
annotation.init({ savedAnnotation: annotations[i], annotator: this });
annotation.render();
this.annotations.push(annotation);
}
},
handleAnnotationClick: function(e) {
var $target = $(e.target);
// if(!$target.hasClass("shown")) $target = $target.parents(".annotation.shown");
var annotationID = $target.data("id");
var annotation = this.findAnnotation(annotationID);
void 0;
window.ann = annotation
if(!annotation) return;
this.editor.showEditor({
position: {
top: e.pageY,
left: e.pageX
},
annotation: annotation
});
},
handleAnnotation: function(e) {
var selection = window.getSelection();
var selectedText;
if(selection.text) {
selectedText = selection.text;
} else {
selectedText = selection.toString();
};
if(selection && !selection.isCollapsed && selectedText && selectedText.length>5) {
var range = selection.getRangeAt(0);
var annotation = Object.create(Annotation);
annotation.init({ selectedRange: range, annotator: this });
var position = {
top: e.pageY,
left: e.pageX
};
void 0;
this.editor.showEditor({
position: {
top: e.pageY,
left: e.pageX
},
annotation: annotation,
temporary: true
});
}
},
startListening: function() {
var $element = $(this.containerElement);
var self = this;
$element.on("click", ".annotation", function(e) {
e.stopPropagation();
self.handleAnnotationClick(e);
});
$element.on("mouseup touchend", function(e) {
e.preventDefault();
var $target = $(e.target);
if(self.editor.isVisible() && !$target.parents("#annotation-editor").length && !$target.hasClass("annotation")) {
// editor is open but clicked outside
self.editor.hideEditor()
}
self.handleAnnotation(e);
});
},
findElementByXPath: function(path) {
var evaluator = new XPathEvaluator();
var result = evaluator.evaluate(path, document.documentElement, null,XPathResult.FIRST_ORDERED_NODE_TYPE, null);
return result.singleNodeValue;
},
createXPathFromElement: function(elm) {
var allNodes = document.getElementsByTagName('*');
for (var segs = []; elm && elm.nodeType == 1; elm = elm.parentNode) {
if (elm.hasAttribute('id')) {
var uniqueIdCount = 0;
for (var n=0;n < allNodes.length;n++) {
if (allNodes[n].hasAttribute('id') && allNodes[n].id == elm.id) uniqueIdCount++;
if (uniqueIdCount > 1) break;
};
if ( uniqueIdCount == 1) {
segs.unshift('id("' + elm.getAttribute('id') + '")');
return segs.join('/');
} else {
segs.unshift(elm.localName.toLowerCase() + '[@id="' + elm.getAttribute('id') + '"]');
}
} else if (elm.hasAttribute('class')) {
segs.unshift(elm.localName.toLowerCase() + '[@class="' + elm.getAttribute('class') + '"]');
} else {
for (i = 1, sib = elm.previousSibling; sib; sib = sib.previousSibling) {
if (sib.localName == elm.localName) i++;
};
segs.unshift(elm.localName.toLowerCase() + '[' + i + ']');
};
}
return segs.length ? '/' + segs.join('/') : null;
}
};
return Annotator;
})(); |
module.exports={A:{A:{"2":"H D G E A B EB"},B:{"2":"C p x J L N I"},C:{"1":"1 2 3 4 5 6 8 9 g h i j k l m n o M q r s t u v w y","2":"0 YB BB F K H D G E A B C p x J L N I O P Q R S T U V W X Y Z b c d e f WB QB"},D:{"1":"FB a GB HB IB","2":"0 1 2 3 4 F K H D G E A B C p x J L N I O P Q R S T U V W X Y Z b c d e f g h i j k l m n o M q r s t u v w","194":"5 6 8 9 y KB aB"},E:{"1":"C z RB","2":"F K H D G E A B JB CB LB MB NB OB PB"},F:{"1":"v w","2":"0 7 E B C J L N I O P Q R S T U V W X Y Z b c d e f g h i j k l m n o M q r s t u SB TB UB VB z AB XB"},G:{"1":"kB","2":"G CB ZB DB bB cB dB eB fB gB hB iB jB"},H:{"2":"lB"},I:{"1":"a","2":"BB F mB nB oB pB DB qB rB"},J:{"2":"D A"},K:{"2":"7 A B C M z AB"},L:{"1":"a"},M:{"1":"y"},N:{"2":"A B"},O:{"2":"sB"},P:{"2":"F K tB"},Q:{"2":"uB"},R:{"2":"vB"}},B:5,C:"CSS display: contents"};
|
;
(function() {
ace.require(["ace/snippets/hjson"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})(); |
/*
* DomUtils
* Visit http://createjs.com/ for documentation, updates and examples.
*
*
* Copyright (c) 2012 gskinner.com, inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* @module PreloadJS
*/
(function () {
/**
* A few utilities for interacting with the dom.
* @class DomUtils
*/
var s = {};
s.appendToHead = function (el) {
s.getHead().appendChild(el)
}
s.appendToBody = function (el) {
s.getBody().appendChild(el)
}
s.getHead = function () {
return document.head || document.getElementsByTagName("head")[0];
}
s.getBody = function () {
return document.body || document.getElementsByTagName("body")[0];
}
s.removeChild = function(el) {
if (el.parent) {
el.parent.removeChild(el);
}
}
/**
* Check if item is a valid HTMLImageElement
* @method isImageTag
* @param {Object} item
* @returns {Boolean}
* @static
*/
s.isImageTag = function(item) {
return item instanceof HTMLImageElement;
};
/**
* Check if item is a valid HTMLAudioElement
* @method isAudioTag
* @param {Object} item
* @returns {Boolean}
* @static
*/
s.isAudioTag = function(item) {
if (window.HTMLAudioElement) {
return item instanceof HTMLAudioElement;
} else {
return false;
}
};
/**
* Check if item is a valid HTMLVideoElement
* @method isVideoTag
* @param {Object} item
* @returns {Boolean}
* @static
*/
s.isVideoTag = function(item) {
if (window.HTMLVideoElement) {
return item instanceof HTMLVideoElement;
} else {
return false;
}
};
createjs.DomUtils = s;
}());
|
var assert = require('assert');
var PMysql = require('lib/PMysql');
describe('PMysql (constructor)', function() {
it('should set the config', function() {
var pMysql = new PMysql(null);
assert.strictEqual(pMysql.config, null);
var pMysql = new PMysql(7);
assert.strictEqual(pMysql.config, 7);
});
it('should accept an optional mysql dependency', function() {
var pMysql = new PMysql(null, 77);
assert.strictEqual(pMysql.mysql, 77);
var pMysql = new PMysql(null);
assert.strictEqual(pMysql.mysql, require('mysql'));
});
});
|
/*
* Jsgauge 0.4.4
* http://code.google.com/p/jsgauge/
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
/*jslint browser: true */
/**
* Creates a new Gauge
* @param {DOM Object} canvas The gauge will be created inside of this canvas element
* @param {Object} options Optional parameters
* @constructor
*/
function Gauge(canvas, options) {
var that = this;
this.requestAnimFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame;
this.cancelRequestAnimFrame = window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
window.oCancelRequestAnimationFrame ||
window.msCancelRequestAnimationFrame;
this.animationToken = null;
this.canvas = canvas;
function setOptions(options) {
// Gauge settings
that.settings = {
value:options.value || 0,
valueFormat:options.valueFormat || null,
pointerValue:options.value || 0,
label:options.label || '',
labelSize:options.labelSize || 0,
unitsLabel:options.unitsLabel || '',
min:options.min || 0,
max:options.max || 100,
majorTicks:options.majorTicks || 5,
minorTicks:options.minorTicks || 2, // small ticks inside each major tick
bands:[].concat(options.bands || []),
majorTickLabel:options.majorTickLabel || false, // show major tick label
// START - Deprecated
greenFrom:[].concat(options.greenFrom || 0),
greenTo:[].concat(options.greenTo || 0),
yellowFrom:[].concat(options.yellowFrom || 0),
yellowTo:[].concat(options.yellowTo || 0),
redFrom:[].concat(options.redFrom || 0),
redTo:[].concat(options.redTo || 0)
// END - Deprecated
};
// Colors used to render the gauge
that.colors = {
text:options.colorOfText || 'rgb(0, 0, 0)',
warningText:options.colorOfWarningText || 'rgb(255, 0, 0)',
fill:options.colorOfFill || [ '#111', '#ccc', '#ddd', '#eee' ],
pointerFill:options.colorOfPointerFill || 'rgba(255, 100, 0, 0.7)',
pointerStroke:options.colorOfPointerStroke || 'rgba(255, 100, 100, 0.9)',
centerCircleFill:options.colorOfCenterCircleFill || 'rgba(0, 100, 255, 1)',
centerCircleStroke:options.colorOfCenterCircleStroke || 'rgba(0, 0, 255, 1)',
// START - Deprecated
redBand:options.colorOfRedBand || options.redColor || 'rgba(255, 0, 0, 0.2)',
yelBand:options.colorOfYellowBand || options.yellowColor || 'rgba(255, 215, 0, 0.2)',
grnBand:options.colorOfGreenBand || options.greenColor || 'rgba(0, 255, 0, 0.2)'
// END - Deprecated
};
// Add colors to the bands object
for (var i = that.settings.redFrom.length; i--;) {
that.settings.bands.push({ // Red
color:that.colors.redBand,
from:that.settings.redFrom[i],
to:that.settings.redTo[i]
});
}
for (i = that.settings.yellowFrom.length; i--;) {
that.settings.bands.push({ // Yellow
color:that.colors.yelBand,
from:that.settings.yellowFrom[i],
to:that.settings.yellowTo[i]
});
}
for (i = that.settings.greenFrom.length; i--;) {
that.settings.bands.push({ // Green
color:that.colors.grnBand,
from:that.settings.greenFrom[i],
to:that.settings.greenTo[i]
});
}
that.relSettings = normalize(that.settings);
}
// settings normalized to a [0, 100] interval
function normalize(settings) {
var i,
span = settings.max - settings.min,
spanPct = span / 100,
normalized;
// Restrict pointer to range of values
if (settings.pointerValue > settings.max) {
settings.pointerValue = settings.max;
} else if (settings.pointerValue < settings.min) {
settings.pointerValue = settings.min;
}
normalized = {
min:0,
max:100,
value:( settings.value - settings.min ) / spanPct,
pointerValue:( settings.pointerValue - settings.min ) / spanPct,
label:settings.label || '',
labelSize:settings.labelSize || 0,
greenFrom:[],
greenTo:[],
yellowFrom:[],
yellowTo:[],
redFrom:[],
redTo:[],
bands:[],
// also fix some possible invalid settings
majorTicks:Math.max(2, settings.majorTicks),
minorTicks:Math.max(0, settings.minorTicks),
decimals:Math.max(0, 3 - ( settings.max - settings.min ).toFixed(0).length)
};
for (i = settings.bands.length; i--;) {
var band = settings.bands[i];
normalized.bands[i] = {
color:band.color,
from:(band.from - settings.min) / spanPct,
to:(band.to - settings.min) / spanPct
};
}
return normalized;
}
function formatValue(value, decimals) {
var
ret;
// Custom formatter
if (typeof that.settings.valueFormat == 'function') {
return that.settings.valueFormat(value, decimals); //-->
}
// Default formatter
ret = (parseFloat(value)).toFixed(decimals);
while (( decimals > 0 ) && ret.match(/^(-)?\d+\.(\d+)?0$/)) {
decimals -= 1;
ret = (parseFloat(value)).toFixed(decimals);
}
return ret;
}
// Private helper functions
function styleText(context, style) {
context.font = style;
context.mozTextStyle = style; // FF3
}
function measureText(context, text) {
if (context.measureText) {
return context.measureText(text).width; //-->
} else if (context.mozMeasureText) { //FF < 3.5
return context.mozMeasureText(text); //-->
}
throw "measureText() not supported!";
}
function fillText(context, text, px, py) {
var width;
if (context.fillText) {
return context.fillText(text, px, py);
} else if (context.mozDrawText) { //FF < 3.5
context.save();
context.translate(px, py);
width = context.mozDrawText(text);
context.restore();
return width;
}
throw "fillText() not supported!";
}
this.setOptions = setOptions;
this.setOptions(options || {});
this.drawBackground = function () {
var fill = that.colors.fill,
rad = [ this.radius, this.radius - 1, this.radius * 0.98, this.radius * 0.95 ],
i;
this.c2d.rotate(this.startDeg);
for (i = 0; i < fill.length; i++) {
this.c2d.fillStyle = fill[ i ];
this.c2d.beginPath();
this.c2d.arc(0, 0, rad[ i ], 0, this.spanDeg, false);
this.c2d.fill();
}
};
this.drawRange = function (from, to, style) {
if (to > from) {
var span = this.spanDeg * ( to - from ) / 100;
this.c2d.rotate(this.startDeg);
this.c2d.fillStyle = style;
this.c2d.rotate(this.spanDeg * from / 100);
this.c2d.beginPath();
this.c2d.moveTo(this.innerRadius, 0);
this.c2d.lineTo(this.outerRadius, 0);
this.c2d.arc(0, 0, this.outerRadius, 0, span, false);
this.c2d.rotate(span);
this.c2d.lineTo(this.innerRadius, 0);
this.c2d.arc(0, 0, this.innerRadius, 0, -span, true);
this.c2d.fill();
}
};
this.drawTicks = function (majorTicks, minorTicks) {
var majorSpan,
i, j;
// major ticks
this.c2d.rotate(this.startDeg);
this.c2d.lineWidth = this.radius * 0.025;
majorSpan = this.spanDeg / ( majorTicks - 1 );
for (i = 0; i < majorTicks; i++) {
this.c2d.beginPath();
this.c2d.moveTo(this.innerRadius, 0);
this.c2d.lineTo(this.outerRadius, 0);
this.c2d.stroke();
// minor ticks
if (i + 1 < majorTicks) {
this.c2d.save();
this.c2d.lineWidth = this.radius * 0.01;
var minorSpan = majorSpan / ( minorTicks + 1 );
for (j = 0; j < minorTicks; j++) {
this.c2d.rotate(minorSpan);
this.c2d.beginPath();
this.c2d.moveTo(this.innerRadius + ( this.outerRadius - this.innerRadius ) / 3, 0);
this.c2d.lineTo(this.outerRadius, 0);
this.c2d.stroke();
}
this.c2d.restore();
}
this.c2d.rotate(majorSpan);
}
};
this.drawPointer = function (value) {
function pointer(ctx) {
ctx.c2d.beginPath();
ctx.c2d.moveTo(-ctx.radius * 0.2, 0);
ctx.c2d.lineTo(0, ctx.radius * 0.05);
ctx.c2d.lineTo(ctx.radius * 0.8, 0);
ctx.c2d.lineTo(0, -ctx.radius * 0.05);
ctx.c2d.lineTo(-ctx.radius * 0.2, 0);
}
this.c2d.rotate(this.startDeg);
this.c2d.rotate(this.spanDeg * value / 100);
this.c2d.lineWidth = this.radius * 0.015;
this.c2d.fillStyle = that.colors.pointerFill;
pointer(this);
this.c2d.fill();
this.c2d.strokeStyle = that.colors.pointerStroke;
pointer(this);
this.c2d.stroke();
// center circle
this.c2d.fillStyle = that.colors.centerCircleFill;
this.c2d.beginPath();
this.c2d.arc(0, 0, this.radius * 0.1, 0, Math.PI * 2, true);
this.c2d.fill();
this.c2d.strokeStyle = that.colors.centerCircleStroke;
this.c2d.beginPath();
this.c2d.arc(0, 0, this.radius * 0.1, 0, Math.PI * 2, true);
this.c2d.stroke();
};
this.drawCaption = function (label, size) {
var fontSize = this.radius / 5;
if (size)
fontSize = size;
if (label) {
var font
styleText(this.c2d, fontSize.toFixed(0) + 'px sans-serif');
var metrics = measureText(this.c2d, label);
this.c2d.fillStyle = that.colors.text;
var px = -metrics / 2;
var py = -this.radius * 0.4 + fontSize / 2;
fillText(this.c2d, label, px, py);
}
};
this.drawValues = function (min, max, value, decimals, majorTicks) {
var deg, fontSize, metrics, valueText;
// value text
valueText = formatValue(value, decimals) + that.settings.unitsLabel;
fontSize = this.radius / 5;
styleText(this.c2d, fontSize.toFixed(0) + 'px sans-serif');
metrics = measureText(this.c2d, valueText);
if (value < min || value > max) { // Outside min/max ranges?
this.c2d.fillStyle = that.colors.warningText;
} else {
this.c2d.fillStyle = that.colors.text;
}
fillText(this.c2d, valueText, -metrics / 2, this.radius * 0.72);
// terryc: major tick label
if (majorTicks > 1) {
var radiusSpan = 13 / (majorTicks - 1);
var tickNum = (max - min) / (majorTicks - 1);
fontSize = this.radius / 8;
for (var i = 1, j = min + tickNum; i < (majorTicks - 1); i++, j += tickNum) {
var x, y, z;
metrics = measureText(this.c2d, formatValue(j, decimals));
z = (14.5 - (radiusSpan * i));
x = 0;
y = 0;
if (z <= 6) {
x = -(metrics / 3) * 2;
}
else if (6 < z && z < 10) {
x = -((10 - z) / 2) * (metrics / 3);
}
if (z <= 2 || z >= 14) {
y = -(fontSize / 2);
}
else if (6 <= z && z <= 10) {
y = fontSize / 2;
} else if (2 < z && z < 6) {
y = (z - 4) * fontSize / 4;
}
else if (10 < z && z < 14) {
y = (12 - z) * fontSize / 4;
}
this.save();
deg = Math.PI * z / 8;
this.c2d.translate(this.radius * 0.65 * Math.sin(deg),
this.radius * 0.65 * Math.cos(deg));
styleText(this.c2d, fontSize.toFixed(0) + 'px sans-serif');
this.c2d.fillStyle = that.colors.text;
fillText(this.c2d, formatValue(j, decimals), x, y);
this.restore();
}
}
// min label
this.save();
deg = Math.PI * 14.5 / 8;
this.c2d.translate(this.radius * 0.65 * Math.sin(deg),
this.radius * 0.65 * Math.cos(deg));
fontSize = this.radius / 8;
styleText(this.c2d, fontSize.toFixed(0) + 'px sans-serif');
this.c2d.fillStyle = that.colors.text;
fillText(this.c2d, formatValue(min, decimals), 0, 0);
this.restore();
// max label
this.save();
deg = Math.PI * 1.5 / 8;
this.c2d.translate(this.radius * 0.65 * Math.sin(deg),
this.radius * 0.65 * Math.cos(deg));
fontSize = this.radius / 8;
styleText(this.c2d, fontSize.toFixed(0) + 'px sans-serif');
metrics = measureText(this.c2d, formatValue(max, decimals));
this.c2d.fillStyle = that.colors.text;
fillText(this.c2d, formatValue(max, decimals), -metrics, 0);
this.restore();
};
this.draw();
return this;
}
Gauge.prototype.setValue = function (value) {
var that = this,
pointerValue = (value > that.settings.max) ?
that.settings.max : // Nomalize to max value
(value < that.settings.min) ?
that.settings.min : // Nomalize to min value
value,
// increment = Math.abs( that.settings.pointerValue - pointerValue ) / 20;
increment = Math.max(Math.abs(that.settings.pointerValue - pointerValue) / 8, 3);
// Clear timeouts
if (that.animationToken !== null) {
//try {
if (that.cancelRequestAnimFrame) {
if (that.cancelRequestAnimFrame.arguments != null) {
that.cancelRequestAnimFrame(that.animationToken);
}
} else {
clearTimeout(that.animationToken);
}
//} catch (e){}
that.animationToken = null;
}
function adjustValue() {
var span;
if (that.settings.pointerValue < pointerValue) {
that.settings.pointerValue += increment;
if (that.settings.pointerValue + increment >= pointerValue) {
that.settings.pointerValue = pointerValue;
}
} else {
that.settings.pointerValue -= increment;
if (that.settings.pointerValue - increment <= pointerValue) {
that.settings.pointerValue = pointerValue;
}
}
span = that.settings.max - that.settings.min;
that.relSettings.pointerValue = (that.settings.pointerValue -
that.settings.min) / (span / 100);
that.draw();
if (that.settings.pointerValue != pointerValue) {
if (typeof that.requestAnimFrame != 'undefined') {
that.animationToken = that.requestAnimFrame.call(window, adjustValue);
} else {
that.animationToken = setTimeout(adjustValue, 1000 / 60); // Draw another frame
}
} else {
// There is no more animation, so clear the token
that.animationToken = null;
}
}
if (!isNaN(value) && this.settings.value !== value) {
this.settings.value = value;
adjustValue();
}
};
Gauge.prototype.draw = function () {
var r, g, y;
if (!this.canvas.getContext) {
return; //-->
}
var drawCtx = {
c2d:this.canvas.getContext('2d'),
startDeg:Math.PI * 5.5 / 8,
spanDeg:Math.PI * 13 / 8,
save:function () {
this.c2d.save();
},
restore:function () {
this.c2d.restore();
},
call:function (fn) {
var args = Array.prototype.slice.call(arguments);
this.save();
this.translateCenter();
fn.apply(this, args.slice(1));
this.restore();
},
clear:function () {
this.c2d.clearRect(0, 0, this.width, this.height);
},
translateCenter:function () {
this.c2d.translate(this.centerX, this.centerY);
}
};
drawCtx.width = drawCtx.c2d.canvas.width;
drawCtx.height = drawCtx.c2d.canvas.height;
drawCtx.radius = Math.min(drawCtx.width / 2 - 4, drawCtx.height / 2 - 4);
drawCtx.innerRadius = drawCtx.radius * 0.7;
drawCtx.outerRadius = drawCtx.radius * 0.9;
drawCtx.centerX = drawCtx.radius + 4;
drawCtx.centerY = drawCtx.radius + 4 + ( drawCtx.radius -
drawCtx.radius * Math.sin(drawCtx.startDeg) ) / 2;
// draw everything
drawCtx.clear();
drawCtx.call(this.drawBackground);
for (var i = this.relSettings.bands.length; i--;) {
var band = this.relSettings.bands[i];
drawCtx.call(this.drawRange, band.from, band.to, band.color);
}
drawCtx.call(this.drawTicks, this.relSettings.majorTicks, this.relSettings.minorTicks);
drawCtx.call(this.drawPointer, this.relSettings.pointerValue);
drawCtx.call(this.drawCaption, this.relSettings.label, this.relSettings.labelSize);
drawCtx.call(this.drawValues,
this.settings.min,
this.settings.max,
this.settings.value,
this.relSettings.decimals,
((this.settings.majorTickLabel == true) ? this.relSettings.majorTicks : 0));
};
|
export * from './table';
export * from './bag'; |
define({
"transparencyLabel": "Transparence",
"outline": "Contour",
"fill": "Remplissage (La couleur s’applique uniquement lorsque le style est uni)",
"style": "Style",
"mandatoryLabel": "Distance d’évacuation obligatoire",
"mandatoryButtonLabel": "Configurer les paramètres de distance d’évacuation obligatoire",
"safeLabel": "Distance d’évacuation de sécurité",
"safeButtonLabel": "Configurer les paramètres de distance d’évacuation de sécurité",
"selectOpLayerLabel": "Sélectionner une couche opérationnelle pour les résultats",
"selectDefaultMeasurementLabel": "Sélectionner une unité de mesure par défaut.",
"helpIconTooltip": "La liste des couches opérationnelles est renseignée à l’aide des couches de la carte web actuelle dont le type de géométrie est Polygone.",
"lineStyles": {
"esriSLSDash": "Tiret",
"esriSLSDashDot": "Tiret-point",
"esriSLSDashDotDot": "Tiret-point-point",
"esriSLSDot": "Point",
"esriSLSLongDash": "Tiret long",
"esriSLSLongDashDot": "Tiret-point long",
"esriSLSNull": "Nulle",
"esriSLSShortDash": "Tiret court",
"esriSLSShortDashDot": "Tiret court-point",
"esriSLSShortDashDotDot": "Tiret court-point-point",
"esriSLSShortDot": "Point court",
"esriSLSSolid": "Solide"
},
"fillStyles": {
"esriSFSBackwardDiagonal": "Arrière",
"esriSFSCross": "Croiser",
"esriSFSDiagonalCross": "Diagonal",
"esriSFSForwardDiagonal": "Avant",
"esriSFSHorizontal": "Horizontale",
"esriSFSNull": "Nulle",
"esriSFSSolid": "Solide",
"esriSFSVertical": "Verticale"
}
}); |
define("bui-cookie/1.1.0/cookie",[],function(e,n,t){function o(e){return"string"==typeof e&&""!==e}var i=document,r=864e5,c=encodeURIComponent,u=decodeURIComponent,a={get:function(e){var n,t;return o(e)&&(t=String(i.cookie).match(new RegExp("(?:^| )"+e+"(?:(?:=([^;]*))|;|$)")))&&(n=t[1]?u(t[1]):""),n},set:function(e,n,t,u,a,f){var m=String(c(n)),s=t;"number"==typeof s&&(s=new Date,s.setTime(s.getTime()+t*r)),s instanceof Date&&(m+="; expires="+s.toUTCString()),o(u)&&(m+="; domain="+u),o(a)&&(m+="; path="+a),f&&(m+="; secure"),i.cookie=e+"="+m},remove:function(e,n,t,o){this.set(e,"",-1,n,t,o)}};t.exports=a}); |
import React, { PropTypes } from 'react';
import { timeAgo } from '../../utils/calendar';
import styles from './styles.css';
const shortDate = date => date.toISOString().substr(2, 8);
const reverseDate = date => date.split('-').reverse().join('-');
const shortDateReversed = date => reverseDate(shortDate(date));
const dateToString = date => {
const now = shortDateReversed(new Date()).split('-');
const then = shortDateReversed(date).split('-');
let dateString = then.join('-');
if (then[2] === now[2]) {
dateString = then.slice(0, 2).join('-');
if (then[1] === now[1]) {
dateString = then.slice(0, 1).join('-');
if (then[0] === now[0]) dateString = '';
}
}
return `${date.toTimeString().substr(0, 5)} ${dateString}`;
};
export default class VersionChange extends React.Component { // eslint-disable-line react/prefer-stateless-function
static propTypes = {
data: PropTypes.object,
showDate: PropTypes.bool
}
render() {
const { showDate, data } = this.props;
const { analysis, messages, createdAt } = data;
const created = new Date(createdAt);
return (<div className={styles.versionChange}>
{showDate ? <span className={styles.time}>{timeAgo(created)}</span> : null}
{showDate ? <span className={styles.timeFull}>{dateToString(created)}</span> : null}
v{analysis.version}
{analysis.gitHead
? (<span>
<a href={`https://github.com/opensessions/opensessions/commit/${analysis.gitHead}`} className={styles.tag}>#{analysis.gitHead.slice(0, 7)}</a>
{messages && messages.length ? <span className={styles.changes}>{messages.map(msg => `+ ${msg}`).reverse().join('\n')}</span> : null}
</span>)
: null}
</div>);
}
}
|
var page_is_visible = 1;
var TARGET_THUMB_GRAPH_WIDTH = 500; // thumb charts width will range from 0.5 to 1.5 of that
var MINIMUM_THUMB_GRAPH_WIDTH = 400; // thumb chart will generally try to be wider than that
var TARGET_THUMB_GRAPH_HEIGHT = 160; // the height of the thumb charts
var TARGET_GROUP_GRAPH_HEIGHT = 160;
var THUMBS_MAX_TIME_TO_SHOW = 240; // how much time the thumb charts will present?
var THUMBS_POINTS_DIVISOR = 3;
var THUMBS_STACKED_POINTS_DIVISOR = 4;
var GROUPS_MAX_TIME_TO_SHOW = 600; // how much time the group charts will present?
var GROUPS_POINTS_DIVISOR = 2;
var GROUPS_STACKED_POINTS_DIVISOR = 3;
var MAINCHART_MIN_TIME_TO_SHOW = 1200; // how much time the main chart will present by default?
var MAINCHART_POINTS_DIVISOR = 2; // how much detailed will the main chart be by default? 1 = finest, higher is faster
var MAINCHART_STACKED_POINTS_DIVISOR = 3; // how much detailed will the main chart be by default? 1 = finest, higher is faster
var MAINCHART_CONTROL_HEIGHT = 75; // how tall the control chart will be
var MAINCHART_CONTROL_DIVISOR = 5; // how much detailed will the control chart be? 1 = finest, higher is faster
var MAINCHART_INITIAL_SELECTOR= 20; // 1/20th of the width, this overrides MAINCHART_MIN_TIME_TO_SHOW
var CHARTS_REFRESH_LOOP = 50; // delay between chart refreshes
var CHARTS_REFRESH_IDLE = 500; // delay between chart refreshes when no chart was ready for refresh the last time
var CHARTS_CHECK_NO_FOCUS = 500; // delay to check for visibility when the page has no focus
var CHARTS_SCROLL_IDLE = 100; // delay to wait after a page scroll
var ENABLE_CURVE = 1;
var resize_request = false;
function setPresentationNormal(ui) {
THUMBS_POINTS_DIVISOR = 3;
THUMBS_STACKED_POINTS_DIVISOR = Math.round(THUMBS_POINTS_DIVISOR * 1.5);
GROUPS_POINTS_DIVISOR = 2;
GROUPS_STACKED_POINTS_DIVISOR = Math.round(GROUPS_POINTS_DIVISOR * 1.5);
MAINCHART_POINTS_DIVISOR = 2;
MAINCHART_STACKED_POINTS_DIVISOR = Math.round(MAINCHART_POINTS_DIVISOR * 1.5);
ENABLE_CURVE = 1;
CHARTS_REFRESH_LOOP = 50;
CHARTS_SCROLL_IDLE = 50;
resize_request = true;
if(ui) $('#presentation_normal').trigger('click');
playGraphs();
}
function setPresentationSpeedy(ui) {
THUMBS_POINTS_DIVISOR = 10;
THUMBS_STACKED_POINTS_DIVISOR = Math.round(THUMBS_POINTS_DIVISOR * 1.5);
GROUPS_POINTS_DIVISOR = 8;
GROUPS_STACKED_POINTS_DIVISOR = Math.round(GROUPS_POINTS_DIVISOR * 1.5);
MAINCHART_POINTS_DIVISOR = 5;
MAINCHART_STACKED_POINTS_DIVISOR = Math.round(MAINCHART_POINTS_DIVISOR * 1.5);
ENABLE_CURVE = 0;
CHARTS_REFRESH_LOOP = 50;
CHARTS_SCROLL_IDLE = 100;
resize_request = true;
if(ui) $('#presentation_speedy').trigger('click');
playGraphs();
}
function setPresentationDetailed(ui) {
THUMBS_POINTS_DIVISOR = 1;
THUMBS_STACKED_POINTS_DIVISOR = 1;
GROUPS_POINTS_DIVISOR = 1;
GROUPS_STACKED_POINTS_DIVISOR = 1;
MAINCHART_POINTS_DIVISOR = 1;
MAINCHART_STACKED_POINTS_DIVISOR = 1;
ENABLE_CURVE = 1;
CHARTS_REFRESH_LOOP = 50;
CHARTS_SCROLL_IDLE = 50;
resize_request = true;
if(ui) $('#presentation_detailed').trigger('click');
playGraphs();
}
function isIE() {
userAgent = navigator.userAgent;
return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1;
}
if(isIE()){
// do stuff with ie-users
CHARTS_REFRESH_LOOP=250;
CHARTS_SCROLL_IDLE=500;
}
var MODE_THUMBS = 1;
var MODE_MAIN = 2;
var MODE_GROUP_THUMBS = 3;
var mode; // one of the MODE_* values
var allCharts = new Array();
var mainchart;
// html for the main menu
var mainmenu = "";
var categoriesmainmenu = "";
var familiesmainmenu = "";
var chartsmainmenu = "";
// ------------------------------------------------------------------------
// common HTML generation
function thumbChartActions(i, c, nogroup) {
var name = c.name;
if(!nogroup) name = c.family;
var refinfo = "the chart is drawing ";
if(c.group == 1) refinfo += "every single point collected (" + c.update_every + "s each).";
else refinfo += ((c.group_method == "average")?"the average":"the max") + " value for every " + (c.group * c.update_every) + " seconds of data";
var html = "<div class=\"btn-group btn-group\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + refinfo + "\">"
+ "<button type=\"button\" class=\"btn btn-default\" onclick=\"javascript: return;\"><span class=\"glyphicon glyphicon-info-sign\"></span></button>"
+ "</div>"
+ "<div class=\"btn-group btn-group\"><button type=\"button\" class=\"btn btn-default disabled\"><small> " + name + "</small></button>";
if(!nogroup) {
var ingroup = 0;
var ingroup_detail = 0;
$.each(allCharts, function(i, d) {
if(d.family == c.family) {
ingroup++;
if(d.isdetail) ingroup_detail++;
}
});
var hidden = "";
if(ingroup_detail) hidden = ", including " + ingroup_detail + " charts not shown now";
html += "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Show all " + ingroup + " charts in group '" + c.family + "'" + hidden + "\" class=\"btn btn-default\" onclick=\"initGroupGraphs('" + c.family +"');\"><span class=\"glyphicon glyphicon-th-large\"></span></button>";
}
html += "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"show chart '" + c.name + "' in fullscreen\" class=\"btn btn-default\" onclick=\"initMainChartIndex(" + i +");\"><span class=\"glyphicon glyphicon-resize-full\"></span></button>"
+ "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"set options for chart '" + c.name + "'\" class=\"btn btn-default disabled\" onclick=\"alert('Not implemented yet!');\"><span class=\"glyphicon glyphicon-cog\"></span></button>"
+ "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"ignore chart '" + c.name + "'\" class=\"btn btn-default\" onclick=\"disableChart(" + i + ");\"><span class=\"glyphicon glyphicon-trash\"></span></button>"
+ "</div>";
return html;
}
function groupChartActions(i, c) {
var name = c.name;
var refinfo = "the chart is drawing ";
if(c.group == 1) refinfo += "every single point collected (" + c.update_every + "s each).";
else refinfo += ((c.group_method == "average")?"the average":"the max") + " value for every " + (c.group * c.update_every) + " seconds of data";
var html = "<div class=\"btn-group btn-group\" data-toggle=\"tooltip\" data-placement=\"left\" title=\"" + refinfo + "\">"
+ "<button type=\"button\" class=\"btn btn-default\" onclick=\"javascript: return;\"><span class=\"glyphicon glyphicon-info-sign\"></span></button>"
+ "</div>";
html += "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"left\" title=\"show chart '" + c.name + "' in fullscreen\" class=\"btn btn-default\" onclick=\"initMainChartIndex(" + i +");\"><span class=\"glyphicon glyphicon-resize-full\"></span></button>"
+ "<button type=\"button\" data-toggle=\"tooltip\" data-placement=\"left\" title=\"ignore chart '" + c.name + "'\" class=\"btn btn-default\" onclick=\"disableChart(" + i + ");\"><span class=\"glyphicon glyphicon-trash\"></span></button>"
+ "</div>";
return html;
}
function mylog(txt) {
console.log(txt);
$('#logline').html(txt);
}
function chartssort(a, b) {
if(a.priority == b.priority) {
if(a.name < b.name) return -1;
}
else if(a.priority < b.priority) return -1;
return 1;
}
// ------------------------------------------------------------------------
// MAINGRAPH = fullscreen view of 1 graph
// copy the chart c to mainchart
// switch to main graphs screen
function initMainChart(c) {
if(mainchart) cleanThisChart(mainchart);
mainchart = $.extend(true, {}, c);
mainchart.enabled = true;
mainchart.refreshCount = 0;
mainchart.last_updated = 0;
mainchart.chartOptions.explorer = null;
mainchart.chart = null;
mainchart.before = 0;
mainchart.after = 0;
mainchart.chartOptions.width = screenWidth();
mainchart.chartOptions.height = $(window).height() - 150 - MAINCHART_CONTROL_HEIGHT;
if(mainchart.chartOptions.height < 300) mainchart.chartOptions.height = 300;
mainchart.div = 'maingraph';
mainchart.max_time_to_show = (mainchart.last_entry_t - mainchart.first_entry_t) / ( MAINCHART_INITIAL_SELECTOR * mainchart.update_every );
if(mainchart.max_time_to_show < MAINCHART_MIN_TIME_TO_SHOW) mainchart.max_time_to_show = MAINCHART_MIN_TIME_TO_SHOW;
calculateChartPointsToShow(mainchart, mainchart.chartOptions.isStacked?MAINCHART_STACKED_POINTS_DIVISOR:MAINCHART_POINTS_DIVISOR, mainchart.max_time_to_show, 0, ENABLE_CURVE);
// copy it to the hidden chart
mainchart.hiddenchart = $.extend(true, {}, mainchart);
mainchart.hiddenchart.chartOptions.height = MAINCHART_CONTROL_HEIGHT;
mainchart.hiddenchart.div = 'maingraph_control';
mainchart.hiddenchart.non_zero = 0;
// initialize the div
showChartIsLoading(mainchart.div, mainchart.name, mainchart.chartOptions.width, mainchart.chartOptions.height);
document.getElementById(mainchart.hiddenchart.div).innerHTML = "<table><tr><td align=\"center\" width=\"" + mainchart.hiddenchart.chartOptions.width + "\" height=\"" + mainchart.hiddenchart.chartOptions.height + "\" style=\"vertical-align:middle\"><h4><span class=\"label label-default\">Please wait...</span></h4></td></tr></table>";
//showChartIsLoading(mainchart.hiddenchart.div, mainchart.hiddenchart.name, mainchart.hiddenchart.chartOptions.width, mainchart.hiddenchart.chartOptions.height);
// set the radio buttons
setMainChartGroupMethod(mainchart.group_method, 'no-refresh');
setMainChartMax('normal');
$('#group' + mainchart.group).trigger('click');
setMainChartGroup(mainchart.group, 'no-refresh');
switchToMainGraph();
}
function refreshHiddenChart(doNext) {
if(refresh_mode == REFRESH_PAUSED && mainchart.hiddenchart.last_updated != 0) {
if(typeof doNext == "function") doNext();
return;
}
// is it too soon for a refresh?
var now = Date.now();
if((now - mainchart.hiddenchart.last_updated) < (mainchart.update_every * 10 * 1000) || (now - mainchart.hiddenchart.last_updated) < (mainchart.hiddenchart.group * mainchart.hiddenchart.update_every * 1000)) {
if(typeof doNext == "function") doNext();
return;
}
if(mainchart.dashboard && mainchart.hiddenchart.refreshCount > 50) {
mainchart.dashboard.clear();
mainchart.control_wrapper.clear();
mainchart.hidden_wrapper.clear();
mainchart.dashboard = null;
mainchart.control_wrapper = null;
mainchart.hidden_wrapper = null;
mainchart.hiddenchart.last_updated = 0;
}
if(!mainchart.dashboard) {
var controlopts = $.extend(true, {}, mainchart.chartOptions, {
lineWidth: 1,
height: mainchart.hiddenchart.chartOptions.height,
chartArea: {'width': '98%'},
hAxis: {'baselineColor': 'none', viewWindowMode: 'maximized', gridlines: { count: 0 } },
vAxis: {'title': null, gridlines: { count: 0 } },
});
mainchart.dashboard = new google.visualization.Dashboard(document.getElementById('maingraph_dashboard'));
mainchart.control_wrapper = new google.visualization.ControlWrapper({
controlType: 'ChartRangeFilter',
containerId: 'maingraph_control',
options: {
filterColumnIndex: 0,
ui: {
chartType: mainchart.chartType,
chartOptions: controlopts,
minRangeSize: (mainchart.max_time_to_show * 1000) / MAINCHART_POINTS_DIVISOR,
}
},
});
mainchart.hidden_wrapper = new google.visualization.ChartWrapper({
chartType: mainchart.chartType,
containerId: 'maingraph_hidden',
options: {
isStacked: mainchart.chartOptions.isStacked,
width: mainchart.hiddenchart.chartOptions.width,
height: mainchart.hiddenchart.chartOptions.height,
//chartArea: {'height': '80%', 'width': '100%'},
//hAxis: {'slantedText': false},
//legend: {'position': 'none'}
},
});
mainchart.hiddenchart.refreshCount = 0;
}
// load the data for the control and the hidden wrappers
// calculate the group and points to show for the control chart
calculateChartPointsToShow(mainchart.hiddenchart, MAINCHART_CONTROL_DIVISOR, 0, -1, ENABLE_CURVE);
$.ajax({
url: generateChartURL(mainchart.hiddenchart),
dataType:"json",
cache: false
})
.done(function(jsondata) {
if(!jsondata || jsondata.length == 0) return;
mainchart.control_data = new google.visualization.DataTable(jsondata);
if(mainchart.hiddenchart.last_updated == 0) {
google.visualization.events.addListener(mainchart.control_wrapper, 'ready', mainchartControlReadyEvent);
mainchart.dashboard.bind(mainchart.control_wrapper, mainchart.hidden_wrapper);
}
if(refresh_mode != REFRESH_PAUSED) {
// console.log('mainchart.points_to_show: ' + mainchart.points_to_show + ', mainchart.group: ' + mainchart.group + ', mainchart.update_every: ' + mainchart.update_every);
var start = now - (mainchart.points_to_show * mainchart.group * mainchart.update_every * 1000);
var end = now;
var min = MAINCHART_MIN_TIME_TO_SHOW * 1000;
if(end - start < min) start = end - min;
mainchart.control_wrapper.setState({range: {
start: new Date(start),
end: new Date(end)
},
ui: {
minRangeSize: min
}});
}
mainchart.dashboard.draw(mainchart.control_data);
mainchart.hiddenchart.last_updated = Date.now();
mainchart.hiddenchart.refreshCount++;
})
.always(function() {
if(typeof doNext == "function") doNext();
});
}
function mainchartControlReadyEvent() {
google.visualization.events.addListener(mainchart.control_wrapper, 'statechange', mainchartControlStateHandler);
//mylog(mainchart);
}
function mainchartControlStateHandler() {
// setMainChartPlay('pause');
var state = mainchart.control_wrapper.getState();
mainchart.after = Math.round(state.range.start.getTime() / 1000);
mainchart.before = Math.round(state.range.end.getTime() / 1000);
calculateChartPointsToShow(mainchart, mainchart.chartOptions.isStacked?MAINCHART_STACKED_POINTS_DIVISOR:MAINCHART_POINTS_DIVISOR, mainchart.before - mainchart.after, 0, ENABLE_CURVE);
//mylog('group = ' + mainchart.group + ', points_to_show = ' + mainchart.points_to_show + ', dt = ' + (mainchart.before - mainchart.after));
$('#group' + mainchart.group).trigger('click');
mainchart.last_updated = 0;
if(refresh_mode != REFRESH_PAUSED) pauseGraphs();
}
function initMainChartIndex(i) {
if(mode == MODE_GROUP_THUMBS)
initMainChart(groupCharts[i]);
else if(mode == MODE_THUMBS)
initMainChart(allCharts[i]);
else
initMainChart(allCharts[i]);
}
function initMainChartIndexOfMyCharts(i) {
initMainChart(allCharts[i]);
}
var last_main_chart_max='normal';
function setMainChartMax(m) {
if(!mainchart) return;
if(m == 'toggle') {
if(last_main_chart_max == 'maximized') m = 'normal';
else m = 'maximized';
}
if(m == "maximized") {
mainchart.chartOptions.theme = 'maximized';
//mainchart.chartOptions.axisTitlesPosition = 'in';
//mainchart.chartOptions.legend = {position: 'none'};
mainchart.chartOptions.hAxis.title = null;
mainchart.chartOptions.hAxis.viewWindowMode = 'maximized';
mainchart.chartOptions.vAxis.viewWindowMode = 'maximized';
mainchart.chartOptions.chartArea = {'width': '98%', 'height': '100%'};
}
else {
mainchart.chartOptions.hAxis.title = null;
mainchart.chartOptions.theme = null;
mainchart.chartOptions.hAxis.viewWindowMode = null;
mainchart.chartOptions.vAxis.viewWindowMode = null;
mainchart.chartOptions.chartArea = {'width': '80%', 'height': '90%'};
}
$('.mainchart_max_button').button(m);
last_main_chart_max = m;
mainchart.last_updated = 0;
}
function setMainChartGroup(g, norefresh) {
if(!mainchart) return;
mainchart.group = g;
if(!mainchart.before && !mainchart.after)
calculateChartPointsToShow(mainchart, mainchart.chartOptions.isStacked?MAINCHART_STACKED_POINTS_DIVISOR:MAINCHART_POINTS_DIVISOR, mainchart.max_time_to_show, mainchart.group, ENABLE_CURVE);
else
calculateChartPointsToShow(mainchart, mainchart.chartOptions.isStacked?MAINCHART_STACKED_POINTS_DIVISOR:MAINCHART_POINTS_DIVISOR, 0, mainchart.group, ENABLE_CURVE);
if(!norefresh) {
mainchart.last_updated = 0;
}
}
var last_main_chart_avg = null;
function setMainChartGroupMethod(g, norefresh) {
if(!mainchart) return;
if(g == 'toggle') {
if(last_main_chart_avg == 'max') g = 'average';
else g = 'max';
}
mainchart.group_method = g;
$('.mainchart_avg_button').button(g);
if(!norefresh) {
mainchart.last_updated = 0;
}
last_main_chart_avg = g;
}
function setMainChartPlay(p) {
if(!mainchart) return;
if(p == 'toggle') {
if(refresh_mode != REFRESH_ALWAYS) p = 'play';
else p = 'pause';
}
if(p == 'play') {
//mainchart.chartOptions.explorer = null;
mainchart.after = 0;
mainchart.before = 0;
calculateChartPointsToShow(mainchart, mainchart.chartOptions.isStacked?MAINCHART_STACKED_POINTS_DIVISOR:MAINCHART_POINTS_DIVISOR, mainchart.max_time_to_show, 0, ENABLE_CURVE);
$('#group' + mainchart.group).trigger('click');
mainchart.last_updated = 0;
mainchart.hiddenchart.last_updated = 0;
playGraphs();
}
else {
//mainchart.chartOptions.explorer = {
// 'axis': 'horizontal',
// 'maxZoomOut': 1,
//};
//mainchart.last_updated = 0;
//if(!renderChart(mainchart, pauseGraphs))
pauseGraphs();
}
}
function buttonGlobalPlayPause(p) {
if(mode == MODE_MAIN) {
setMainChartPlay(p);
return;
}
if(p == 'toggle') {
if(refresh_mode != REFRESH_ALWAYS) p = 'play';
else p = 'pause';
}
if(p == 'play') playGraphs();
else pauseGraphs();
}
// ------------------------------------------------------------------------
// Chart resizing
function screenWidth() {
return (($(window).width() * 0.95) - 50);
}
// calculate the proper width for the thumb charts
function thumbWidth() {
var cwidth = screenWidth();
var items = Math.round(cwidth / TARGET_THUMB_GRAPH_WIDTH);
if(items < 1) items = 1;
if(items > 1 && (cwidth / items) < MINIMUM_THUMB_GRAPH_WIDTH) items--;
return Math.round(cwidth / items) - 1;
}
function groupChartSizes() {
var s = { width: screenWidth(), height: TARGET_GROUP_GRAPH_HEIGHT };
var count = 0;
if(groupCharts) $.each(groupCharts, function(i, c) {
if(c.enabled) count++;
});
if(count == 0) {
s.width = TARGET_GROUP_GRAPH_HEIGHT;
s.height = TARGET_GROUP_GRAPH_HEIGHT;
}
else {
if(s.width < MINIMUM_THUMB_GRAPH_WIDTH) s.width = screenWidth();
s.height = ($(window).height() - 130) / count - 10;
}
if(s.height < TARGET_GROUP_GRAPH_HEIGHT)
s.height = TARGET_GROUP_GRAPH_HEIGHT;
return s;
}
// resize all charts
// if the thumb charts need resize in their width, reset them
function resizeCharts() {
var width = screenWidth();
if(mainchart) {
mainchart.chartOptions.width = width;
mainchart.chartOptions.height = $(window).height() - 150 - MAINCHART_CONTROL_HEIGHT;
mainchart.last_updated = 0;
mainchart.hidden_wrapper.setOption('width', width);
mainchart.control_wrapper.setOption('ui.chartOptions.width', width);
mainchart.hiddenchart.chartOptions.width = width;
mainchart.hiddenchart.last_updated = 0;
}
width = thumbWidth();
$.each(allCharts, function(i, c) {
if(c.enabled) {
cleanThisChart(c);
c.chartOptions.width = width;
calculateChartPointsToShow(c, c.chartOptions.isStacked?THUMBS_STACKED_POINTS_DIVISOR:THUMBS_POINTS_DIVISOR, THUMBS_MAX_TIME_TO_SHOW, -1, ENABLE_CURVE);
showChartIsLoading(c.div, c.name, c.chartOptions.width, c.chartOptions.height);
document.getElementById(c.id + '_thumb_actions_div').innerHTML = thumbChartActions(i, c);
c.last_updated = 0;
}
});
if(groupCharts) $.each(groupCharts, function(i, c) {
var sizes = groupChartSizes();
if(c.enabled) {
cleanThisChart(c);
c.chartOptions.width = sizes.width;
c.chartOptions.height = sizes.height;
calculateChartPointsToShow(c, c.chartOptions.isStacked?GROUPS_STACKED_POINTS_DIVISOR:GROUPS_POINTS_DIVISOR, GROUPS_MAX_TIME_TO_SHOW, -1, ENABLE_CURVE);
showChartIsLoading(c.div, c.name, c.chartOptions.width, c.chartOptions.height);
document.getElementById(c.id + '_group_actions_div').innerHTML = groupChartActions(i, c);
c.last_updated = 0;
}
});
updateUI();
}
window.onresize = function(event) {
resize_request = true;
};
// ------------------------------------------------------------------------
// Core of the thread refreshing the charts
var REFRESH_PAUSED = 0;
var REFRESH_ALWAYS = 1;
var refresh_mode = REFRESH_PAUSED;
var last_refresh = 0;
function playGraphs() {
mylog('playGraphs()');
if(refresh_mode == REFRESH_ALWAYS) return;
//mylog('PlayGraphs()');
refresh_mode = REFRESH_ALWAYS;
$('.mainchart_play_button').button('play');
$('.global_play_button').button('play');
// check if the thread died due to a javascript error
var now = Date.now();
if((now - last_refresh) > 60000) {
// it died or never started
//mylog('It seems the refresh thread died. Restarting it.');
renderChartCallback();
}
}
function pauseGraphs() {
mylog('pauseGraphs()');
if(refresh_mode == REFRESH_PAUSED) return;
refresh_mode = REFRESH_PAUSED;
$('.mainchart_play_button').button('pause');
$('.global_play_button').button('pause');
}
var interval = null;
function checkRefreshThread() {
if(interval == null) {
interval = setInterval(checkRefreshThread, 2000);
return;
}
var now = Date.now();
if(now - last_refresh > 60000) {
mylog('Refresh thread died. Restarting it.');
renderChartCallback();
}
}
// refresh the proper chart
// this is an internal function.
// never call it directly, or new javascript threads will be spawn
var timeout = null;
function renderChartCallback() {
last_refresh = Date.now();
if(!page_is_visible) {
timeout = setTimeout(triggerRefresh, CHARTS_CHECK_NO_FOCUS);
return;
}
if(resize_request) {
mylog('renderChartCallback() resize_request is set');
cleanupCharts();
resizeCharts();
resize_request = false;
// refresh_mode = REFRESH_ALWAYS;
}
if(last_user_scroll) {
var now = Date.now();
if((now - last_user_scroll) >= CHARTS_SCROLL_IDLE) {
last_user_scroll = 0;
mylog('Scrolling: resuming refresh...');
}
else {
mylog('Scrolling: pausing refresh for ' + (CHARTS_SCROLL_IDLE - (now - last_user_scroll)) + ' ms...');
timeout = setTimeout(triggerRefresh, CHARTS_SCROLL_IDLE - (now - last_user_scroll));
return;
}
}
if(refresh_mode == REFRESH_PAUSED) {
if(mode == MODE_MAIN && mainchart.last_updated == 0) {
mainChartRefresh();
return;
}
if(mode != MODE_MAIN) {
timeout = setTimeout(triggerRefresh, CHARTS_REFRESH_IDLE);
return;
}
}
if(mode == MODE_THUMBS) timeout = setTimeout(thumbChartsRefreshNext, CHARTS_REFRESH_LOOP);
else if(mode == MODE_GROUP_THUMBS) timeout = setTimeout(groupChartsRefreshNext, CHARTS_REFRESH_LOOP);
else if(mode == MODE_MAIN) timeout = setTimeout(mainChartRefresh, CHARTS_REFRESH_LOOP);
else timeout = setTimeout(triggerRefresh, CHARTS_REFRESH_IDLE);
}
// callback for refreshing the charts later
// this is an internal function.
// never call it directly, or new javascript threads will be spawn
function triggerRefresh() {
//mylog('triggerRefresh()');
if(!page_is_visible || (refresh_mode == REFRESH_PAUSED && mode != MODE_MAIN)) {
last_refresh = Date.now();
timeout = setTimeout(triggerRefresh, CHARTS_REFRESH_IDLE);
return;
}
if(mode == MODE_THUMBS) timeout = setTimeout(renderChartCallback, CHARTS_REFRESH_IDLE);
else if(mode == MODE_GROUP_THUMBS) timeout = setTimeout(renderChartCallback, CHARTS_REFRESH_IDLE);
else if(mode == MODE_MAIN) timeout = setTimeout(renderChartCallback, CHARTS_REFRESH_IDLE);
else timeout = setTimeout(triggerRefresh, CHARTS_REFRESH_IDLE);
}
// refresh the main chart
// make sure we don't loose the refreshing thread
function mainChartRefresh() {
//mylog('mainChartRefresh()');
if(mode != MODE_MAIN || !mainchart) {
triggerRefresh();
return;
}
if(refresh_mode == REFRESH_PAUSED && mainchart.last_updated != 0) {
hiddenChartRefresh();
return;
}
if(!renderChart(mainchart, hiddenChartRefresh))
hiddenChartRefresh();
}
function hiddenChartRefresh() {
refreshHiddenChart(triggerRefresh);
}
function roundRobinRenderChart(charts, startat) {
var refreshed = false;
// find a chart to refresh
var all = charts.length;
var cur = startat + 1;
var count = 0;
for(count = 0; count < all ; count++, cur++) {
if(cur >= all) cur = 0;
if(charts[cur].enabled) {
refreshed = renderChart(charts[cur], renderChartCallback);
if(refreshed) {
mylog('Refreshed: ' + charts[cur].name);
break;
}
}
}
if(!refreshed) triggerRefresh();
return cur;
}
// refresh the thumb charts
// make sure we don't loose the refreshing thread
var last_thumb_updated = 0;
function thumbChartsRefreshNext() {
//mylog('thumbChartsRefreshNext()');
if(allCharts.length == 0 || mode != MODE_THUMBS) {
triggerRefresh();
return;
}
last_thumb_updated = roundRobinRenderChart(allCharts, last_thumb_updated);
}
// refresh the group charts
// make sure we don't loose the refreshing thread
var last_group_updated = 0;
function groupChartsRefreshNext() {
//mylog('groupChartsRefreshNext()');
if(!groupCharts || groupCharts.length == 0 || mode != MODE_GROUP_THUMBS) {
//mylog('cannot refresh charts');
triggerRefresh();
return;
}
last_group_updated = roundRobinRenderChart(groupCharts, last_group_updated);
}
// ------------------------------------------------------------------------
// switch the screen between views
// these should be called only from initXXXX()
function disableChart(i) {
mylog('disableChart(' + i + ')');
var chart = null;
var count = 0;
if(mode == MODE_GROUP_THUMBS && groupCharts) {
$.each(groupCharts, function(i, c) {
if(c.enabled) count++;
});
if(i < groupCharts.length) chart = groupCharts[i];
}
else if(mode == MODE_THUMBS) {
$.each(allCharts, function(i, c) {
if(c.enabled) count++;
});
if(i < allCharts.length) chart = allCharts[i];
}
if(!chart) return;
if(count <= 1) {
alert('Cannot close the last chart shown.');
return;
}
if(chart) {
mylog("request to disable chart " + chart.name);
chart.disablethisplease = true;
resize_request = true;
}
else
mylog("no chart to disable");
}
function cleanThisChart(chart, emptydivs) {
//mylog('cleanThisChart(' + chart.name + ', ' + emptydivs +')');
if(chart.dashboard) {
chart.dashboard.clear();
chart.dashboard = null;
if(chart.control_wrapper) {
chart.control_wrapper.clear();
chart.control_wrapper = null;
}
if(chart.hidden_wrapper) {
chart.hidden_wrapper.clear();
chart.hidden_wrapper = null;
}
chart.control_data = null;
}
if(chart.chart) chart.chart.clearChart();
chart.chart = null;
if(emptydivs) {
var div = document.getElementById(chart.div);
if(div) {
div.style.display = 'none';
div.innerHTML = "";
}
div = document.getElementById(chart.div + "_parent");
if(div) {
div.style.display = 'none';
div.innerHTML = "";
}
}
//mylog("chart " + chart.name + " cleaned with option " + emptydivs);
}
// cleanup the previously shown charts
function cleanupCharts() {
// mylog('cleanupCharts()');
if(mode != MODE_MAIN && mainchart) {
if(mainchart.chart) cleanThisChart(mainchart);
mainchart = null;
}
if(mode != MODE_GROUP_THUMBS && groupCharts) {
clearGroupGraphs();
}
// cleanup the disabled charts
$.each(allCharts, function(i, c) {
if(c.disablethisplease && c.enabled) {
cleanThisChart(c, 'emptydivs');
c.disablethisplease = false;
c.enabled = false;
resize_request = true;
mylog("removed thumb chart " + c.name + " removed");
}
});
if(groupCharts) $.each(groupCharts, function(i, c) {
if(c.disablethisplease && c.enabled) {
cleanThisChart(c, 'emptydivs');
c.disablethisplease = false;
c.enabled = false;
resize_request = true;
mylog("removed group chart " + c.name + " removed");
}
});
// we never cleanup the main chart
}
function updateUI() {
$('[data-toggle="tooltip"]').tooltip({'container': 'body', 'html': true});
$('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh')
})
}
var thumbsScrollPosition = null;
function switchToMainGraph() {
//mylog('switchToMainGraph()');
if(!mainchart) return;
if(!groupCharts) thumbsScrollPosition = window.pageYOffset;
document.getElementById('maingraph_container').style.display = 'block';
document.getElementById('thumbgraphs_container').style.display = 'none';
document.getElementById('groupgraphs_container').style.display = 'none';
document.getElementById('splash_container').style.display = 'none';
document.getElementById("main_menu_div").innerHTML = "<ul class=\"nav navbar-nav\"><li><a href=\"javascript:switchToThumbGraphs();\"><span class=\"glyphicon glyphicon-circle-arrow-left\"></span> Back to Dashboard</a></li><li class=\"active\"><a href=\"#\">" + mainchart.name + "</a></li>" + familiesmainmenu + chartsmainmenu + "</ul>" ;
window.scrollTo(0, 0);
mode = MODE_MAIN;
playGraphs();
updateUI();
}
function switchToThumbGraphs() {
//mylog('switchToThumbGraphs()');
document.getElementById('maingraph_container').style.display = 'none';
document.getElementById('thumbgraphs_container').style.display = 'block';
document.getElementById('groupgraphs_container').style.display = 'none';
document.getElementById('splash_container').style.display = 'none';
document.getElementById("main_menu_div").innerHTML = mainmenu;
if(thumbsScrollPosition) window.scrollTo(0, thumbsScrollPosition);
// switch mode
mode = MODE_THUMBS;
playGraphs();
updateUI();
}
function switchToGroupGraphs() {
//mylog('switchToGroupGraphs()');
if(!groupCharts) return;
if(!mainchart) thumbsScrollPosition = window.pageYOffset;
document.getElementById('maingraph_container').style.display = 'none';
document.getElementById('thumbgraphs_container').style.display = 'none';
document.getElementById('groupgraphs_container').style.display = 'block';
document.getElementById('splash_container').style.display = 'none';
document.getElementById("main_menu_div").innerHTML = "<ul class=\"nav navbar-nav\"><li><a href=\"javascript:switchToThumbGraphs();\"><span class=\"glyphicon glyphicon-circle-arrow-left\"></span> Back to Dashboard</a></li><li class=\"active\"><a href=\"#\">" + groupCharts[0].family + "</a></li>" + familiesmainmenu + chartsmainmenu + "</ul>";
window.scrollTo(0, 0);
mode = MODE_GROUP_THUMBS;
playGraphs();
updateUI();
}
// ------------------------------------------------------------------------
// Group Charts
var groupCharts = null;
function initGroupGraphs(group) {
var count = 0;
if(groupCharts) clearGroupGraphs();
groupCharts = new Array();
var groupbody = "";
$.each(allCharts, function(i, c) {
if(c.family == group) {
groupCharts[count] = [];
groupCharts[count] = $.extend(true, {}, c);
groupCharts[count].div += "_group";
groupCharts[count].enabled = true;
groupCharts[count].chart = null;
groupCharts[count].last_updated = 0;
count++;
}
});
groupCharts.sort(chartssort);
var sizes = groupChartSizes();
var groupbody = "";
$.each(groupCharts, function(i, c) {
c.chartOptions.width = sizes.width;
c.chartOptions.height = sizes.height;
c.chartOptions.chartArea.width = '85%';
c.chartOptions.chartArea.height = '90%';
c.chartOptions.hAxis.textPosition = 'in';
c.chartOptions.hAxis.viewWindowMode = 'maximized';
c.chartOptions.hAxis.textStyle = { "fontSize": 9 };
c.chartOptions.vAxis.textStyle = { "fontSize": 9 };
c.chartOptions.fontSize = 11;
c.chartOptions.titlePosition = 'in';
c.chartOptions.tooltip = { "textStyle": { "fontSize": 9 } };
c.chartOptions.legend = { "textStyle": { "fontSize": 9 } };
calculateChartPointsToShow(c, c.chartOptions.isStacked?GROUPS_STACKED_POINTS_DIVISOR:GROUPS_POINTS_DIVISOR, GROUPS_MAX_TIME_TO_SHOW, -1, ENABLE_CURVE);
groupbody += "<div class=\"thumbgraph\" id=\"" + c.div + "_parent\"><table><tr><td width='" + sizes.width + "'><div class=\"thumbgraph\" id=\"" + c.div + "\">" + chartIsLoadingHTML(c.name, c.chartOptions.width, c.chartOptions.height) + "</div></td><td id=\"" + c.id + "_group_actions_div\" align=\"center\">" + groupChartActions(i, c) + "</td></tr><tr><td width='15'></td></tr></table></div>";
//groupbody += "<div class=\"thumbgraph\" id=\"" + c.div + "\">" + chartIsLoadingHTML(c.name, c.chartOptions.width, c.chartOptions.height) + "</div>";
});
groupbody += "";
document.getElementById("groupgraphs").innerHTML = groupbody;
switchToGroupGraphs();
}
function clearGroupGraphs() {
if(groupCharts && groupCharts.length) {
$.each(groupCharts, function(i, c) {
cleanThisChart(c, 'emptydivs');
});
groupCharts = null;
}
document.getElementById("groupgraphs").innerHTML = "";
}
// ------------------------------------------------------------------------
// Global entry point
// initialize the thumb charts
var last_user_scroll = 0;
// load the charts from the server
// generate html for the thumbgraphs to support them
function initCharts() {
setPresentationNormal(1);
var width = thumbWidth();
var height = TARGET_THUMB_GRAPH_HEIGHT;
window.onscroll = function (e) {
last_user_scroll = Date.now();
mylog('Scrolling: detected');
}
loadCharts(null, function(all) {
allCharts = all.charts;
if(allCharts == null || allCharts.length == 0) {
alert("Cannot load data from server.");
return;
}
var thumbsContainer = document.getElementById("thumbgraphs");
if(!thumbsContainer) {
alert("Cannot find the thumbsContainer");
return;
}
allCharts.sort(chartssort);
document.getElementById('hostname_id').innerHTML = all.hostname;
document.title = all.hostname;
// create an array for grouping all same-type graphs together
var dimensions = 0;
var categories = new Array();
var families = new Array();
var chartslist = new Array();
$.each(allCharts, function(i, c) {
var j;
chartslist.push({name: c.name, type: c.type, id: i});
dimensions += c.dimensions.length;
c.chartOptions.width = width;
c.chartOptions.height = height;
// calculate how many point to show for each chart
//c.points_to_show = Math.round(c.entries / c.group) - 1;
// show max 10 mins of data
//if(c.points_to_show * c.group > THUMBS_MAX_TIME_TO_SHOW) c.points_to_show = THUMBS_MAX_TIME_TO_SHOW / c.group;
calculateChartPointsToShow(c, c.chartOptions.isStacked?THUMBS_STACKED_POINTS_DIVISOR:THUMBS_POINTS_DIVISOR, THUMBS_MAX_TIME_TO_SHOW, -1, ENABLE_CURVE);
if(c.enabled) {
var h = "<div class=\"thumbgraph\" id=\"" + c.div + "_parent\"><table><tr><td><div class=\"thumbgraph\" id=\"" + c.div + "\">" + chartIsLoadingHTML(c.name, c.chartOptions.width, c.chartOptions.height) + "</div></td></tr><tr><td id=\"" + c.id + "_thumb_actions_div\" align=\"center\">"
+ thumbChartActions(i, c)
+ "</td></tr><tr><td height='15'></td></tr></table></div>";
// find the categories object for this type
for(j = 0; j < categories.length ;j++) {
if(categories[j].name == c.type) {
categories[j].html += h;
categories[j].count++;
break;
}
}
if(j == categories.length)
categories.push({name: c.type, title: c.category, description: '', priority: c.categoryPriority, count: 1, glyphicon: c.glyphicon, html: h});
}
// find the families object for this type
for(j = 0; j < families.length ;j++) {
if(families[j].name == c.family) {
families[j].count++;
break;
}
}
if(j == families.length)
families.push({name: c.family, count: 1});
});
document.getElementById('server_summary_id').innerHTML = "<small>NetData server at <b>" + all.hostname + "</b> is maintaining <b>" + allCharts.length + "</b> charts, having <b>" + dimensions + "</b> dimensions (by default with <b>" + all.history + "</b> entries each), which are updated every <b>" + all.update_every + "s</b>, using a total of <b>" + (Math.round(all.memory * 10 / 1024 / 1024) / 10) + " MB</b> for the round robin database.</small>";
$.each(categories, function(i, a) {
a.html = "<tr><td id=\"" + a.name + "\"><ol class=\"breadcrumb graphs\"><li class=\"active\"><span class=\"glyphicon " + a.glyphicon + "\"></span> <a id=\"" + a.name + "\" href=\"#" + a.name + "\"><b>" + a.title + "</b> " + a.description + " </a></li></ol></td></tr><tr><td><div class=\"thumbgraphs\">" + a.html + "</td></tr>";
});
function categoriessort(a, b) {
if(a.priority < b.priority) return -1;
return 1;
}
categories.sort(categoriessort);
function familiessort(a, b) {
if(a.name < b.name) return -1;
return 1;
}
families.sort(familiessort);
function chartslistsort(a, b) {
if(a.name < b.name) return -1;
return 1;
}
chartslist.sort(chartslistsort);
// combine all the htmls into one
var allcategories = "<table width=\"100%\">";
mainmenu = '<ul class="nav navbar-nav">';
categoriesmainmenu = '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class=\"glyphicon glyphicon-fire\"></span> Dashboard Sections <b class="caret"></b></a><ul class="dropdown-menu">';
$.each(categories, function(i, a) {
allcategories += a.html;
categoriesmainmenu += "<li><a href=\"#" + a.name + "\">" + a.title + "</a></li>";
});
categoriesmainmenu += "</ul></li>";
allcategories += "</table>";
familiesmainmenu = '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class=\"glyphicon glyphicon-th-large\"></span> Chart Families <b class="caret"></b></a><ul class="dropdown-menu">';
$.each(families, function(i, a) {
familiesmainmenu += "<li><a href=\"javascript:initGroupGraphs('" + a.name + "');\">" + a.name + " <span class=\"badge pull-right\">" + a.count + "</span></a></li>";
});
familiesmainmenu += "</ul></li>";
chartsmainmenu = '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class=\"glyphicon glyphicon-resize-full\"></span> All Charts <b class="caret"></b></a><ul class="dropdown-menu">';
$.each(chartslist, function(i, a) {
chartsmainmenu += "<li><a href=\"javascript:initMainChartIndexOfMyCharts('" + a.id + "');\">" + a.name + "</a></li>";
});
chartsmainmenu += "</ul></li>";
mainmenu += categoriesmainmenu;
mainmenu += familiesmainmenu;
mainmenu += chartsmainmenu;
mainmenu += '<li role="presentation" class="disabled" style="display: none;"><a href="#" id="logline"></a></li></ul>';
thumbsContainer.innerHTML = allcategories;
switchToThumbGraphs();
checkRefreshThread();
});
}
$(window).blur(function() {
page_is_visible = 0;
mylog('Lost Focus!');
});
$(window).focus(function() {
page_is_visible = 1;
mylog('Focus restored!');
});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(initCharts);
|
// Main type inference engine
// Walks an AST, building up a graph of abstract values and contraints
// that cause types to flow from one node to another. Also defines a
// number of utilities for accessing ASTs and scopes.
// Analysis is done in a context, which is tracked by the dynamically
// bound cx variable. Use withContext to set the current context.
// For memory-saving reasons, individual types export an interface
// similar to abstract values (which can hold multiple types), and can
// thus be used in place abstract values that only ever contain a
// single type.
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
return mod(exports, require("acorn/acorn"), require("acorn/acorn_loose"), require("acorn/util/walk"),
require("./def"), require("./signal"));
if (typeof define == "function" && define.amd) // AMD
return define(["exports", "acorn/acorn", "acorn/acorn_loose", "acorn/util/walk", "./def", "./signal"], mod);
mod(self.tern || (self.tern = {}), acorn, acorn, acorn.walk, tern.def, tern.signal); // Plain browser env
})(function(exports, acorn, acorn_loose, walk, def, signal) {
"use strict";
var toString = exports.toString = function(type, maxDepth, parent) {
return !type || type == parent ? "?": type.toString(maxDepth);
};
// A variant of AVal used for unknown, dead-end values. Also serves
// as prototype for AVals, Types, and Constraints because it
// implements 'empty' versions of all the methods that the code
// expects.
var ANull = exports.ANull = signal.mixin({
addType: function() {},
propagate: function() {},
getProp: function() { return ANull; },
forAllProps: function() {},
hasType: function() { return false; },
isEmpty: function() { return true; },
getFunctionType: function() {},
getType: function() {},
gatherProperties: function() {},
propagatesTo: function() {},
typeHint: function() {},
propHint: function() {}
});
function extend(proto, props) {
var obj = Object.create(proto);
if (props) for (var prop in props) obj[prop] = props[prop];
return obj;
}
// ABSTRACT VALUES
var WG_DEFAULT = 100, WG_NEW_INSTANCE = 90, WG_MADEUP_PROTO = 10, WG_MULTI_MEMBER = 5,
WG_CATCH_ERROR = 5, WG_GLOBAL_THIS = 90, WG_SPECULATIVE_THIS = 2;
var AVal = exports.AVal = function() {
this.types = [];
this.forward = null;
this.maxWeight = 0;
};
AVal.prototype = extend(ANull, {
addType: function(type, weight) {
weight = weight || WG_DEFAULT;
if (this.maxWeight < weight) {
this.maxWeight = weight;
if (this.types.length == 1 && this.types[0] == type) return;
this.types.length = 0;
} else if (this.maxWeight > weight || this.types.indexOf(type) > -1) {
return;
}
this.signal("addType", type);
this.types.push(type);
var forward = this.forward;
if (forward) withWorklist(function(add) {
for (var i = 0; i < forward.length; ++i) add(type, forward[i], weight);
});
},
propagate: function(target, weight) {
if (target == ANull || (target instanceof Type)) return;
if (weight && weight < WG_DEFAULT) target = new Muffle(target, weight);
(this.forward || (this.forward = [])).push(target);
var types = this.types;
if (types.length) withWorklist(function(add) {
for (var i = 0; i < types.length; ++i) add(types[i], target, weight);
});
},
getProp: function(prop) {
if (prop == "__proto__" || prop == "✖") return ANull;
var found = (this.props || (this.props = Object.create(null)))[prop];
if (!found) {
found = this.props[prop] = new AVal;
this.propagate(new PropIsSubset(prop, found));
}
return found;
},
forAllProps: function(c) {
this.propagate(new ForAllProps(c));
},
hasType: function(type) {
return this.types.indexOf(type) > -1;
},
isEmpty: function() { return this.types.length == 0; },
getFunctionType: function() {
for (var i = this.types.length - 1; i >= 0; --i)
if (this.types[i] instanceof Fn) return this.types[i];
},
getType: function(guess) {
if (this.types.length == 0 && guess !== false) return this.makeupType();
if (this.types.length == 1) return this.types[0];
return canonicalType(this.types);
},
makeupType: function() {
if (!this.forward) return null;
for (var i = this.forward.length - 1; i >= 0; --i) {
var hint = this.forward[i].typeHint();
if (hint && !hint.isEmpty()) {guessing = true; return hint;}
}
var props = Object.create(null), foundProp = null;
for (var i = 0; i < this.forward.length; ++i) {
var prop = this.forward[i].propHint();
if (prop && prop != "length" && prop != "<i>" && prop != "✖") {
props[prop] = true;
foundProp = prop;
}
}
if (!foundProp) return null;
var objs = objsWithProp(foundProp);
if (objs) {
var matches = [];
search: for (var i = 0; i < objs.length; ++i) {
var obj = objs[i];
for (var prop in props) if (!obj.hasProp(prop)) continue search;
if (obj.hasCtor) obj = getInstance(obj);
matches.push(obj);
}
var canon = canonicalType(matches);
if (canon) {guessing = true; return canon;}
}
},
typeHint: function() { return this.types.length ? this.getType() : null; },
propagatesTo: function() { return this; },
gatherProperties: function(f, depth) {
for (var i = 0; i < this.types.length; ++i)
this.types[i].gatherProperties(f, depth);
},
guessProperties: function(f) {
if (this.forward) for (var i = 0; i < this.forward.length; ++i) {
var prop = this.forward[i].propHint();
if (prop) f(prop, null, 0);
}
}
});
function canonicalType(types) {
var arrays = 0, fns = 0, objs = 0, prim = null;
for (var i = 0; i < types.length; ++i) {
var tp = types[i];
if (tp instanceof Arr) ++arrays;
else if (tp instanceof Fn) ++fns;
else if (tp instanceof Obj) ++objs;
else if (tp instanceof Prim) {
if (prim && tp.name != prim.name) return null;
prim = tp;
}
}
var kinds = (arrays && 1) + (fns && 1) + (objs && 1) + (prim && 1);
if (kinds > 1) return null;
if (prim) return prim;
var maxScore = 0, maxTp = null;
for (var i = 0; i < types.length; ++i) {
var tp = types[i], score = 0;
if (arrays) {
score = tp.getProp("<i>").isEmpty() ? 1 : 2;
} else if (fns) {
score = 1;
for (var j = 0; j < tp.args.length; ++j) if (!tp.args[j].isEmpty()) ++score;
if (!tp.retval.isEmpty()) ++score;
} else if (objs) {
score = tp.name ? 100 : 2;
} else if (prims) {
score = 1;
}
if (score >= maxScore) { maxScore = score; maxTp = tp; }
}
return maxTp;
}
// PROPAGATION STRATEGIES
function Constraint() {}
Constraint.prototype = extend(ANull, {
init: function() { this.origin = cx.curOrigin; }
});
var constraint = exports.constraint = function(props, methods) {
var body = "this.init();";
props = props ? props.split(", ") : [];
for (var i = 0; i < props.length; ++i)
body += "this." + props[i] + " = " + props[i] + ";";
var ctor = Function.apply(null, props.concat([body]));
ctor.prototype = Object.create(Constraint.prototype);
for (var m in methods) if (methods.hasOwnProperty(m)) ctor.prototype[m] = methods[m];
return ctor;
};
var PropIsSubset = constraint("prop, target", {
addType: function(type, weight) {
if (type.getProp)
type.getProp(this.prop).propagate(this.target, weight);
},
propHint: function() { return this.prop; },
propagatesTo: function() {
return {target: this.target, pathExt: "." + this.prop};
}
});
var PropHasSubset = exports.PropHasSubset = constraint("prop, type, originNode", {
addType: function(type, weight) {
if (!(type instanceof Obj)) return;
var prop = type.defProp(this.prop, this.originNode);
prop.origin = this.origin;
this.type.propagate(prop, weight);
},
propHint: function() { return this.prop; }
});
var ForAllProps = constraint("c", {
addType: function(type) {
if (!(type instanceof Obj)) return;
type.forAllProps(this.c);
}
});
function withDisabledComputing(fn, body) {
cx.disabledComputing = {fn: fn, prev: cx.disabledComputing};
try {
return body();
} finally {
cx.disabledComputing = cx.disabledComputing.prev;
}
}
var IsCallee = exports.IsCallee = constraint("self, args, argNodes, retval", {
init: function() {
Constraint.prototype.init();
this.disabled = cx.disabledComputing;
},
addType: function(fn, weight) {
if (!(fn instanceof Fn)) return;
for (var i = 0; i < this.args.length; ++i) {
if (i < fn.args.length) this.args[i].propagate(fn.args[i], weight);
if (fn.arguments) this.args[i].propagate(fn.arguments, weight);
}
this.self.propagate(fn.self, this.self == cx.topScope ? WG_GLOBAL_THIS : weight);
var compute = fn.computeRet;
if (compute) for (var d = this.disabled; d; d = d.prev)
if (d.fn == fn || fn.name && d.fn.name == fn.name) compute = null;
if (compute)
compute(this.self, this.args, this.argNodes).propagate(this.retval, weight);
else
fn.retval.propagate(this.retval, weight);
},
typeHint: function() {
var names = [];
for (var i = 0; i < this.args.length; ++i) names.push("?");
return new Fn(null, this.self, this.args, names, ANull);
},
propagatesTo: function() {
return {target: this.retval, pathExt: ".!ret"};
}
});
var HasMethodCall = constraint("propName, args, argNodes, retval", {
init: function() {
Constraint.prototype.init();
this.disabled = cx.disabledComputing;
},
addType: function(obj, weight) {
var callee = new IsCallee(obj, this.args, this.argNodes, this.retval);
callee.disabled = this.disabled;
obj.getProp(this.propName).propagate(callee, weight);
},
propHint: function() { return this.propName; }
});
var IsCtor = exports.IsCtor = constraint("target, noReuse", {
addType: function(f, weight) {
if (!(f instanceof Fn)) return;
f.getProp("prototype").propagate(new IsProto(this.noReuse ? false : f, this.target), weight);
}
});
var getInstance = exports.getInstance = function(obj, ctor) {
if (ctor === false) return new Obj(obj);
if (!ctor) ctor = obj.hasCtor;
if (!obj.instances) obj.instances = [];
for (var i = 0; i < obj.instances.length; ++i) {
var cur = obj.instances[i];
if (cur.ctor == ctor) return cur.instance;
}
var instance = new Obj(obj, ctor && ctor.name);
instance.origin = obj.origin;
obj.instances.push({ctor: ctor, instance: instance});
return instance;
};
var IsProto = exports.IsProto = constraint("ctor, target", {
addType: function(o, _weight) {
if (!(o instanceof Obj)) return;
if ((this.count = (this.count || 0) + 1) > 8) return;
if (o == cx.protos.Array)
this.target.addType(new Arr);
else
this.target.addType(getInstance(o, this.ctor));
}
});
var FnPrototype = constraint("fn", {
addType: function(o, _weight) {
if (o instanceof Obj && !o.hasCtor) {
o.hasCtor = this.fn;
var adder = new SpeculativeThis(o, this.fn);
adder.addType(this.fn);
o.forAllProps(function(_prop, val, local) {
if (local) val.propagate(adder);
});
}
}
});
var IsAdded = constraint("other, target", {
addType: function(type, weight) {
if (type == cx.str)
this.target.addType(cx.str, weight);
else if (type == cx.num && this.other.hasType(cx.num))
this.target.addType(cx.num, weight);
},
typeHint: function() { return this.other; }
});
var IfObj = constraint("target", {
addType: function(t, weight) {
if (t instanceof Obj) this.target.addType(t, weight);
},
propagatesTo: function() { return this.target; }
});
var SpeculativeThis = constraint("obj, ctor", {
addType: function(tp) {
if (tp instanceof Fn && tp.self && tp.self.isEmpty())
tp.self.addType(getInstance(this.obj, this.ctor), WG_SPECULATIVE_THIS);
}
});
var Muffle = constraint("inner, weight", {
addType: function(tp, weight) {
this.inner.addType(tp, Math.min(weight, this.weight));
},
propagatesTo: function() { return this.inner.propagatesTo(); },
typeHint: function() { return this.inner.typeHint(); },
propHint: function() { return this.inner.propHint(); }
});
// TYPE OBJECTS
var Type = exports.Type = function() {};
Type.prototype = extend(ANull, {
propagate: function(c, w) { c.addType(this, w); },
hasType: function(other) { return other == this; },
isEmpty: function() { return false; },
typeHint: function() { return this; },
getType: function() { return this; }
});
var Prim = exports.Prim = function(proto, name) { this.name = name; this.proto = proto; };
Prim.prototype = extend(Type.prototype, {
toString: function() { return this.name; },
getProp: function(prop) {return this.proto.hasProp(prop) || ANull;},
gatherProperties: function(f, depth) {
if (this.proto) this.proto.gatherProperties(f, depth);
}
});
var Obj = exports.Obj = function(proto, name) {
if (!this.props) this.props = Object.create(null);
this.proto = proto === true ? cx.protos.Object : proto;
if (proto && !name && proto.name && !(this instanceof Fn)) {
var match = /^(.*)\.prototype$/.exec(this.proto.name);
if (match) name = match[1];
}
this.name = name;
this.maybeProps = null;
this.origin = cx.curOrigin;
};
Obj.prototype = extend(Type.prototype, {
toString: function(maxDepth) {
if (!maxDepth && this.name) return this.name;
var props = [], etc = false;
for (var prop in this.props) if (prop != "<i>") {
if (props.length > 5) { etc = true; break; }
if (maxDepth)
props.push(prop + ": " + toString(this.props[prop].getType(), maxDepth - 1));
else
props.push(prop);
}
props.sort();
if (etc) props.push("...");
return "{" + props.join(", ") + "}";
},
hasProp: function(prop, searchProto) {
var found = this.props[prop];
if (searchProto !== false)
for (var p = this.proto; p && !found; p = p.proto) found = p.props[prop];
return found;
},
defProp: function(prop, originNode) {
var found = this.hasProp(prop, false);
if (found) {
if (originNode && !found.originNode) found.originNode = originNode;
return found;
}
if (prop == "__proto__" || prop == "✖") return ANull;
var av = this.maybeProps && this.maybeProps[prop];
if (av) {
delete this.maybeProps[prop];
this.maybeUnregProtoPropHandler();
} else {
av = new AVal;
}
this.props[prop] = av;
av.originNode = originNode;
av.origin = cx.curOrigin;
this.broadcastProp(prop, av, true);
return av;
},
getProp: function(prop) {
var found = this.hasProp(prop, true) || (this.maybeProps && this.maybeProps[prop]);
if (found) return found;
if (prop == "__proto__" || prop == "✖") return ANull;
return this.ensureMaybeProps()[prop] = new AVal;
},
broadcastProp: function(prop, val, local) {
if (local) {
this.signal("addProp", prop, val);
// If this is a scope, it shouldn't be registered
if (!(this instanceof Scope)) registerProp(prop, this);
}
if (this.onNewProp) for (var i = 0; i < this.onNewProp.length; ++i) {
var h = this.onNewProp[i];
h.onProtoProp ? h.onProtoProp(prop, val, local) : h(prop, val, local);
}
},
onProtoProp: function(prop, val, _local) {
var maybe = this.maybeProps && this.maybeProps[prop];
if (maybe) {
delete this.maybeProps[prop];
this.maybeUnregProtoPropHandler();
this.proto.getProp(prop).propagate(maybe);
}
this.broadcastProp(prop, val, false);
},
ensureMaybeProps: function() {
if (!this.maybeProps) {
if (this.proto) this.proto.forAllProps(this);
this.maybeProps = Object.create(null);
}
return this.maybeProps;
},
removeProp: function(prop) {
var av = this.props[prop];
delete this.props[prop];
this.ensureMaybeProps()[prop] = av;
},
forAllProps: function(c) {
if (!this.onNewProp) {
this.onNewProp = [];
if (this.proto) this.proto.forAllProps(this);
}
this.onNewProp.push(c);
for (var o = this; o; o = o.proto) for (var prop in o.props) {
if (c.onProtoProp)
c.onProtoProp(prop, o.props[prop], o == this);
else
c(prop, o.props[prop], o == this);
}
},
maybeUnregProtoPropHandler: function() {
if (this.maybeProps) {
for (var _n in this.maybeProps) return;
this.maybeProps = null;
}
if (!this.proto || this.onNewProp && this.onNewProp.length) return;
this.proto.unregPropHandler(this);
},
unregPropHandler: function(handler) {
for (var i = 0; i < this.onNewProp.length; ++i)
if (this.onNewProp[i] == handler) { this.onNewProp.splice(i, 1); break; }
this.maybeUnregProtoPropHandler();
},
gatherProperties: function(f, depth) {
for (var prop in this.props) if (prop != "<i>")
f(prop, this, depth);
if (this.proto) this.proto.gatherProperties(f, depth + 1);
}
});
var Fn = exports.Fn = function(name, self, args, argNames, retval) {
Obj.call(this, cx.protos.Function, name);
this.self = self;
this.args = args;
this.argNames = argNames;
this.retval = retval;
};
Fn.prototype = extend(Obj.prototype, {
toString: function(maxDepth) {
if (maxDepth) maxDepth--;
var str = "fn(";
for (var i = 0; i < this.args.length; ++i) {
if (i) str += ", ";
var name = this.argNames[i];
if (name && name != "?") str += name + ": ";
str += toString(this.args[i].getType(), maxDepth, this);
}
str += ")";
if (!this.retval.isEmpty())
str += " -> " + toString(this.retval.getType(), maxDepth, this);
return str;
},
getProp: function(prop) {
if (prop == "prototype") {
var known = this.hasProp(prop, false);
if (!known) {
known = this.defProp(prop);
var proto = new Obj(true, this.name && this.name + ".prototype");
proto.origin = this.origin;
known.addType(proto, WG_MADEUP_PROTO);
}
return known;
}
return Obj.prototype.getProp.call(this, prop);
},
defProp: function(prop, originNode) {
if (prop == "prototype") {
var found = this.hasProp(prop, false);
if (found) return found;
found = Obj.prototype.defProp.call(this, prop, originNode);
found.origin = this.origin;
found.propagate(new FnPrototype(this));
return found;
}
return Obj.prototype.defProp.call(this, prop, originNode);
},
getFunctionType: function() { return this; }
});
var Arr = exports.Arr = function(contentType) {
Obj.call(this, cx.protos.Array);
var content = this.defProp("<i>");
if (contentType) contentType.propagate(content);
};
Arr.prototype = extend(Obj.prototype, {
toString: function(maxDepth) {
return "[" + toString(this.getProp("<i>").getType(), maxDepth, this) + "]";
}
});
// THE PROPERTY REGISTRY
function registerProp(prop, obj) {
var data = cx.props[prop] || (cx.props[prop] = []);
data.push(obj);
}
function objsWithProp(prop) {
return cx.props[prop];
}
// INFERENCE CONTEXT
exports.Context = function(defs, parent) {
this.parent = parent;
this.props = Object.create(null);
this.protos = Object.create(null);
this.origins = [];
this.curOrigin = "ecma5";
this.paths = Object.create(null);
this.definitions = Object.create(null);
this.purgeGen = 0;
this.workList = null;
this.disabledComputing = null;
exports.withContext(this, function() {
cx.protos.Object = new Obj(null, "Object.prototype");
cx.topScope = new Scope();
cx.topScope.name = "<top>";
cx.protos.Array = new Obj(true, "Array.prototype");
cx.protos.Function = new Obj(true, "Function.prototype");
cx.protos.RegExp = new Obj(true, "RegExp.prototype");
cx.protos.String = new Obj(true, "String.prototype");
cx.protos.Number = new Obj(true, "Number.prototype");
cx.protos.Boolean = new Obj(true, "Boolean.prototype");
cx.str = new Prim(cx.protos.String, "string");
cx.bool = new Prim(cx.protos.Boolean, "bool");
cx.num = new Prim(cx.protos.Number, "number");
cx.curOrigin = null;
if (defs) for (var i = 0; i < defs.length; ++i)
def.load(defs[i]);
});
};
var cx = null;
exports.cx = function() { return cx; };
exports.withContext = function(context, f) {
var old = cx;
cx = context;
try { return f(); }
finally { cx = old; }
};
exports.addOrigin = function(origin) {
if (cx.origins.indexOf(origin) < 0) cx.origins.push(origin);
};
var baseMaxWorkDepth = 20, reduceMaxWorkDepth = .0001;
function withWorklist(f) {
if (cx.workList) return f(cx.workList);
var list = [], depth = 0;
var add = cx.workList = function(type, target, weight) {
if (depth < baseMaxWorkDepth - reduceMaxWorkDepth * list.length)
list.push(type, target, weight, depth);
};
try {
var ret = f(add);
for (var i = 0; i < list.length; i += 4) {
depth = list[i + 3] + 1;
list[i + 1].addType(list[i], list[i + 2]);
}
return ret;
} finally {
cx.workList = null;
}
}
// SCOPES
var Scope = exports.Scope = function(prev) {
Obj.call(this, prev || true);
this.prev = prev;
};
Scope.prototype = extend(Obj.prototype, {
defVar: function(name, originNode) {
for (var s = this; ; s = s.proto) {
var found = s.props[name];
if (found) return found;
if (!s.prev) return s.defProp(name, originNode);
}
}
});
// RETVAL COMPUTATION HEURISTICS
function maybeInstantiate(scope, score) {
if (scope.fnType)
scope.fnType.instantiateScore = (scope.fnType.instantiateScore || 0) + score;
}
var NotSmaller = {};
function nodeSmallerThan(node, n) {
try {
walk.simple(node, {Expression: function() { if (--n <= 0) throw NotSmaller; }});
return true;
} catch(e) {
if (e == NotSmaller) return false;
throw e;
}
}
function maybeTagAsInstantiated(node, scope) {
var score = scope.fnType.instantiateScore;
if (!cx.disabledComputing && score && scope.fnType.args.length && nodeSmallerThan(node, score * 5)) {
maybeInstantiate(scope.prev, score / 2);
setFunctionInstantiated(node, scope);
return true;
} else {
scope.fnType.instantiateScore = null;
}
}
function setFunctionInstantiated(node, scope) {
var fn = scope.fnType;
// Disconnect the arg avals, so that we can add info to them without side effects
for (var i = 0; i < fn.args.length; ++i) fn.args[i] = new AVal;
fn.self = new AVal;
fn.computeRet = function(self, args) {
// Prevent recursion
return withDisabledComputing(fn, function() {
var oldOrigin = cx.curOrigin;
cx.curOrigin = fn.origin;
var scopeCopy = new Scope(scope.prev);
for (var v in scope.props) {
var local = scopeCopy.defProp(v);
for (var i = 0; i < args.length; ++i) if (fn.argNames[i] == v && i < args.length)
args[i].propagate(local);
}
var argNames = fn.argNames.length != args.length ? fn.argNames.slice(0, args.length) : fn.argNames;
while (argNames.length < args.length) argNames.push("?");
scopeCopy.fnType = new Fn(fn.name, self, args, argNames, ANull);
if (fn.arguments) {
var argset = scopeCopy.fnType.arguments = new AVal;
scopeCopy.defProp("arguments").addType(new Arr(argset));
for (var i = 0; i < args.length; ++i) args[i].propagate(argset);
}
node.body.scope = scopeCopy;
walk.recursive(node.body, scopeCopy, null, scopeGatherer);
walk.recursive(node.body, scopeCopy, null, inferWrapper);
cx.curOrigin = oldOrigin;
return scopeCopy.fnType.retval;
});
};
}
function maybeTagAsGeneric(scope) {
var fn = scope.fnType, target = fn.retval;
if (target == ANull) return;
var targetInner, asArray;
if (!target.isEmpty() && (targetInner = target.getType()) instanceof Arr)
target = asArray = targetInner.getProp("<i>");
function explore(aval, path, depth) {
if (depth > 3 || !aval.forward) return;
for (var i = 0; i < aval.forward.length; ++i) {
var prop = aval.forward[i].propagatesTo();
if (!prop) continue;
var newPath = path, dest;
if (prop instanceof AVal) {
dest = prop;
} else if (prop.target instanceof AVal) {
newPath += prop.pathExt;
dest = prop.target;
} else continue;
if (dest == target) return newPath;
var found = explore(dest, newPath, depth + 1);
if (found) return found;
}
}
var foundPath = explore(fn.self, "!this", 0);
for (var i = 0; !foundPath && i < fn.args.length; ++i)
foundPath = explore(fn.args[i], "!" + i, 0);
if (foundPath) {
if (asArray) foundPath = "[" + foundPath + "]";
var p = new def.TypeParser(foundPath);
fn.computeRet = p.parseRetType();
fn.computeRetSource = foundPath;
return true;
}
}
// SCOPE GATHERING PASS
function addVar(scope, nameNode) {
var val = scope.defProp(nameNode.name, nameNode);
if (val.maybePurge) val.maybePurge = false;
return val;
}
var scopeGatherer = walk.make({
Function: function(node, scope, c) {
var inner = node.body.scope = new Scope(scope);
inner.node = node;
var argVals = [], argNames = [];
for (var i = 0; i < node.params.length; ++i) {
var param = node.params[i];
argNames.push(param.name);
argVals.push(addVar(inner, param));
}
inner.fnType = new Fn(node.id && node.id.name, new AVal, argVals, argNames, ANull);
inner.fnType.originNode = node;
if (node.id) {
var decl = node.type == "FunctionDeclaration";
addVar(decl ? scope : inner, node.id);
}
c(node.body, inner, "ScopeBody");
},
TryStatement: function(node, scope, c) {
c(node.block, scope, "Statement");
if (node.handler) {
var v = addVar(scope, node.handler.param);
c(node.handler.body, scope, "ScopeBody");
var e5 = cx.definitions.ecma5;
if (e5 && v.isEmpty()) getInstance(e5["Error.prototype"]).propagate(v, WG_CATCH_ERROR);
}
if (node.finalizer) c(node.finalizer, scope, "Statement");
},
VariableDeclaration: function(node, scope, c) {
for (var i = 0; i < node.declarations.length; ++i) {
var decl = node.declarations[i];
addVar(scope, decl.id);
if (decl.init) c(decl.init, scope, "Expression");
}
}
});
// CONSTRAINT GATHERING PASS
function propName(node, scope, c) {
var prop = node.property;
if (!node.computed) return prop.name;
if (prop.type == "Literal" && typeof prop.value == "string") return prop.value;
if (c) infer(prop, scope, c, ANull);
return "<i>";
}
function unopResultType(op) {
switch (op) {
case "+": case "-": case "~": return cx.num;
case "!": return cx.bool;
case "typeof": return cx.str;
case "void": case "delete": return ANull;
}
}
function binopIsBoolean(op) {
switch (op) {
case "==": case "!=": case "===": case "!==": case "<": case ">": case ">=": case "<=":
case "in": case "instanceof": return true;
}
}
function literalType(val) {
switch (typeof val) {
case "boolean": return cx.bool;
case "number": return cx.num;
case "string": return cx.str;
case "object":
case "function":
if (!val) return ANull;
return getInstance(cx.protos.RegExp);
}
}
function ret(f) {
return function(node, scope, c, out, name) {
var r = f(node, scope, c, name);
if (out) r.propagate(out);
return r;
};
}
function fill(f) {
return function(node, scope, c, out, name) {
if (!out) out = new AVal;
f(node, scope, c, out, name);
return out;
};
}
var inferExprVisitor = {
ArrayExpression: ret(function(node, scope, c) {
var eltval = new AVal;
for (var i = 0; i < node.elements.length; ++i) {
var elt = node.elements[i];
if (elt) infer(elt, scope, c, eltval);
}
return new Arr(eltval);
}),
ObjectExpression: ret(function(node, scope, c, name) {
var obj = node.objType = new Obj(true, name);
obj.originNode = node;
for (var i = 0; i < node.properties.length; ++i) {
var prop = node.properties[i], key = prop.key, name;
if (key.type == "Identifier") {
name = key.name;
} else if (typeof key.value == "string") {
name = key.value;
} else {
infer(prop.value, scope, c, ANull);
continue;
}
var val = obj.defProp(name, key);
val.initializer = true;
infer(prop.value, scope, c, val, name);
}
return obj;
}),
FunctionExpression: ret(function(node, scope, c, name) {
var inner = node.body.scope, fn = inner.fnType;
if (name && !fn.name) fn.name = name;
c(node.body, scope, "ScopeBody");
maybeTagAsInstantiated(node, inner) || maybeTagAsGeneric(inner);
if (node.id) inner.getProp(node.id.name).addType(fn);
return fn;
}),
SequenceExpression: ret(function(node, scope, c) {
for (var i = 0, l = node.expressions.length - 1; i < l; ++i)
infer(node.expressions[i], scope, c, ANull);
return infer(node.expressions[l], scope, c);
}),
UnaryExpression: ret(function(node, scope, c) {
infer(node.argument, scope, c, ANull);
return unopResultType(node.operator);
}),
UpdateExpression: ret(function(node, scope, c) {
infer(node.argument, scope, c, ANull);
return cx.num;
}),
BinaryExpression: ret(function(node, scope, c) {
if (node.operator == "+") {
var lhs = infer(node.left, scope, c);
var rhs = infer(node.right, scope, c);
if (lhs.hasType(cx.str) || rhs.hasType(cx.str)) return cx.str;
if (lhs.hasType(cx.num) && rhs.hasType(cx.num)) return cx.num;
var result = new AVal;
lhs.propagate(new IsAdded(rhs, result));
rhs.propagate(new IsAdded(lhs, result));
return result;
} else {
infer(node.left, scope, c, ANull);
infer(node.right, scope, c, ANull);
return binopIsBoolean(node.operator) ? cx.bool : cx.num;
}
}),
AssignmentExpression: ret(function(node, scope, c) {
var rhs, name, pName;
if (node.left.type == "MemberExpression") {
pName = propName(node.left, scope, c);
if (node.left.object.type == "Identifier")
name = node.left.object.name + "." + pName;
} else {
name = node.left.name;
}
if (node.operator != "=" && node.operator != "+=") {
infer(node.right, scope, c, ANull);
rhs = cx.num;
} else {
rhs = infer(node.right, scope, c, null, name);
}
if (node.left.type == "MemberExpression") {
var obj = infer(node.left.object, scope, c);
if (pName == "prototype") maybeInstantiate(scope, 20);
if (pName == "<i>") {
// This is a hack to recognize for/in loops that copy
// properties, and do the copying ourselves, insofar as we
// manage, because such loops tend to be relevant for type
// information.
var v = node.left.property.name, local = scope.props[v], over = local && local.iteratesOver;
if (over) {
maybeInstantiate(scope, 20);
var fromRight = node.right.type == "MemberExpression" && node.right.computed && node.right.property.name == v;
over.forAllProps(function(prop, val, local) {
if (local && prop != "prototype" && prop != "<i>")
obj.propagate(new PropHasSubset(prop, fromRight ? val : ANull));
});
return rhs;
}
}
obj.propagate(new PropHasSubset(pName, rhs, node.left.property));
} else { // Identifier
var v = scope.defVar(node.left.name, node.left);
if (v.maybePurge) v.maybePurge = false;
rhs.propagate(v);
}
return rhs;
}),
LogicalExpression: fill(function(node, scope, c, out) {
infer(node.left, scope, c, out);
infer(node.right, scope, c, out);
}),
ConditionalExpression: fill(function(node, scope, c, out) {
infer(node.test, scope, c, ANull);
infer(node.consequent, scope, c, out);
infer(node.alternate, scope, c, out);
}),
NewExpression: fill(function(node, scope, c, out, name) {
if (node.callee.type == "Identifier" && node.callee.name in scope.props)
maybeInstantiate(scope, 20);
for (var i = 0, args = []; i < node.arguments.length; ++i)
args.push(infer(node.arguments[i], scope, c));
var callee = infer(node.callee, scope, c);
var self = new AVal;
callee.propagate(new IsCtor(self, name && /\.prototype$/.test(name)));
self.propagate(out, WG_NEW_INSTANCE);
callee.propagate(new IsCallee(self, args, node.arguments, new IfObj(out)));
}),
CallExpression: fill(function(node, scope, c, out) {
for (var i = 0, args = []; i < node.arguments.length; ++i)
args.push(infer(node.arguments[i], scope, c));
if (node.callee.type == "MemberExpression") {
var self = infer(node.callee.object, scope, c);
var pName = propName(node.callee, scope, c);
if ((pName == "call" || pName == "apply") &&
scope.fnType && scope.fnType.args.indexOf(self) > -1)
maybeInstantiate(scope, 30);
self.propagate(new HasMethodCall(pName, args, node.arguments, out));
} else {
var callee = infer(node.callee, scope, c);
if (scope.fnType && scope.fnType.args.indexOf(callee) > -1)
maybeInstantiate(scope, 30);
var knownFn = callee.getFunctionType();
if (knownFn && knownFn.instantiateScore && scope.fnType)
maybeInstantiate(scope, knownFn.instantiateScore / 5);
callee.propagate(new IsCallee(cx.topScope, args, node.arguments, out));
}
}),
MemberExpression: fill(function(node, scope, c, out) {
var name = propName(node, scope);
var obj = infer(node.object, scope, c);
var prop = obj.getProp(name);
if (name == "<i>") {
var propType = infer(node.property, scope, c);
if (!propType.hasType(cx.num))
return prop.propagate(out, WG_MULTI_MEMBER);
}
prop.propagate(out);
}),
Identifier: ret(function(node, scope) {
if (node.name == "arguments" && scope.fnType && !(node.name in scope.props))
scope.defProp(node.name, scope.fnType.originNode)
.addType(new Arr(scope.fnType.arguments = new AVal));
return scope.getProp(node.name);
}),
ThisExpression: ret(function(_node, scope) {
return scope.fnType ? scope.fnType.self : cx.topScope;
}),
Literal: ret(function(node) {
return literalType(node.value);
})
};
function infer(node, scope, c, out, name) {
return inferExprVisitor[node.type](node, scope, c, out, name);
}
var inferWrapper = walk.make({
Expression: function(node, scope, c) {
infer(node, scope, c, ANull);
},
FunctionDeclaration: function(node, scope, c) {
var inner = node.body.scope, fn = inner.fnType;
c(node.body, scope, "ScopeBody");
maybeTagAsInstantiated(node, inner) || maybeTagAsGeneric(inner);
var prop = scope.getProp(node.id.name);
prop.addType(fn);
},
VariableDeclaration: function(node, scope, c) {
for (var i = 0; i < node.declarations.length; ++i) {
var decl = node.declarations[i], prop = scope.getProp(decl.id.name);
if (decl.init)
infer(decl.init, scope, c, prop, decl.id.name);
}
},
ReturnStatement: function(node, scope, c) {
if (node.argument && scope.fnType) {
if (scope.fnType.retval == ANull) scope.fnType.retval = new AVal;
infer(node.argument, scope, c, scope.fnType.retval);
}
},
ForInStatement: function(node, scope, c) {
var source = infer(node.right, scope, c);
if ((node.right.type == "Identifier" && node.right.name in scope.props) ||
(node.right.type == "MemberExpression" && node.right.property.name == "prototype")) {
maybeInstantiate(scope, 5);
var varName;
if (node.left.type == "Identifier") {
varName = node.left.name;
} else if (node.left.type == "VariableDeclaration") {
varName = node.left.declarations[0].id.name;
}
if (varName && varName in scope.props)
scope.getProp(varName).iteratesOver = source;
}
c(node.body, scope, "Statement");
},
ScopeBody: function(node, scope, c) { c(node, node.scope || scope); }
});
// PARSING
function runPasses(passes, pass) {
var arr = passes && passes[pass];
var args = Array.prototype.slice.call(arguments, 2);
if (arr) for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
}
var parse = exports.parse = function(text, passes, options) {
var ast;
try { ast = acorn.parse(text, options); }
catch(e) { ast = acorn_loose.parse_dammit(text, options); }
runPasses(passes, "postParse", ast, text);
return ast;
};
// ANALYSIS INTERFACE
exports.analyze = function(ast, name, scope, passes) {
if (typeof ast == "string") ast = parse(ast);
if (!name) name = "file#" + cx.origins.length;
exports.addOrigin(cx.curOrigin = name);
if (!scope) scope = cx.topScope;
walk.recursive(ast, scope, null, scopeGatherer);
runPasses(passes, "preInfer", ast, scope);
walk.recursive(ast, scope, null, inferWrapper);
runPasses(passes, "postInfer", ast, scope);
cx.curOrigin = null;
};
// PURGING
exports.purgeTypes = function(origins, start, end) {
var test = makePredicate(origins, start, end);
++cx.purgeGen;
cx.topScope.purge(test);
for (var prop in cx.props) {
var list = cx.props[prop];
for (var i = 0; i < list.length; ++i) {
var obj = list[i], av = obj.props[prop];
if (!av || test(av, av.originNode)) list.splice(i--, 1);
}
if (!list.length) delete cx.props[prop];
}
};
function makePredicate(origins, start, end) {
var arr = Array.isArray(origins);
if (arr && origins.length == 1) { origins = origins[0]; arr = false; }
if (arr) {
if (end == null) return function(n) { return origins.indexOf(n.origin) > -1; };
return function(n, pos) { return pos && pos.start >= start && pos.end <= end && origins.indexOf(n.origin) > -1; };
} else {
if (end == null) return function(n) { return n.origin == origins; };
return function(n, pos) { return pos && pos.start >= start && pos.end <= end && n.origin == origins; };
}
}
AVal.prototype.purge = function(test) {
if (this.purgeGen == cx.purgeGen) return;
this.purgeGen = cx.purgeGen;
for (var i = 0; i < this.types.length; ++i) {
var type = this.types[i];
if (test(type, type.originNode))
this.types.splice(i--, 1);
else
type.purge(test);
}
if (this.forward) for (var i = 0; i < this.forward.length; ++i) {
var f = this.forward[i];
if (test(f)) {
this.forward.splice(i--, 1);
if (this.props) this.props = null;
} else if (f.purge) {
f.purge(test);
}
}
};
ANull.purge = function() {};
Obj.prototype.purge = function(test) {
if (this.purgeGen == cx.purgeGen) return true;
this.purgeGen = cx.purgeGen;
for (var p in this.props) {
var av = this.props[p];
if (test(av, av.originNode))
this.removeProp(p);
av.purge(test);
}
};
Fn.prototype.purge = function(test) {
if (Obj.prototype.purge.call(this, test)) return;
this.self.purge(test);
this.retval.purge(test);
for (var i = 0; i < this.args.length; ++i) this.args[i].purge(test);
};
exports.markVariablesDefinedBy = function(scope, origins, start, end) {
var test = makePredicate(origins, start, end);
for (var s = scope; s; s = s.prev) for (var p in s.props) {
var prop = s.props[p];
if (test(prop, prop.originNode)) {
prop.maybePurge = true;
if (start == null && prop.originNode) prop.originNode = null;
}
}
};
exports.purgeMarkedVariables = function(scope) {
for (var s = scope; s; s = s.prev) for (var p in s.props)
if (s.props[p].maybePurge) delete s.props[p];
};
// EXPRESSION TYPE DETERMINATION
function findByPropertyName(name) {
guessing = true;
var found = objsWithProp(name);
if (found) for (var i = 0; i < found.length; ++i) {
var val = found[i].getProp(name);
if (!val.isEmpty()) return val;
}
return ANull;
}
var typeFinder = {
ArrayExpression: function(node, scope) {
var eltval = new AVal;
for (var i = 0; i < node.elements.length; ++i) {
var elt = node.elements[i];
if (elt) findType(elt, scope).propagate(eltval);
}
return new Arr(eltval);
},
ObjectExpression: function(node) {
return node.objType;
},
FunctionExpression: function(node) {
return node.body.scope.fnType;
},
SequenceExpression: function(node, scope) {
return findType(node.expressions[node.expressions.length-1], scope);
},
UnaryExpression: function(node) {
return unopResultType(node.operator);
},
UpdateExpression: function() {
return cx.num;
},
BinaryExpression: function(node, scope) {
if (binopIsBoolean(node.operator)) return cx.bool;
if (node.operator == "+") {
var lhs = findType(node.left, scope);
var rhs = findType(node.right, scope);
if (lhs.hasType(cx.str) || rhs.hasType(cx.str)) return cx.str;
}
return cx.num;
},
AssignmentExpression: function(node, scope) {
return findType(node.right, scope);
},
LogicalExpression: function(node, scope) {
var lhs = findType(node.left, scope);
return lhs.isEmpty() ? findType(node.right, scope) : lhs;
},
ConditionalExpression: function(node, scope) {
var lhs = findType(node.consequent, scope);
return lhs.isEmpty() ? findType(node.alternate, scope) : lhs;
},
NewExpression: function(node, scope) {
var f = findType(node.callee, scope).getFunctionType();
var proto = f && f.getProp("prototype").getType();
if (!proto) return ANull;
return getInstance(proto, f);
},
CallExpression: function(node, scope) {
var f = findType(node.callee, scope).getFunctionType();
if (!f) return ANull;
if (f.computeRet) {
for (var i = 0, args = []; i < node.arguments.length; ++i)
args.push(findType(node.arguments[i], scope));
var self = ANull;
if (node.callee.type == "MemberExpression")
self = findType(node.callee.object, scope);
return f.computeRet(self, args, node.arguments);
} else {
return f.retval;
}
},
MemberExpression: function(node, scope) {
var propN = propName(node, scope), obj = findType(node.object, scope).getType();
if (obj) return obj.getProp(propN);
if (propN == "<i>") return ANull;
return findByPropertyName(propN);
},
Identifier: function(node, scope) {
return scope.hasProp(node.name) || ANull;
},
ThisExpression: function(_node, scope) {
return scope.fnType ? scope.fnType.self : cx.topScope;
},
Literal: function(node) {
return literalType(node.value);
}
};
function findType(node, scope) {
var found = typeFinder[node.type](node, scope);
return found;
}
var searchVisitor = exports.searchVisitor = walk.make({
Function: function(node, _st, c) {
var scope = node.body.scope;
if (node.id) c(node.id, scope);
for (var i = 0; i < node.params.length; ++i)
c(node.params[i], scope);
c(node.body, scope, "ScopeBody");
},
TryStatement: function(node, st, c) {
if (node.handler)
c(node.handler.param, st);
walk.base.TryStatement(node, st, c);
},
VariableDeclaration: function(node, st, c) {
for (var i = 0; i < node.declarations.length; ++i) {
var decl = node.declarations[i];
c(decl.id, st);
if (decl.init) c(decl.init, st, "Expression");
}
}
});
exports.fullVisitor = walk.make({
MemberExpression: function(node, st, c) {
c(node.object, st, "Expression");
c(node.property, st, node.computed ? "Expression" : null);
},
ObjectExpression: function(node, st, c) {
for (var i = 0; i < node.properties.length; ++i) {
c(node.properties[i].value, st, "Expression");
c(node.properties[i].key, st);
}
}
}, searchVisitor);
exports.findExpressionAt = function(ast, start, end, defaultScope, filter) {
var test = filter || function(_t, node) {return typeFinder.hasOwnProperty(node.type);};
return walk.findNodeAt(ast, start, end, test, searchVisitor, defaultScope || cx.topScope);
};
exports.findExpressionAround = function(ast, start, end, defaultScope, filter) {
var test = filter || function(_t, node) {
if (start != null && node.start > start) return false;
return typeFinder.hasOwnProperty(node.type);
};
return walk.findNodeAround(ast, end, test, searchVisitor, defaultScope || cx.topScope);
};
exports.expressionType = function(found) {
return findType(found.node, found.state);
};
// Flag used to indicate that some wild guessing was used to produce
// a type or set of completions.
var guessing = false;
exports.resetGuessing = function(val) { guessing = val; };
exports.didGuess = function() { return guessing; };
exports.forAllPropertiesOf = function(type, f) {
type.gatherProperties(f, 0);
};
var refFindWalker = walk.make({}, searchVisitor);
exports.findRefs = function(ast, baseScope, name, refScope, f) {
refFindWalker.Identifier = function(node, scope) {
if (node.name != name) return;
for (var s = scope; s; s = s.prev) {
if (s == refScope) f(node, scope);
if (name in s.props) return;
}
};
walk.recursive(ast, baseScope, null, refFindWalker);
};
var simpleWalker = walk.make({
Function: function(node, _st, c) { c(node.body, node.body.scope, "ScopeBody"); }
});
exports.findPropRefs = function(ast, scope, objType, propName, f) {
walk.simple(ast, {
MemberExpression: function(node, scope) {
if (node.computed || node.property.name != propName) return;
if (findType(node.object, scope).getType() == objType) f(node.property);
},
ObjectExpression: function(node, scope) {
if (findType(node, scope).getType() != objType) return;
for (var i = 0; i < node.properties.length; ++i)
if (node.properties[i].key.name == propName) f(node.properties[i].key);
}
}, simpleWalker, scope);
};
// LOCAL-VARIABLE QUERIES
var scopeAt = exports.scopeAt = function(ast, pos, defaultScope) {
var found = walk.findNodeAround(ast, pos, function(tp, node) {
return tp == "ScopeBody" && node.scope;
});
if (found) return found.node.scope;
else return defaultScope || cx.topScope;
};
exports.forAllLocalsAt = function(ast, pos, defaultScope, f) {
var scope = scopeAt(ast, pos, defaultScope);
scope.gatherProperties(f, 0);
};
// INIT DEF MODULE
// Delayed initialization because of cyclic dependencies.
def = exports.def = def.init({}, exports);
});
|
/**
* Promise类
*/
function Promise() {
this.status = 'unfulfilled'; //fulfilled|failed
this.fulfilledHandlers = [];
this.errorHandlers = [];
this.reason = '';
}
Promise.prototype = {
constructor: Promise,
reject: function(arg) {
if (this.status !== 'unfulfilled') {
return this;
}
this.reason = arg;
this.status = 'failed';
return this.fire(this.errorHandlers, arg);
},
isResolved: function() {
return this.status === 'fulfilled';
},
resolve: function(arg) {
if (this.status !== 'unfulfilled') {
return this;
}
this.reason = arg;
this.status = 'fulfilled';
return this.fire(this.fulfilledHandlers, arg);
},
fail: function(handler) {
return this.then(undefined, handler);
},
always: function(handler) {
return this.then(handler, handler);
},
then: function(fulfilledHandler, errorHandler) {
switch (this.status) {
case 'unfulfilled':
this.add(fulfilledHandler, 'fulfilled')
.add(errorHandler, 'error');
break;
case 'fulfilled':
this.fire(fulfilledHandler, this.reason);
break;
case 'failed':
this.fire(errorHandler, this.reason);
}
return this;
},
done: function(handler) {
return this.then(handler);
},
fire: function(fns, arg) {
if ($.isArray(fns)) {
var fn;
while (fn = fns.shift()) {
if ($.isFunction(fn)) {
fn(arg);
}
}
this.clear();
} else if ($.isFunction(fns)) {
fns(arg);
}
return this;
},
add: function(handler, which) {
which = which + 'Handlers';
if ($.isFunction(handler) && this[which]) {
this[which].push(handler);
}
return this;
},
clear: function() {
this.fulfilledHandlers.length = 0;
this.errorHandlers.length = 0;
}
};
/**
* 是否是Promise实例
* @param {Object} o 被检验的对象
* @return {Boolean} 是否为实例
*/
function isPromise(o) {
return o instanceof Promise;
} |
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
var coveralls = require('gulp-coveralls');
var babel = require('gulp-babel');
var del = require('del');
var isparta = require('isparta');
// Initialize the babel transpiler so ES2015 files gets compiled
// when they're loaded
require('babel-core/register');
gulp.task('static', function () {
return gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('nsp', function (cb) {
nsp({package: path.resolve('package.json')}, cb);
});
gulp.task('pre-test', function () {
return gulp.src('lib/**/*.js')
.pipe(excludeGitignore())
.pipe(istanbul({
includeUntested: true,
instrumenter: isparta.Instrumenter
}))
.pipe(istanbul.hookRequire());
});
gulp.task('test', ['pre-test'], function (cb) {
var mochaErr;
gulp.src('test/**/*.js')
.pipe(plumber())
.pipe(mocha({reporter: 'spec'}))
.on('error', function (err) {
mochaErr = err;
})
.pipe(istanbul.writeReports())
.on('end', function () {
cb(mochaErr);
});
});
gulp.task('watch', function () {
gulp.watch(['lib/**/*.js', 'test/**'], ['test']);
});
gulp.task('coveralls', ['test'], function () {
if (!process.env.CI) {
return;
}
return gulp.src(path.join(__dirname, 'coverage/lcov.info'))
.pipe(coveralls());
});
gulp.task('babel', ['clean'], function () {
return gulp.src('lib/**/*.js')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
gulp.task('clean', function () {
return del('dist');
});
gulp.task('prepublish', ['nsp', 'babel']);
gulp.task('default', ['static', 'test', 'coveralls']);
|
function fn () {
console.log('main fn');
}
export default fn;
|
/**
* 公式对象,表达式容器
*/
define( function ( require ) {
var kity = require( 'kity' ),
GTYPE = require( "def/gtype" ),
FontManager = require( "font/manager" ),
FontInstaller = require( "font/installer" ),
DEFAULT_OPTIONS = {
fontsize: 50,
autoresize: true,
padding: [ 0 ]
},
Output = require( "base/output" ),
EXPRESSION_INTERVAL = 10,
ExpressionWrap = kity.createClass( 'ExpressionWrap', {
constructor: function ( exp, config ) {
this.wrap = new kity.Group();
this.bg = new kity.Rect( 0, 0, 0, 0 ).fill( "transparent" );
this.exp = exp;
this.config = config;
this.wrap.setAttr( "data-type", "kf-exp-wrap" );
this.bg.setAttr( "data-type", "kf-exp-wrap-bg" );
this.wrap.addShape( this.bg );
this.wrap.addShape( this.exp );
},
getWrapShape: function () {
return this.wrap;
},
getExpression: function () {
return this.exp;
},
getBackground: function () {
return this.bg;
},
resize: function () {
var padding = this.config.padding,
expBox = this.exp.getFixRenderBox();
if ( padding.length === 1 ) {
padding[ 1 ] = padding[ 0 ];
}
this.bg.setSize( padding[ 1 ] * 2 + expBox.width, padding[ 0 ] * 2 + expBox.height );
this.exp.translate( padding[ 1 ], padding[ 0 ] );
}
}),
Formula = kity.createClass( 'Formula', {
base: require( 'fpaper' ),
constructor: function ( container, config ) {
this.callBase( container );
this.expressions = [];
this.fontInstaller = new FontInstaller( this );
this.config = kity.Utils.extend( {}, DEFAULT_OPTIONS, config );
this.initEnvironment();
this.initInnerFont();
},
getContentContainer: function () {
return this.container;
},
initEnvironment: function () {
this.zoom = ( this.config.fontsize ) / 50 ;
if ( "width" in this.config ) {
this.setWidth( this.config.width );
}
if ( "height" in this.config ) {
this.setHeight( this.config.height );
}
this.node.setAttribute( "font-size", DEFAULT_OPTIONS.fontsize );
},
initInnerFont: function () {
var fontList = FontManager.getFontList(),
_self = this;
kity.Utils.each( fontList, function ( fontInfo ) {
createFontStyle( fontInfo );
} );
function createFontStyle ( fontInfo ) {
var stylesheet = _self.doc.createElement( "style" ),
tpl = '@font-face{font-family: "${fontFamily}";font-style: normal;src: url("${src}") format("woff");}';
stylesheet.setAttribute( "type", "text/css" );
stylesheet.innerHTML = tpl.replace( '${fontFamily}', fontInfo.meta.fontFamily )
.replace( '${src}', fontInfo.meta.src );
_self.resourceNode.appendChild( stylesheet );
}
},
insertExpression: function ( expression, index ) {
var expWrap = this.wrap( expression );
// clear zoom
this.container.clearTransform();
this.expressions.splice( index, 0, expWrap.getWrapShape() );
this.addShape( expWrap.getWrapShape() );
notifyExpression.call( this, expWrap.getExpression() );
expWrap.resize();
correctOffset.call( this );
this.resetZoom();
this.config.autoresize && this.resize();
},
appendExpression: function ( expression ) {
this.insertExpression( expression, this.expressions.length );
},
resize: function () {
var renderBox = this.container.getFixRenderBox();
this.node.setAttribute( "width", renderBox.width );
this.node.setAttribute( "height", renderBox.height );
},
resetZoom: function () {
var zoomLevel = this.zoom / this.getBaseZoom();
if ( zoomLevel !== 0 ) {
this.container.scale( zoomLevel );
}
},
wrap: function ( exp ) {
return new ExpressionWrap( exp, this.config );
},
clear: function () {
this.callBase();
this.expressions = [];
},
clearExpressions: function () {
kity.Utils.each( this.expressions, function ( exp ) {
exp.remove();
} );
this.expressions = [];
},
toJPG: function ( cb ) {
new Output( this ).toJPG( cb );
},
toPNG: function ( cb ) {
new Output( this ).toPNG( cb );
}
} );
kity.Utils.extend( Formula, {
registerFont: function ( fontData ) {
FontManager.registerFont( fontData );
}
} );
// 调整表达式之间的偏移
function correctOffset () {
var exprOffset = 0;
kity.Utils.each( this.expressions, function ( expr ) {
var box = null;
if ( !expr ) {
return;
}
expr.setMatrix( new kity.Matrix( 1, 0, 0, 1, 0, 0 ) );
box = expr.getFixRenderBox();
expr.translate( 0 - box.x, exprOffset );
exprOffset += box.height + EXPRESSION_INTERVAL;
} );
return this;
}
// 通知表达式已接入到paper
function notifyExpression ( expression ) {
var len = 0;
if ( !expression ) {
return;
}
if ( expression.getType() === GTYPE.EXP ) {
for ( var i = 0, len = expression.getChildren().length; i < len; i++ ) {
notifyExpression( expression.getChild( i ) );
}
} else if ( expression.getType() === GTYPE.COMPOUND_EXP ) {
// 操作数处理
for ( var i = 0, len = expression.getOperands().length; i < len; i++ ) {
notifyExpression( expression.getOperand( i ) );
}
// 处理操作符
notifyExpression( expression.getOperator() );
}
expression.addedCall && expression.addedCall();
}
return Formula;
} ); |
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 82810175, "Date": "09\/30\/2008", "Time": "06:32 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104439, -87.934432 ], "Address": "1906 W HAMPTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 0, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.9344325, 43.104439486005958 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1, "Incident Number": 82710122, "Date": "09\/27\/2008", "Time": "03:13 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.128957, -87.952243 ], "Address": "6151 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952242641867315, 43.128957176203059 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 2, "Incident Number": 82720011, "Date": "09\/27\/2008", "Time": "11:11 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.122731, -87.950704 ], "Address": "3027 W CARMEN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950703693173281, 43.122731481245459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 3, "Incident Number": 82700218, "Date": "09\/26\/2008", "Time": "09:57 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119371, -87.951844 ], "Address": "3002 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.951843549483911, 43.119371438830669 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 4, "Incident Number": 82690032, "Date": "09\/25\/2008", "Time": "04:05 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.125760, -87.962188 ], "Address": "5945 N 40TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.962188099255357, 43.12575967055227 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 5, "Incident Number": 82690243, "Date": "09\/25\/2008", "Time": "10:54 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113898, -87.961259 ], "Address": "5303 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961258632003947, 43.113898173466453 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 6, "Incident Number": 82680171, "Date": "09\/24\/2008", "Time": "06:28 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097418, -87.942924 ], "Address": "4400 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 0, "e_clusterK10": 4, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942924247623296, 43.097417868613007 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 7, "Incident Number": 82670041, "Date": "09\/23\/2008", "Time": "08:40 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.148400, -87.958260 ], "Address": "3707 W GOOD HOPE RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95826, 43.148399524525622 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 8, "Incident Number": 82670149, "Date": "09\/23\/2008", "Time": "04:58 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120828, -87.956232 ], "Address": "5673 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956231592042002, 43.120828005828372 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 9, "Incident Number": 82670241, "Date": "09\/23\/2008", "Time": "11:21 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109018, -87.942716 ], "Address": "5030 N 24TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.942715886317913, 43.109017994171609 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 10, "Incident Number": 82680003, "Date": "09\/23\/2008", "Time": "11:57 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109806, -87.964681 ], "Address": "4135 W LANCASTER AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9646815, 43.109806485140581 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 11, "Incident Number": 82660078, "Date": "09\/22\/2008", "Time": "10:40 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097613, -87.929232 ], "Address": "1500 W CORNELL ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929232234520214, 43.097613482687763 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 12, "Incident Number": 82660134, "Date": "09\/22\/2008", "Time": "04:21 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111994, -87.962533 ], "Address": "4000 W VILLARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.962533099085221, 43.111994433841303 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 13, "Incident Number": 82660171, "Date": "09\/22\/2008", "Time": "05:11 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.108119, -87.954120 ], "Address": "4997 N 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95411960237297, 43.108118959610486 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 14, "Incident Number": 82650059, "Date": "09\/21\/2008", "Time": "07:39 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.145279, -87.968760 ], "Address": "7025 N 45TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.968760153644027, 43.145279444630376 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 15, "Incident Number": 82650084, "Date": "09\/21\/2008", "Time": "09:48 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.144882, -87.965479 ], "Address": "7002 N 43RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.965478517186625, 43.144881972836004 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 16, "Incident Number": 82650132, "Date": "09\/21\/2008", "Time": "11:56 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": "THEFT FROM MOTOR VEHICLE", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.145917, -87.967336 ], "Address": "7044 N 44TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.967336404062863, 43.14591685206878 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 17, "Incident Number": 82650156, "Date": "09\/21\/2008", "Time": "03:46 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107347, -87.953310 ], "Address": "3210 W CAMERON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.953309580904843, 43.107347460470756 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 18, "Incident Number": 82650181, "Date": "09\/21\/2008", "Time": "03:50 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105303, -87.962739 ], "Address": "4829 N 40TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.962739132003946, 43.105302586733217 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 19, "Incident Number": 82640112, "Date": "09\/20\/2008", "Time": "08:39 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109856, -87.939075 ], "Address": "5080 N 22ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.939075128331964, 43.109855709091981 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 20, "Incident Number": 82630071, "Date": "09\/19\/2008", "Time": "10:40 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114097, -87.950105 ], "Address": "5314 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950104557274202, 43.114096959201333 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 21, "Incident Number": 82630073, "Date": "09\/19\/2008", "Time": "10:39 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093997, -87.933509 ], "Address": "1801 W OLIVE ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.933508918229776, 43.093996773675023 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 22, "Incident Number": 82630194, "Date": "09\/19\/2008", "Time": "07:32 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093855, -87.939341 ], "Address": "4187 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939341037653335, 43.093854618096827 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 23, "Incident Number": 82640006, "Date": "09\/19\/2008", "Time": "10:32 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.126584, -87.955040 ], "Address": "3406 W FLORIST AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.955039865789558, 43.126584293318423 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 24, "Incident Number": 82620040, "Date": "09\/18\/2008", "Time": "07:44 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092917, -87.931894 ], "Address": "4162 N 17TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931894360782692, 43.092917329447744 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 25, "Incident Number": 82610111, "Date": "09\/17\/2008", "Time": "12:09 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097262, -87.938324 ], "Address": "2100 W ROOSEVELT DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 4, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93832442702967, 43.097261802411985 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 26, "Incident Number": 82610159, "Date": "09\/17\/2008", "Time": "05:46 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113837, -87.966235 ], "Address": "5300 N SHERMAN BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966235152661667, 43.113837347338311 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 27, "Incident Number": 82590055, "Date": "09\/15\/2008", "Time": "09:25 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096095, -87.946859 ], "Address": "4339 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 0, "e_clusterK10": 4, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946858610363861, 43.096095031363603 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 28, "Incident Number": 82570037, "Date": "09\/13\/2008", "Time": "07:06 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105265, -87.944076 ], "Address": "4834 N 25TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.944076379104544, 43.105265161809683 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 29, "Incident Number": 82560019, "Date": "09\/12\/2008", "Time": "01:42 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.099523, -87.950405 ], "Address": "4522 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950404658030109, 43.0995231829015 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 30, "Incident Number": 82560130, "Date": "09\/12\/2008", "Time": "02:25 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.115714, -87.957526 ], "Address": "5402 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957526360782694, 43.115714413266772 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 31, "Incident Number": 82550076, "Date": "09\/11\/2008", "Time": "11:51 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.149650, -87.965304 ], "Address": "7246 N 43RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 7, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.965303877950717, 43.149650312510872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 32, "Incident Number": 82550110, "Date": "09\/11\/2008", "Time": "02:36 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107627, -87.970264 ], "Address": "4965 N 46TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.970263555538068, 43.107626746306558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 33, "Incident Number": 82550130, "Date": "09\/11\/2008", "Time": "04:20 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112584, -87.956454 ], "Address": "5237 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956454320160745, 43.112584087008912 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 34, "Incident Number": 82540117, "Date": "09\/10\/2008", "Time": "02:39 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.090712, -87.945662 ], "Address": "4060 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94566237131427, 43.090711910352582 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 35, "Incident Number": 82540129, "Date": "09\/10\/2008", "Time": "03:59 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.131278, -87.956080 ], "Address": "3500 W DOUGLAS AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956080234064714, 43.131278192855163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 36, "Incident Number": 82540201, "Date": "09\/10\/2008", "Time": "09:07 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089607, -87.931975 ], "Address": "4000 N 17TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931974805419586, 43.089607468045081 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 37, "Incident Number": 82520048, "Date": "09\/08\/2008", "Time": "08:37 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091308, -87.939692 ], "Address": "4074 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939692316781375, 43.091308392463418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 38, "Incident Number": 82520078, "Date": "09\/08\/2008", "Time": "10:24 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105886, -87.945302 ], "Address": "4864 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945302411853135, 43.105885910352583 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 39, "Incident Number": 82520133, "Date": "09\/08\/2008", "Time": "12:03 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.108646, -87.936973 ], "Address": "5021 N 20TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.936972727008239, 43.108645975796577 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 40, "Incident Number": 82520179, "Date": "09\/08\/2008", "Time": "05:53 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089787, -87.941259 ], "Address": "2312 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94125947155058, 43.089786533181289 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 41, "Incident Number": 82520194, "Date": "09\/08\/2008", "Time": "05:35 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107345, -87.946590 ], "Address": "4947 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946590124790575, 43.107345031363622 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 42, "Incident Number": 82520229, "Date": "09\/08\/2008", "Time": "09:08 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.090432, -87.939178 ], "Address": "4030 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939178353760553, 43.090431652877115 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 43, "Incident Number": 82510064, "Date": "09\/07\/2008", "Time": "10:29 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091108, -87.925746 ], "Address": "4076 N 12TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 1, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.925746386317911, 43.091107575076478 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 44, "Incident Number": 82500179, "Date": "09\/06\/2008", "Time": "08:14 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089835, -87.940831 ], "Address": "4002 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940831080268012, 43.089834985468094 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 45, "Incident Number": 82470035, "Date": "09\/03\/2008", "Time": "06:51 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106320, -87.941620 ], "Address": "4885 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.941620092042001, 43.106319502914204 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 46, "Incident Number": 82470052, "Date": "09\/03\/2008", "Time": "09:18 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.099049, -87.949111 ], "Address": "4500 N 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.949111102801609, 43.099048774937273 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 47, "Incident Number": 82470184, "Date": "09\/03\/2008", "Time": "10:35 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.146283, -87.956204 ], "Address": "7061 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 2, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956204435772236, 43.146282866495497 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 48, "Incident Number": 82460069, "Date": "09\/02\/2008", "Time": "11:00 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091308, -87.939692 ], "Address": "4074 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939692316781375, 43.091308392463418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 49, "Incident Number": 82460161, "Date": "09\/02\/2008", "Time": "07:11 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091308, -87.939692 ], "Address": "4074 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939692316781375, 43.091308392463418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 50, "Incident Number": 82450033, "Date": "09\/01\/2008", "Time": "02:14 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.125857, -87.966036 ], "Address": "5954 N SHERMAN BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 0, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966035794355534, 43.125857456903972 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 51, "Incident Number": 82450135, "Date": "09\/01\/2008", "Time": "04:00 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111846, -87.948612 ], "Address": "2828 W VILLARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948611832361934, 43.111846486005959 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 52, "Incident Number": 82450161, "Date": "09\/01\/2008", "Time": "12:58 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.103737, -87.941668 ], "Address": "4761 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.941668099255352, 43.10373658673322 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 53, "Incident Number": 82460005, "Date": "09\/01\/2008", "Time": "11:44 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114888, -87.961221 ], "Address": "5351 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961220599255356, 43.114888173466454 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 54, "Incident Number": 82730019, "Date": "09\/29\/2008", "Time": "06:01 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033780, -87.962602 ], "Address": "3840 W MT VERNON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.962602164723876, 43.033779533181267 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 55, "Incident Number": 82730217, "Date": "09\/29\/2008", "Time": "10:51 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075854, -87.978466 ], "Address": "3124 N 52ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.978466353569317, 43.075854303912536 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 56, "Incident Number": 82710042, "Date": "09\/27\/2008", "Time": "04:59 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061875, -87.978658 ], "Address": "2368 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97865802167739, 43.061875224242542 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 57, "Incident Number": 82710110, "Date": "09\/27\/2008", "Time": "01:47 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083559, -87.990940 ], "Address": "3603 N 63RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.990940051503131, 43.083559257285486 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 58, "Incident Number": 82690137, "Date": "09\/25\/2008", "Time": "03:47 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054083, -87.983034 ], "Address": "1752 N 56TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.98303441517136, 43.054082748542896 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 59, "Incident Number": 82680067, "Date": "09\/24\/2008", "Time": "09:57 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.081504, -87.997185 ], "Address": "6798 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.997185174967001, 43.08150436470649 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 60, "Incident Number": 82680116, "Date": "09\/24\/2008", "Time": "02:48 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045425, -87.970244 ], "Address": "1156 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 1, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.970243922384711, 43.045425 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 61, "Incident Number": 82660051, "Date": "09\/22\/2008", "Time": "09:52 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.070109, -87.986788 ], "Address": "5927 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.986788242382474, 43.070109204097314 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 62, "Incident Number": 82640162, "Date": "09\/20\/2008", "Time": "03:53 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073522, -87.992654 ], "Address": "6419 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.9926535, 43.073521513994052 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 63, "Incident Number": 82630180, "Date": "09\/19\/2008", "Time": "04:12 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055442, -87.979971 ], "Address": "1907 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.979970584828635, 43.055441664723872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 64, "Incident Number": 82630202, "Date": "09\/19\/2008", "Time": "09:43 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.046051, -87.983547 ], "Address": "5615 W MARTIN DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.983546892463409, 43.046050947515923 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 65, "Incident Number": 82620030, "Date": "09\/18\/2008", "Time": "07:30 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073474, -87.976181 ], "Address": "5000 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 66, "Incident Number": 82610134, "Date": "09\/17\/2008", "Time": "03:55 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068067, -87.978732 ], "Address": "5200 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.978731561972921, 43.068066865535521 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 67, "Incident Number": 82610198, "Date": "09\/17\/2008", "Time": "09:22 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "MOTOR VEHICLE THEFT", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066017, -87.987522 ], "Address": "2577 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.987521606468718, 43.06601716763808 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 68, "Incident Number": 82600069, "Date": "09\/16\/2008", "Time": "12:34 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071480, -87.979781 ], "Address": "2877 N 53RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97978054818492, 43.071480450458779 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 69, "Incident Number": 82590182, "Date": "09\/15\/2008", "Time": "04:36 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061562, -87.978672 ], "Address": "2360 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.978672360205778, 43.061561832361946 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 70, "Incident Number": 82580080, "Date": "09\/14\/2008", "Time": "01:42 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068024, -87.979491 ], "Address": "5232 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.979490832361932, 43.068024471002317 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 71, "Incident Number": 82550181, "Date": "09\/11\/2008", "Time": "08:48 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053867, -87.974740 ], "Address": "1739 N 49TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.974739573720143, 43.053867 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 72, "Incident Number": 82560009, "Date": "09\/11\/2008", "Time": "11:54 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073474, -87.976181 ], "Address": "5000 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 73, "Incident Number": 82540037, "Date": "09\/10\/2008", "Time": "08:59 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.032055, -87.989063 ], "Address": "6107 W STEVENSON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 1, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.9890625, 43.032054532315883 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 74, "Incident Number": 82530035, "Date": "09\/09\/2008", "Time": "07:57 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.051643, -87.981178 ], "Address": "5400 W GALENA ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.981178198737496, 43.051643106365084 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 75, "Incident Number": 82530080, "Date": "09\/09\/2008", "Time": "12:59 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068035, -87.989364 ], "Address": "6131 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.989364, 43.068035495672184 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 76, "Incident Number": 82530128, "Date": "09\/09\/2008", "Time": "05:43 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.058934, -87.977568 ], "Address": "2183 N 51ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.977568124790579, 43.05893383236193 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 77, "Incident Number": 82530184, "Date": "09\/09\/2008", "Time": "10:01 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045842, -87.967226 ], "Address": "4202 W MARTIN DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 1, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967226089791637, 43.045841605920451 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 78, "Incident Number": 82540008, "Date": "09\/09\/2008", "Time": "05:30 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043580, -87.971048 ], "Address": "1059 N 46TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 1, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.971048121472364, 43.043579612268445 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 79, "Incident Number": 82510060, "Date": "09\/07\/2008", "Time": "09:28 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068084, -87.981063 ], "Address": "5400 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.981063218823408, 43.068084218823408 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 80, "Incident Number": 82460121, "Date": "09\/02\/2008", "Time": "04:00 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.057047, -87.982065 ], "Address": "5505 W LLOYD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.982065371931441, 43.057046795008006 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 81, "Incident Number": 82450093, "Date": "09\/01\/2008", "Time": "12:42 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.035627, -87.957782 ], "Address": "461 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95778219876378, 43.035626775758082 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 82, "Incident Number": 82720188, "Date": "09\/28\/2008", "Time": "09:34 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.977293, -87.948591 ], "Address": "3701 S 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948590751666572, 42.977293424608902 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 83, "Incident Number": 82710043, "Date": "09\/27\/2008", "Time": "04:15 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.980939, -88.018600 ], "Address": "8429 W MORGAN AV #8", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.018600332361927, 42.980938513994033 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 84, "Incident Number": 82690001, "Date": "09\/24\/2008", "Time": "10:48 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.976933, -88.014051 ], "Address": "3742 S 81ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.014050941002424, 42.97693270815023 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 85, "Incident Number": 82660093, "Date": "09\/22\/2008", "Time": "12:11 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.978851, -87.950580 ], "Address": "2820 W LOOMIS RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.950580494665331, 42.978851130213151 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 86, "Incident Number": 82630181, "Date": "09\/19\/2008", "Time": "06:45 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.973746, -88.020942 ], "Address": "8616 W HOWARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.020941558283809, 42.973745529863059 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 87, "Incident Number": 82630191, "Date": "09\/19\/2008", "Time": "07:29 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.989499, -87.984068 ], "Address": "3031 S 56TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.98406753101689, 42.989498779906512 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 88, "Incident Number": 82620088, "Date": "09\/18\/2008", "Time": "01:29 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.986062, -87.948133 ], "Address": "3232 S 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948133451815082, 42.986062477378965 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 89, "Incident Number": 82610076, "Date": "09\/17\/2008", "Time": "10:13 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.973827, -87.994121 ], "Address": "6441 W HOWARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.99412113918865, 42.97382650288553 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 90, "Incident Number": 82580042, "Date": "09\/14\/2008", "Time": "07:23 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.982867, -87.942257 ], "Address": "3415 S 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.942257318891947, 42.982866531284259 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 91, "Incident Number": 82570016, "Date": "09\/13\/2008", "Time": "01:11 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.993199, -87.997640 ], "Address": "2823 S 68TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.997639533758189, 42.993199005828387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 92, "Incident Number": 82570080, "Date": "09\/13\/2008", "Time": "10:05 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.975092, -87.953292 ], "Address": "3854 S MINER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.953291702228668, 42.975091517800529 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 93, "Incident Number": 82530018, "Date": "09\/09\/2008", "Time": "06:37 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.974628, -87.953322 ], "Address": "3873 S MINER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.953322348739903, 42.974627612970863 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 94, "Incident Number": 82530081, "Date": "09\/09\/2008", "Time": "12:17 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092471, -87.979875 ], "Address": "4160 N 54TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979874794641461, 43.092470526792681 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 95, "Incident Number": 82510004, "Date": "09\/07\/2008", "Time": "12:16 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.988517, -87.988482 ], "Address": "6030 W OKLAHOMA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.988482, 42.988516519331469 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 96, "Incident Number": 82500195, "Date": "09\/06\/2008", "Time": "09:46 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.987353, -87.989928 ], "Address": "3150 S 63RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.989928238167636, 42.987353067820571 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 97, "Incident Number": 82450049, "Date": "09\/01\/2008", "Time": "08:09 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003025, -87.956343 ], "Address": "3327 W LINCOLN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.956342832361941, 43.003025488458803 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 98, "Incident Number": 82740154, "Date": "09\/30\/2008", "Time": "03:59 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.023327, -87.922581 ], "Address": "900 W NATIONAL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92258116197992, 43.023327161979928 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 99, "Incident Number": 82750083, "Date": "09\/30\/2008", "Time": "02:30 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.023807, -87.926684 ], "Address": "726 S 12TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926683965664878, 43.023807220093488 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 100, "Incident Number": 82730135, "Date": "09\/29\/2008", "Time": "04:49 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.006542, -87.921486 ], "Address": "800 W BECHER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921486, 43.006542140695856 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 101, "Incident Number": 82710038, "Date": "09\/27\/2008", "Time": "03:36 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.022304, -87.914079 ], "Address": "839 S 3RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.914079055398275, 43.022304115182635 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 102, "Incident Number": 82690036, "Date": "09\/25\/2008", "Time": "05:54 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.999065, -87.927246 ], "Address": "2500 S 12TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927246462923577, 42.99906507799065 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 103, "Incident Number": 82690037, "Date": "09\/25\/2008", "Time": "06:22 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020039, -87.926920 ], "Address": "1209 W WASHINGTON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92691961493577, 43.020038841992957 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 104, "Incident Number": 82690077, "Date": "09\/25\/2008", "Time": "10:55 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.021970, -87.933078 ], "Address": "903 S CESAR E CHAVEZ DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93307807703836, 43.021970444630398 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 105, "Incident Number": 82690156, "Date": "09\/25\/2008", "Time": "05:06 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011139, -87.916811 ], "Address": "1795 S 5TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.916810843062194, 43.011138526677762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 106, "Incident Number": 82670062, "Date": "09\/23\/2008", "Time": "10:25 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.012315, -87.921532 ], "Address": "802 W HISTORIC MITCHELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921531806826707, 43.012314511541206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 107, "Incident Number": 82650091, "Date": "09\/21\/2008", "Time": "09:41 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.026388, -87.914111 ], "Address": "300 W VIRGINIA ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 6, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.914111148670855, 43.026388159059664 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 108, "Incident Number": 82650144, "Date": "09\/21\/2008", "Time": "03:13 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.024210, -87.918922 ], "Address": "618 W PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918921974464766, 43.024210478792604 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 109, "Incident Number": 82640098, "Date": "09\/20\/2008", "Time": "10:26 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.016027, -87.919833 ], "Address": "700 W ORCHARD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919832639466776, 43.016027142256249 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 110, "Incident Number": 82630013, "Date": "09\/19\/2008", "Time": "01:43 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.012267, -87.923772 ], "Address": "939 W HISTORIC MITCHELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923772, 43.012266520630476 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 111, "Incident Number": 82630186, "Date": "09\/19\/2008", "Time": "07:27 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020928, -87.923989 ], "Address": "1003 S 10TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923988533181273, 43.020927670552254 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 112, "Incident Number": 82630225, "Date": "09\/19\/2008", "Time": "11:58 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017064, -87.929473 ], "Address": "1400 W GREENFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929473332361937, 43.017063525967913 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 113, "Incident Number": 82640001, "Date": "09\/19\/2008", "Time": "11:03 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010087, -87.927107 ], "Address": "1205 W BURNHAM ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927107058852968, 43.010086854068575 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 114, "Incident Number": 82620019, "Date": "09\/18\/2008", "Time": "12:01 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018069, -87.930054 ], "Address": "1422 W MADISON ST #A", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930054167638062, 43.018069471579238 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 115, "Incident Number": 82610070, "Date": "09\/17\/2008", "Time": "10:20 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011046, -87.918273 ], "Address": "552 W MAPLE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918273251457094, 43.011046486005966 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 116, "Incident Number": 82600126, "Date": "09\/16\/2008", "Time": "06:15 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.005263, -87.931170 ], "Address": "2169 S 15TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931169838552265, 43.005262887989502 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 117, "Incident Number": 82590074, "Date": "09\/15\/2008", "Time": "10:01 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020091, -87.927984 ], "Address": "1239 W WASHINGTON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927984, 43.020090546742608 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 118, "Incident Number": 82590231, "Date": "09\/15\/2008", "Time": "10:00 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017597, -87.931889 ], "Address": "1319 S 15TH PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931889080933502, 43.017597 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 119, "Incident Number": 82580114, "Date": "09\/14\/2008", "Time": "05:21 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.014447, -87.930760 ], "Address": "1569 S 15TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93076001543632, 43.014447366639729 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 120, "Incident Number": 82580158, "Date": "09\/14\/2008", "Time": "05:54 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.023274, -87.918511 ], "Address": "600 W NATIONAL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9185115, 43.023273525967923 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 121, "Incident Number": 82560031, "Date": "09\/12\/2008", "Time": "02:49 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.005199, -87.927502 ], "Address": "1219 W WINDLAKE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927502192596364, 43.005198657770315 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 122, "Incident Number": 82560056, "Date": "09\/12\/2008", "Time": "07:27 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018968, -87.919690 ], "Address": "1204 S 7TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919689650142175, 43.018967956576816 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 123, "Incident Number": 82550159, "Date": "09\/11\/2008", "Time": "07:49 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.025342, -87.917643 ], "Address": "522 W BRUCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917642664723871, 43.025342467684098 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 124, "Incident Number": 82540059, "Date": "09\/10\/2008", "Time": "08:13 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.013194, -87.918443 ], "Address": "1650 S 6TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918443112269202, 43.013194158564993 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 125, "Incident Number": 82540177, "Date": "09\/10\/2008", "Time": "05:33 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.014036, -87.920593 ], "Address": "725 W LAPHAM BL #19", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92059348458389, 43.014035849605904 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 126, "Incident Number": 82530098, "Date": "09\/09\/2008", "Time": "12:33 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010465, -87.909590 ], "Address": "1825 S KINNICKINNIC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.909590029459011, 43.010464683594002 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 127, "Incident Number": 82520130, "Date": "09\/08\/2008", "Time": "01:56 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003566, -87.931134 ], "Address": "2248 S 15TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931134484563671, 43.003565717179299 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 128, "Incident Number": 82510063, "Date": "09\/07\/2008", "Time": "09:10 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.016051, -87.924564 ], "Address": "1016 W ORCHARD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.924564, 43.016050507646064 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 129, "Incident Number": 82500036, "Date": "09\/06\/2008", "Time": "02:20 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018009, -87.926832 ], "Address": "1301 S 12TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926832308368873, 43.018009132049563 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 130, "Incident Number": 82490016, "Date": "09\/05\/2008", "Time": "01:06 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011820, -87.912533 ], "Address": "1714 S 2ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.912532936811445, 43.011819586733225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 131, "Incident Number": 82490023, "Date": "09\/05\/2008", "Time": "06:53 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.014029, -87.912920 ], "Address": "221 W LAPHAM BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.912919948212078, 43.014028993765891 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 132, "Incident Number": 82490129, "Date": "09\/05\/2008", "Time": "04:50 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002908, -87.918994 ], "Address": "600 W LINCOLN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918994393559927, 43.002907500432698 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 133, "Incident Number": 82480079, "Date": "09\/04\/2008", "Time": "02:00 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.999211, -87.929721 ], "Address": "1336 W ARTHUR AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929720832361937, 42.999210511541207 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 134, "Incident Number": 82480083, "Date": "09\/04\/2008", "Time": "01:54 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009471, -87.922828 ], "Address": "1931 S 9TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.922828029863041, 43.009471341104501 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 135, "Incident Number": 82480131, "Date": "09\/04\/2008", "Time": "03:50 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011062, -87.916883 ], "Address": "504 W MAPLE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.916882751457095, 43.011062474897464 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 136, "Incident Number": 82470034, "Date": "09\/03\/2008", "Time": "06:53 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011055, -87.917373 ], "Address": "516 W MAPLE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917373251457093, 43.011054511541204 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 137, "Incident Number": 82470186, "Date": "09\/03\/2008", "Time": "10:39 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009587, -87.921336 ], "Address": "1922 S 8TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921336407957995, 43.009587136274462 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 138, "Incident Number": 82460031, "Date": "09\/02\/2008", "Time": "06:47 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.016986, -87.926134 ], "Address": "1123 W GREENFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926133525535221, 43.016985546742632 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 139, "Incident Number": 82460179, "Date": "09\/02\/2008", "Time": "08:20 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009488, -87.920008 ], "Address": "1927 S 7TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920007566506769, 43.009488335276131 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 140, "Incident Number": 82450056, "Date": "09\/01\/2008", "Time": "09:38 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.996501, -87.932504 ], "Address": "2652 S 15TH PL #A", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.932504411853131, 42.996501136274446 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 141, "Incident Number": 82740043, "Date": "09\/30\/2008", "Time": "05:09 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.960351, -87.943830 ], "Address": "4569 S 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.943829740925821, 42.960351236777647 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 142, "Incident Number": 82740096, "Date": "09\/30\/2008", "Time": "12:23 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002926, -87.935171 ], "Address": "1719 W LINCOLN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.935171422009347, 43.002925513994029 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 143, "Incident Number": 82730120, "Date": "09\/29\/2008", "Time": "03:42 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.960645, -87.943828 ], "Address": "4527 S 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.943827903039619, 42.960644653413631 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 144, "Incident Number": 82730123, "Date": "09\/29\/2008", "Time": "01:39 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.930484, -87.942770 ], "Address": "2210 W COLLEGE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.942769819180043, 42.930484270096592 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 145, "Incident Number": 82690063, "Date": "09\/25\/2008", "Time": "08:45 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.959109, -87.918471 ], "Address": "545 W LAYTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.918471, 42.959109475619563 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 146, "Incident Number": 82680077, "Date": "09\/24\/2008", "Time": "11:42 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003015, -87.936263 ], "Address": "1822 W LINCOLN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936263413266772, 43.003014525967913 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 147, "Incident Number": 82670178, "Date": "09\/23\/2008", "Time": "06:42 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.959440, -87.944053 ], "Address": "2300 W LAYTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.944053332361932, 42.959439511541206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 148, "Incident Number": 82650097, "Date": "09\/21\/2008", "Time": "11:51 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.960206, -87.943736 ], "Address": "4630 S 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.943736476773381, 42.960206231750249 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 149, "Incident Number": 82640096, "Date": "09\/20\/2008", "Time": "09:07 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.925402, -87.936696 ], "Address": "6600 S 17TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.936696028420755, 42.925401869553923 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 150, "Incident Number": 82620007, "Date": "09\/17\/2008", "Time": "10:38 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.975144, -87.930253 ], "Address": "3818 S 14TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.930253437388359, 42.975143580904842 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 151, "Incident Number": 82570111, "Date": "09\/13\/2008", "Time": "12:08 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.947678, -87.946020 ], "Address": "2425 W CLAYTON CREST AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.946020167638068, 42.947678474032088 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 152, "Incident Number": 82560010, "Date": "09\/12\/2008", "Time": "12:31 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.974667, -87.938845 ], "Address": "3844 S 20TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.938844933493215, 42.974667136274462 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 153, "Incident Number": 82560016, "Date": "09\/12\/2008", "Time": "01:48 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002109, -87.934530 ], "Address": "2335 S 17TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934530497114466, 43.002109257285468 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 154, "Incident Number": 82560021, "Date": "09\/12\/2008", "Time": "02:03 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.980970, -87.942188 ], "Address": "3510 S 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.942188307836801, 42.980969730245079 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 155, "Incident Number": 82560102, "Date": "09\/12\/2008", "Time": "10:43 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.981857, -87.936134 ], "Address": "3446 S 18TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.936133962923577, 42.981857245628731 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 156, "Incident Number": 82550027, "Date": "09\/11\/2008", "Time": "06:12 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.001118, -87.933420 ], "Address": "2403 S 16TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.933420033758196, 43.001117612268445 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 157, "Incident Number": 82540150, "Date": "09\/10\/2008", "Time": "02:44 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.967905, -87.919429 ], "Address": "4221 S 6TH ST #E18", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.919429039527387, 42.967904930607702 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 158, "Incident Number": 82520172, "Date": "09\/08\/2008", "Time": "05:46 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003043, -87.935598 ], "Address": "1800 W LINCOLN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.935598006443271, 43.003042705318954 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 159, "Incident Number": 82520001, "Date": "09\/07\/2008", "Time": "10:23 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.004666, -87.934131 ], "Address": "1631 W GRANT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93413083236193, 43.004666474032078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 160, "Incident Number": 82490020, "Date": "09\/05\/2008", "Time": "06:44 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.988336, -87.932349 ], "Address": "1526 W OKLAHOMA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93234947155058, 42.988335504327829 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 161, "Incident Number": 82460146, "Date": "09\/02\/2008", "Time": "05:28 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.960725, -87.929248 ], "Address": "4615 S 13TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.929248015436329, 42.960725360811352 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 162, "Incident Number": 82700156, "Date": "09\/26\/2008", "Time": "03:51 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.995644, -87.900903 ], "Address": "620 E RUSSELL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.900902832361936, 42.995643525967907 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 163, "Incident Number": 82670034, "Date": "09\/23\/2008", "Time": "08:01 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.987595, -87.926288 ], "Address": "3136 S 11TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926288165361711, 42.987595184690321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 164, "Incident Number": 82670174, "Date": "09\/23\/2008", "Time": "03:55 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.992573, -87.883516 ], "Address": "2855 S WENTWORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.883516125050377, 42.992572653326917 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 165, "Incident Number": 82660090, "Date": "09\/22\/2008", "Time": "12:19 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.991336, -87.926201 ], "Address": "2930 S 11TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926201129670147, 42.99133584585681 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 166, "Incident Number": 82650187, "Date": "09\/21\/2008", "Time": "08:55 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.001714, -87.917941 ], "Address": "551 W HAYES AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917940887703423, 43.001714131192216 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 167, "Incident Number": 82640086, "Date": "09\/20\/2008", "Time": "07:51 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.997530, -87.919276 ], "Address": "631 W HARRISON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919276213469303, 42.997529870526542 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 168, "Incident Number": 82620200, "Date": "09\/18\/2008", "Time": "09:40 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.986993, -87.925095 ], "Address": "3172 S 10TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925095054753854, 42.986993351680397 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 169, "Incident Number": 82610209, "Date": "09\/17\/2008", "Time": "10:13 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.992866, -87.926261 ], "Address": "2835 S 11TH ST #LWR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926261073720141, 42.992865586733217 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 170, "Incident Number": 82600152, "Date": "09\/16\/2008", "Time": "07:44 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.000596, -87.908003 ], "Address": "2416 S BURRELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.908002970136948, 43.000595612268455 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 171, "Incident Number": 82610065, "Date": "09\/16\/2008", "Time": "10:12 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.979482, -87.900534 ], "Address": "3566 S TAYLOR AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.900534462923588, 42.97948213627447 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 172, "Incident Number": 82580026, "Date": "09\/14\/2008", "Time": "03:10 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": "SIMPLE ASSAULT", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.974649, -87.891259 ], "Address": "1509 E TRIPOLI AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.891258953257378, 42.974648644728575 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 173, "Incident Number": 82580072, "Date": "09\/14\/2008", "Time": "11:48 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.998498, -87.920002 ], "Address": "2530 S 7TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920002437388362, 42.998498329447756 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 174, "Incident Number": 82580107, "Date": "09\/14\/2008", "Time": "04:36 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.996098, -87.896936 ], "Address": "2690 S KINNICKINNIC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.896936074932228, 42.996097528737891 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 175, "Incident Number": 82570121, "Date": "09\/13\/2008", "Time": "01:43 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.990346, -87.919091 ], "Address": "2973 S 6TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919091080933498, 42.990345586733213 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 176, "Incident Number": 82540184, "Date": "09\/10\/2008", "Time": "06:22 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002073, -87.906979 ], "Address": "2345 S AUSTIN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.906979394575657, 43.002073081271455 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 177, "Incident Number": 82500035, "Date": "09\/06\/2008", "Time": "02:59 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.994386, -87.931313 ], "Address": "2754 S 15TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931312886317912, 42.994385832361928 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 178, "Incident Number": 82500038, "Date": "09\/06\/2008", "Time": "04:56 AM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.996025, -87.921329 ], "Address": "2675 S 8TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921329073720145, 42.996025257285481 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 179, "Incident Number": 82490006, "Date": "09\/04\/2008", "Time": "11:51 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002289, -87.906873 ], "Address": "2318 S AUSTIN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.906872997836544, 43.002288524006026 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 180, "Incident Number": 82450124, "Date": "09\/01\/2008", "Time": "03:29 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.985558, -87.904071 ], "Address": "3241 S GRIFFIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.904071055398276, 42.985557754371285 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 181, "Incident Number": 82740033, "Date": "09\/30\/2008", "Time": "02:31 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068475, -87.963380 ], "Address": "2723 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.963380080933504, 43.068474586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 182, "Incident Number": 82740058, "Date": "09\/30\/2008", "Time": "07:23 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067475, -87.949881 ], "Address": "2665 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.949880599255351, 43.067475335276129 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 183, "Incident Number": 82740163, "Date": "09\/30\/2008", "Time": "04:31 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060543, -87.945804 ], "Address": "2521 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945804419095154, 43.060542539529244 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 184, "Incident Number": 82750021, "Date": "09\/30\/2008", "Time": "11:31 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054615, -87.946273 ], "Address": "1856 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94627341574828, 43.054615424923554 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 185, "Incident Number": 82740006, "Date": "09\/29\/2008", "Time": "10:47 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062517, -87.925488 ], "Address": "2417 N 11TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.92548761368208, 43.062516586733238 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 186, "Incident Number": 82720083, "Date": "09\/28\/2008", "Time": "09:03 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.051626, -87.936513 ], "Address": "1614 N 19TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.936512875209417, 43.051626303912514 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 187, "Incident Number": 82710056, "Date": "09\/27\/2008", "Time": "05:54 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059925, -87.949869 ], "Address": "2231 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949869069824999, 43.059924670552249 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 188, "Incident Number": 82710126, "Date": "09\/27\/2008", "Time": "01:49 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060529, -87.938330 ], "Address": "2030 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93833013918865, 43.060529460470754 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 189, "Incident Number": 82710130, "Date": "09\/27\/2008", "Time": "04:26 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062885, -87.940071 ], "Address": "2423 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94007059925535, 43.06288469608748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 190, "Incident Number": 82700031, "Date": "09\/26\/2008", "Time": "02:55 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061445, -87.969983 ], "Address": "2340 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969983440706571, 43.061445136274472 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 191, "Incident Number": 82700150, "Date": "09\/26\/2008", "Time": "01:08 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068788, -87.923935 ], "Address": "2750 N 10TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.923934919066497, 43.068788298084144 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 192, "Incident Number": 82680012, "Date": "09\/24\/2008", "Time": "12:44 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061818, -87.975341 ], "Address": "4906 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.975340785446434, 43.061817729124535 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 193, "Incident Number": 82680179, "Date": "09\/24\/2008", "Time": "05:46 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.049850, -87.927912 ], "Address": "1221 W CHERRY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.927911817538245, 43.04984960039728 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 194, "Incident Number": 82680181, "Date": "09\/24\/2008", "Time": "06:06 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045963, -87.959670 ], "Address": "3700 W JUNEAU AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.959669577861959, 43.045962794769601 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 195, "Incident Number": 82670116, "Date": "09\/23\/2008", "Time": "02:18 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059312, -87.967443 ], "Address": "2202 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967443429598092, 43.059312 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 196, "Incident Number": 82670170, "Date": "09\/23\/2008", "Time": "04:20 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.070247, -87.939938 ], "Address": "2831 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939937653644023, 43.070247167638058 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 197, "Incident Number": 82670218, "Date": "09\/23\/2008", "Time": "07:45 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052766, -87.932873 ], "Address": "1600 W WALNUT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.932872699354135, 43.052766199354117 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 198, "Incident Number": 82660026, "Date": "09\/22\/2008", "Time": "05:24 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061922, -87.968882 ], "Address": "2359 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.968881632003942, 43.061922167638073 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 199, "Incident Number": 82660110, "Date": "09\/22\/2008", "Time": "01:01 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064313, -87.957551 ], "Address": "3500 W WRIGHT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.957550714029011, 43.064313214029021 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 200, "Incident Number": 82670010, "Date": "09\/22\/2008", "Time": "01:49 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060548, -87.955558 ], "Address": "3331 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.955558447639632, 43.060547790558545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 201, "Incident Number": 82650107, "Date": "09\/21\/2008", "Time": "12:02 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067160, -87.934943 ], "Address": "2654 N 18TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.934943411853126, 43.067159832361938 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 202, "Incident Number": 82650113, "Date": "09\/21\/2008", "Time": "01:06 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059336, -87.974750 ], "Address": "4900 W GARFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97474970770277, 43.059336207702771 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 203, "Incident Number": 82650157, "Date": "09\/21\/2008", "Time": "05:40 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066997, -87.921501 ], "Address": "2657 N 8TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.921501132003954, 43.066997276992311 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 204, "Incident Number": 82640157, "Date": "09\/20\/2008", "Time": "03:22 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059287, -87.973222 ], "Address": "4722 W GARFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.973222080904833, 43.059286507646043 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 205, "Incident Number": 82630088, "Date": "09\/19\/2008", "Time": "12:04 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.051697, -87.936505 ], "Address": "1612 N 19TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.936505430175004, 43.051697413266794 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 206, "Incident Number": 82630188, "Date": "09\/19\/2008", "Time": "07:51 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.058645, -87.949824 ], "Address": "2134 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949823937388359, 43.058645329447756 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 207, "Incident Number": 82620175, "Date": "09\/18\/2008", "Time": "03:15 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069795, -87.958639 ], "Address": "3600 W HADLEY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958639124276132, 43.06979480937958 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 208, "Incident Number": 82620177, "Date": "09\/18\/2008", "Time": "09:12 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059358, -87.965784 ], "Address": "2200 N 42ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965783944601725, 43.059358005828386 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 209, "Incident Number": 82620178, "Date": "09\/18\/2008", "Time": "08:40 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059482, -87.941349 ], "Address": "2215 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.941349136476006, 43.059482276992327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 210, "Incident Number": 82620201, "Date": "09\/18\/2008", "Time": "09:55 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067960, -87.947591 ], "Address": "2708 W CENTER ST #210", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.947590919095163, 43.067959522072762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 211, "Incident Number": 82610035, "Date": "09\/17\/2008", "Time": "02:34 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.065962, -87.936971 ], "Address": "1926 W CLARKE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936971055369611, 43.065962474897468 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 212, "Incident Number": 82610082, "Date": "09\/17\/2008", "Time": "11:41 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052710, -87.944531 ], "Address": "2467 W WALNUT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.944530667638062, 43.052709532315887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 213, "Incident Number": 82610175, "Date": "09\/17\/2008", "Time": "06:34 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060719, -87.944936 ], "Address": "2300 N 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.944936050199175, 43.060718742513309 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 214, "Incident Number": 82600145, "Date": "09\/16\/2008", "Time": "04:20 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052769, -87.936519 ], "Address": "1900 W WALNUT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.936519435853668, 43.052768792245637 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 215, "Incident Number": 82590164, "Date": "09\/15\/2008", "Time": "06:31 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064910, -87.949928 ], "Address": "2545 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.94992808540556, 43.064910115182641 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 216, "Incident Number": 82580076, "Date": "09\/14\/2008", "Time": "01:10 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060666, -87.961843 ], "Address": "3814 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96184309533156, 43.060666471579239 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 217, "Incident Number": 82580086, "Date": "09\/14\/2008", "Time": "02:02 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062495, -87.958726 ], "Address": "3600 W MEINECKE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.9587258981052, 43.062494513927923 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 218, "Incident Number": 82580089, "Date": "09\/14\/2008", "Time": "01:40 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063894, -87.958680 ], "Address": "2477 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958680150902723, 43.063894393559934 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 219, "Incident Number": 82570075, "Date": "09\/13\/2008", "Time": "09:45 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054216, -87.929832 ], "Address": "1354 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 3, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.929831994633147, 43.054215894628776 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 220, "Incident Number": 82570101, "Date": "09\/13\/2008", "Time": "12:51 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061769, -87.937630 ], "Address": "2357 N 20TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937630106468717, 43.061769 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 221, "Incident Number": 82550025, "Date": "09\/11\/2008", "Time": "05:36 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054984, -87.930318 ], "Address": "1811 N 14TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 3, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.93031770220432, 43.054983690547573 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 222, "Incident Number": 82550050, "Date": "09\/11\/2008", "Time": "07:55 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059933, -87.968915 ], "Address": "2251 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.968914762953474, 43.059932934324245 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 223, "Incident Number": 82530011, "Date": "09\/09\/2008", "Time": "12:33 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061939, -87.969976 ], "Address": "2358 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969975911853126, 43.061939161809676 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 224, "Incident Number": 82520075, "Date": "09\/08\/2008", "Time": "03:17 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061939, -87.969976 ], "Address": "2358 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969975911853126, 43.061939161809676 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 225, "Incident Number": 82520079, "Date": "09\/08\/2008", "Time": "11:06 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060542, -87.933939 ], "Address": "1700 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.933939209235561, 43.060542209235557 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 226, "Incident Number": 82520084, "Date": "09\/08\/2008", "Time": "11:22 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064039, -87.932844 ], "Address": "1603 W WRIGHT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932844, 43.0640394740321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 227, "Incident Number": 82520181, "Date": "09\/08\/2008", "Time": "05:18 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066738, -87.957468 ], "Address": "2627 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.957468139217298, 43.066737502914179 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 228, "Incident Number": 82510021, "Date": "09\/07\/2008", "Time": "12:02 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063766, -87.970028 ], "Address": "2461 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.970028073720144, 43.063766444630375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 229, "Incident Number": 82510148, "Date": "09\/07\/2008", "Time": "06:13 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043451, -87.957729 ], "Address": "3500 W STATE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.957728577903922, 43.043450524079823 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 230, "Incident Number": 82510201, "Date": "09\/07\/2008", "Time": "10:45 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053497, -87.935145 ], "Address": "1730 N 18TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.935144937388358, 43.053497329447737 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 231, "Incident Number": 82500129, "Date": "09\/06\/2008", "Time": "03:11 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060078, -87.936263 ], "Address": "2222 N 19TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936262617863335, 43.060077902405297 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 232, "Incident Number": 82490025, "Date": "09\/05\/2008", "Time": "07:08 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.070326, -87.925278 ], "Address": "2844 N 11TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.925278252395927, 43.070325751286234 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 233, "Incident Number": 82470099, "Date": "09\/03\/2008", "Time": "02:10 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066000, -87.940783 ], "Address": "2222 W CLARKE ST #LOWER", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940782974464767, 43.065999511541207 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 234, "Incident Number": 82460045, "Date": "09\/02\/2008", "Time": "07:33 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.057810, -87.945310 ], "Address": "2504 W LLOYD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945309723007682, 43.057810486005963 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 235, "Incident Number": 82460052, "Date": "09\/02\/2008", "Time": "07:18 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062913, -87.936244 ], "Address": "2426 N 19TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 5, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936243911853126, 43.062912555369621 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 236, "Incident Number": 82460074, "Date": "09\/02\/2008", "Time": "11:35 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063345, -87.949961 ], "Address": "2447 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.949961102573582, 43.063344586733223 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 237, "Incident Number": 82470004, "Date": "09\/02\/2008", "Time": "09:11 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068823, -87.928482 ], "Address": "1358 W HOPKINS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928482286542945, 43.068822673610683 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 238, "Incident Number": 82450212, "Date": "09\/01\/2008", "Time": "10:26 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055480, -87.963108 ], "Address": "3940 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.963108450574339, 43.055479507097807 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 239, "Incident Number": 82740018, "Date": "09\/30\/2008", "Time": "12:38 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124381, -88.009645 ], "Address": "5850 N 79TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.009645360782699, 43.124381413266775 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 240, "Incident Number": 82740097, "Date": "09\/30\/2008", "Time": "12:29 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.118847, -87.991120 ], "Address": "5551 N 64TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.99111954372944, 43.11884655515064 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 241, "Incident Number": 82730093, "Date": "09\/29\/2008", "Time": "01:33 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.123392, -88.006119 ], "Address": "5811 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.006118635322167, 43.123392419095154 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 242, "Incident Number": 82720121, "Date": "09\/28\/2008", "Time": "03:57 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093466, -87.985053 ], "Address": "5825 W HOPE AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.985053251457089, 43.093465513994033 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 243, "Incident Number": 82710049, "Date": "09\/27\/2008", "Time": "06:04 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124022, -87.998482 ], "Address": "5839 N 70TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.998481657539173, 43.12402216763806 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 244, "Incident Number": 82710142, "Date": "09\/27\/2008", "Time": "04:22 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.118765, -88.026018 ], "Address": "5555 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.02601763258086, 43.118765444630384 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 245, "Incident Number": 82690017, "Date": "09\/25\/2008", "Time": "12:31 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111590, -88.007443 ], "Address": "5154 N 77TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.007443496741871, 43.111589810033841 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 246, "Incident Number": 82690034, "Date": "09\/25\/2008", "Time": "05:04 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.132265, -88.013430 ], "Address": "8209 W BENDER AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.01343, 43.132265488458813 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 247, "Incident Number": 82700069, "Date": "09\/25\/2008", "Time": "12:31 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.126181, -87.998470 ], "Address": "5957 N 70TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.99847010646873, 43.12618149708581 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 248, "Incident Number": 82680093, "Date": "09\/24\/2008", "Time": "01:06 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.122113, -88.025685 ], "Address": "5730 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.025684875209421, 43.12211299417163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 249, "Incident Number": 82670025, "Date": "09\/23\/2008", "Time": "06:59 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113999, -88.013420 ], "Address": "5290 N 82ND CT", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.013420036903526, 43.113998795198611 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 250, "Incident Number": 82670036, "Date": "09\/23\/2008", "Time": "08:03 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.133983, -88.024901 ], "Address": "9025 W MILL RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.0249005, 43.133982539529249 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 251, "Incident Number": 82670194, "Date": "09\/23\/2008", "Time": "06:15 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.122903, -88.030706 ], "Address": "5772 N 95TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.030706419066505, 43.122903432973629 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 252, "Incident Number": 82670227, "Date": "09\/23\/2008", "Time": "09:49 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112840, -88.026032 ], "Address": "9100 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.026031832099591, 43.11284020845433 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 253, "Incident Number": 82660101, "Date": "09\/22\/2008", "Time": "01:18 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113265, -88.025814 ], "Address": "5230 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.025813841883902, 43.113265029430352 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 254, "Incident Number": 82660197, "Date": "09\/22\/2008", "Time": "06:43 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120899, -87.992311 ], "Address": "5663 N 65TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.99231109925536, 43.120899115182652 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 255, "Incident Number": 82650060, "Date": "09\/21\/2008", "Time": "07:01 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109325, -88.006230 ], "Address": "5031 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.006229599255349, 43.109325419095171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 256, "Incident Number": 82650203, "Date": "09\/21\/2008", "Time": "09:37 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119632, -88.001212 ], "Address": "7200 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.001212332361931, 43.119632460470747 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 257, "Incident Number": 82640063, "Date": "09\/20\/2008", "Time": "06:59 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114805, -88.026051 ], "Address": "5333 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.02605114094807, 43.114804973079792 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 258, "Incident Number": 82640092, "Date": "09\/20\/2008", "Time": "07:53 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.090040, -87.997500 ], "Address": "6800 W CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.9975, 43.090040460470739 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 259, "Incident Number": 82640209, "Date": "09\/20\/2008", "Time": "07:44 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.131447, -88.015648 ], "Address": "6235 N 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.015648161434314, 43.131447419095167 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 260, "Incident Number": 82640236, "Date": "09\/20\/2008", "Time": "10:53 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114805, -88.026051 ], "Address": "5333 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.02605114094807, 43.114804973079792 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 261, "Incident Number": 82630069, "Date": "09\/19\/2008", "Time": "11:03 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111313, -87.994795 ], "Address": "5164 N 67TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 5, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.994795360782689, 43.111313497085803 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 262, "Incident Number": 82630140, "Date": "09\/19\/2008", "Time": "04:20 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093529, -87.985419 ], "Address": "5800 W HOPE AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.985419215073165, 43.093529442292187 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 263, "Incident Number": 82630177, "Date": "09\/19\/2008", "Time": "04:38 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.117216, -88.012513 ], "Address": "8124 W MEDFORD AV #1", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.012513067257515, 43.117216186796647 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 264, "Incident Number": 82620022, "Date": "09\/18\/2008", "Time": "03:19 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119625, -87.999310 ], "Address": "7022 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.999309806826702, 43.119624518754541 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 265, "Incident Number": 82620054, "Date": "09\/18\/2008", "Time": "08:53 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089887, -87.985912 ], "Address": "5811 W CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.9859125, 43.089886521207411 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 266, "Incident Number": 82620166, "Date": "09\/18\/2008", "Time": "09:03 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121115, -87.995966 ], "Address": "5668 N 68TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.995965816925604, 43.121114748542908 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 267, "Incident Number": 82610022, "Date": "09\/17\/2008", "Time": "12:25 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096841, -88.006986 ], "Address": "4366 N 76TH ST #3", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.006986400744637, 43.096840910352597 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 268, "Incident Number": 82610023, "Date": "09\/17\/2008", "Time": "01:58 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.110243, -88.015855 ], "Address": "5072 N 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.015855360782695, 43.11024266472387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 269, "Incident Number": 82590152, "Date": "09\/15\/2008", "Time": "04:46 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092699, -88.006176 ], "Address": "7560 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 3, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.006176457239434, 43.092698844047348 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 270, "Incident Number": 82600001, "Date": "09\/15\/2008", "Time": "09:56 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093928, -87.996911 ], "Address": "4216 N 68TH ST #LWR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.996911174142497, 43.093927584201758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 271, "Incident Number": 82580007, "Date": "09\/14\/2008", "Time": "12:08 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.133899, -88.012512 ], "Address": "8121 W MILL RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.012511916180969, 43.133898532315882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 272, "Incident Number": 82580093, "Date": "09\/14\/2008", "Time": "03:11 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093572, -87.995384 ], "Address": "6625 W HOPE AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99538402553523, 43.093571543424389 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 273, "Incident Number": 82580122, "Date": "09\/14\/2008", "Time": "06:04 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114171, -88.010771 ], "Address": "8017 W SCRANTON PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.010770776040033, 43.114171129320887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 274, "Incident Number": 82580003, "Date": "09\/13\/2008", "Time": "11:57 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.098634, -88.005593 ], "Address": "4462 N 75TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.005593411853127, 43.098633754371292 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 275, "Incident Number": 82560043, "Date": "09\/12\/2008", "Time": "06:43 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.094835, -87.999383 ], "Address": "4256 N 70TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.999383328034099, 43.094834664723891 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 276, "Incident Number": 82560066, "Date": "09\/12\/2008", "Time": "07:58 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.132440, -88.005392 ], "Address": "6270 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.005391751486684, 43.132439684950327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 277, "Incident Number": 82560165, "Date": "09\/12\/2008", "Time": "02:25 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112907, -88.024440 ], "Address": "5253 N 90TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.024439580905479, 43.112906571450608 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 278, "Incident Number": 82560194, "Date": "09\/12\/2008", "Time": "07:49 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119631, -88.001271 ], "Address": "7208 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.001270832361939, 43.119630533181287 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 279, "Incident Number": 82560224, "Date": "09\/12\/2008", "Time": "10:50 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096662, -87.998172 ], "Address": "4356 N 69TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.998172393531277, 43.096661664723882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 280, "Incident Number": 82550047, "Date": "09\/11\/2008", "Time": "08:31 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.100014, -87.990881 ], "Address": "6334 W MEDFORD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.990881282243777, 43.100013896214321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 281, "Incident Number": 82550146, "Date": "09\/11\/2008", "Time": "06:59 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113549, -88.005926 ], "Address": "5250 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.00592589353127, 43.113549122396002 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 282, "Incident Number": 82530156, "Date": "09\/09\/2008", "Time": "06:48 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.123355, -88.014483 ], "Address": "5800 N 83RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.014482860782692, 43.123355413266779 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 283, "Incident Number": 82540004, "Date": "09\/09\/2008", "Time": "11:58 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.094793, -87.982741 ], "Address": "5501 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.982741418142865, 43.094793176496211 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 284, "Incident Number": 82520122, "Date": "09\/08\/2008", "Time": "09:05 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113294, -87.997285 ], "Address": "5246 N 69TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.99728483524747, 43.113294 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 285, "Incident Number": 82510038, "Date": "09\/07\/2008", "Time": "05:00 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124607, -88.007298 ], "Address": "5863 N 77TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.007298132003953, 43.124606748542902 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 286, "Incident Number": 82510076, "Date": "09\/07\/2008", "Time": "10:20 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112840, -88.026032 ], "Address": "9100 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.026031832099591, 43.11284020845433 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 287, "Incident Number": 82510105, "Date": "09\/07\/2008", "Time": "02:33 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.122086, -88.029443 ], "Address": "5736 N 94TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.029442831352327, 43.122086413266771 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 288, "Incident Number": 82510196, "Date": "09\/07\/2008", "Time": "08:47 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.098552, -87.999376 ], "Address": "4458 N 70TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.999376360782691, 43.098552167638076 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 289, "Incident Number": 82500158, "Date": "09\/06\/2008", "Time": "04:09 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092490, -87.989503 ], "Address": "4135 N 62ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.989502664110873, 43.092489932168583 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 290, "Incident Number": 82500186, "Date": "09\/06\/2008", "Time": "09:32 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120500, -88.036040 ], "Address": "9914 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.036039830710337, 43.120499831633623 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 291, "Incident Number": 82490026, "Date": "09\/05\/2008", "Time": "06:53 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112979, -87.994784 ], "Address": "5234 N 67TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.994783893531277, 43.112979 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 292, "Incident Number": 82480058, "Date": "09\/04\/2008", "Time": "09:23 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096743, -87.986908 ], "Address": "4357 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.986907573720146, 43.096743031363616 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 293, "Incident Number": 82460077, "Date": "09\/02\/2008", "Time": "11:24 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113739, -88.015723 ], "Address": "5287 N 84TH ST #1", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.015723495845066, 43.113739219025646 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 294, "Incident Number": 82450078, "Date": "09\/01\/2008", "Time": "11:44 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111433, -88.015869 ], "Address": "5141 N 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.015868949939161, 43.111432623925225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 295, "Incident Number": 82450200, "Date": "09\/01\/2008", "Time": "09:23 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.115185, -87.992322 ], "Address": "5362 N 65TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.992322393531268, 43.115185089099171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 296, "Incident Number": 82450240, "Date": "09\/01\/2008", "Time": "10:25 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.101878, -87.989652 ], "Address": "6222 W LEON TR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.989652446967654, 43.101877703041048 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 297, "Incident Number": 82730139, "Date": "09\/29\/2008", "Time": "03:40 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061652, -87.899183 ], "Address": "2364 N WEIL ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899183426279848, 43.061652303912524 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 298, "Incident Number": 82730166, "Date": "09\/29\/2008", "Time": "07:44 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.065701, -87.879326 ], "Address": "2576 N STOWELL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.879325900744647, 43.065701413266794 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 299, "Incident Number": 82720067, "Date": "09\/28\/2008", "Time": "08:40 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "MOTOR VEHICLE THEFT", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075061, -87.902695 ], "Address": "3118 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902695396849495, 43.075060994171622 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 300, "Incident Number": 82720127, "Date": "09\/28\/2008", "Time": "04:11 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069500, -87.902840 ], "Address": "2805 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902839632003946, 43.0695 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 301, "Incident Number": 82720190, "Date": "09\/28\/2008", "Time": "08:33 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071751, -87.904038 ], "Address": "2927 N BOOTH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.904038124790574, 43.071750586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 302, "Incident Number": 82720207, "Date": "09\/28\/2008", "Time": "10:38 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063307, -87.901681 ], "Address": "2459 N FRATNEY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.901680580933501, 43.063306857897174 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 303, "Incident Number": 82700102, "Date": "09\/26\/2008", "Time": "12:16 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053734, -87.899643 ], "Address": "938 E PEARSON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899642664723871, 43.053733507646051 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 304, "Incident Number": 82700171, "Date": "09\/26\/2008", "Time": "05:37 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066863, -87.900439 ], "Address": "2655 N BREMEN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.900438580933496, 43.066863419095171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 305, "Incident Number": 82700217, "Date": "09\/26\/2008", "Time": "08:00 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060932, -87.888035 ], "Address": "2332 N OAKLAND AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.888035349674183, 43.060931748542913 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 306, "Incident Number": 82700078, "Date": "09\/25\/2008", "Time": "02:04 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062516, -87.900395 ], "Address": "2418 N BREMEN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.900394900744644, 43.062515832361953 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 307, "Incident Number": 82670219, "Date": "09\/23\/2008", "Time": "08:54 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060244, -87.898007 ], "Address": "2301 N HUMBOLDT BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.898006904787337, 43.060243771699504 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 308, "Incident Number": 82660113, "Date": "09\/22\/2008", "Time": "02:05 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062875, -87.902844 ], "Address": "2438 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902843875209413, 43.062875413266795 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 309, "Incident Number": 82660172, "Date": "09\/22\/2008", "Time": "06:15 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060179, -87.888025 ], "Address": "2300 N OAKLAND AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.888024725022618, 43.060178919051793 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 310, "Incident Number": 82670004, "Date": "09\/22\/2008", "Time": "09:58 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045834, -87.907082 ], "Address": "414 E JUNEAU AV #212", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.907082141477204, 43.045834375152843 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 311, "Incident Number": 82640192, "Date": "09\/20\/2008", "Time": "03:54 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054961, -87.888816 ], "Address": "1915 N PROSPECT AV #23", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.888815594667733, 43.054960724132876 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 312, "Incident Number": 82630082, "Date": "09\/19\/2008", "Time": "11:15 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055476, -87.892393 ], "Address": "1842 N CAMBRIDGE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.892393403927485, 43.055476128318112 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 313, "Incident Number": 82630121, "Date": "09\/19\/2008", "Time": "02:49 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.065007, -87.885525 ], "Address": "2000 E WEBSTER PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.88552532234057, 43.065006745393596 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 314, "Incident Number": 82630133, "Date": "09\/19\/2008", "Time": "03:58 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072164, -87.878029 ], "Address": "2961 N DOWNER AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.878028602573593, 43.072164167638078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 315, "Incident Number": 82610194, "Date": "09\/17\/2008", "Time": "06:26 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062516, -87.900395 ], "Address": "2418 N BREMEN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.900394900744644, 43.062515832361953 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 316, "Incident Number": 82570036, "Date": "09\/13\/2008", "Time": "06:30 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052246, -87.899593 ], "Address": "1674 N ASTOR ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899593404062855, 43.052246245628709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 317, "Incident Number": 82570072, "Date": "09\/13\/2008", "Time": "08:32 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055434, -87.898110 ], "Address": "1845 N HUMBOLDT AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.898109613682081, 43.055433670552247 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 318, "Incident Number": 82570091, "Date": "09\/13\/2008", "Time": "10:18 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053036, -87.893750 ], "Address": "1400 E BRADY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.893750277030122, 43.053035669819792 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 319, "Incident Number": 82570140, "Date": "09\/13\/2008", "Time": "04:09 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067494, -87.902001 ], "Address": "724-B E CENTER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902000832361935, 43.067494486005955 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 320, "Incident Number": 82570007, "Date": "09\/12\/2008", "Time": "11:48 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.076097, -87.902666 ], "Address": "3162 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.90266642627985, 43.076096968636392 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 321, "Incident Number": 82550149, "Date": "09\/11\/2008", "Time": "07:11 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063852, -87.899593 ], "Address": "922 E WRIGHT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899593080904836, 43.063851518754554 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 322, "Incident Number": 82540043, "Date": "09\/10\/2008", "Time": "09:38 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063245, -87.902908 ], "Address": "2455 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902908106468729, 43.06324469608748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 323, "Incident Number": 82530094, "Date": "09\/09\/2008", "Time": "02:02 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.070239, -87.902766 ], "Address": "2842 N PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.902766400744639, 43.070238974464786 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 324, "Incident Number": 82510103, "Date": "09\/07\/2008", "Time": "01:29 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066381, -87.880655 ], "Address": "2621 N PROSPECT AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.880654603324629, 43.066381307941356 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 325, "Incident Number": 82510155, "Date": "09\/07\/2008", "Time": "06:42 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.046115, -87.900945 ], "Address": "1232 N MARSHALL ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.900944651981789, 43.046114569720594 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 326, "Incident Number": 82500073, "Date": "09\/06\/2008", "Time": "09:37 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071218, -87.887875 ], "Address": "2900 N OAKLAND AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.887874926279849, 43.071217994171633 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 327, "Incident Number": 82500124, "Date": "09\/06\/2008", "Time": "02:20 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.056046, -87.894453 ], "Address": "1311 E KANE PL #1", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.894452551070444, 43.05604649956733 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 328, "Incident Number": 82490151, "Date": "09\/05\/2008", "Time": "02:17 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.065314, -87.896661 ], "Address": "2571 N DOUSMAN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.896660613682073, 43.065314444630388 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 329, "Incident Number": 82480025, "Date": "09\/04\/2008", "Time": "05:48 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064851, -87.885477 ], "Address": "2005 E WEBSTER PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.88547682289429, 43.064850646106528 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 330, "Incident Number": 82480061, "Date": "09\/04\/2008", "Time": "12:08 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.051901, -87.891676 ], "Address": "1663 N PROSPECT AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.891675661145854, 43.051900975589966 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 331, "Incident Number": 82480163, "Date": "09\/04\/2008", "Time": "10:55 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074717, -87.875544 ], "Address": "2800 E KENWOOD BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.875543772741239, 43.074717227258738 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 332, "Incident Number": 82470025, "Date": "09\/03\/2008", "Time": "05:03 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067178, -87.904138 ], "Address": "2669 N BOOTH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.904137580933494, 43.067177863725533 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 333, "Incident Number": 82470036, "Date": "09\/03\/2008", "Time": "07:02 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079176, -87.897711 ], "Address": "3337 N HUMBOLDT BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.897711124790575, 43.079175838190309 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 334, "Incident Number": 82470096, "Date": "09\/03\/2008", "Time": "12:46 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067438, -87.901074 ], "Address": "815 E CENTER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.901073832361931, 43.067438488458805 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 335, "Incident Number": 82740040, "Date": "09\/30\/2008", "Time": "04:47 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043239, -87.947770 ], "Address": "2702 W STATE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947770248542909, 43.043239486005973 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 336, "Incident Number": 82740174, "Date": "09\/30\/2008", "Time": "04:18 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.040493, -87.942876 ], "Address": "808 N 24TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.942875959028441, 43.040493115182642 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 337, "Incident Number": 82730222, "Date": "09\/29\/2008", "Time": "11:17 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.040411, -87.932886 ], "Address": "806 N 16TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 6, "m_clusterK8": 2, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.932885651924181, 43.040410534339877 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 338, "Incident Number": 82720182, "Date": "09\/28\/2008", "Time": "05:56 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.039319, -87.911627 ], "Address": "730 N PLANKINTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.911626873968657, 43.039319111864408 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 339, "Incident Number": 82720205, "Date": "09\/28\/2008", "Time": "05:10 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045858, -87.946470 ], "Address": "2601 W JUNEAU AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.946469832361927, 43.04585754674261 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 340, "Incident Number": 82710062, "Date": "09\/27\/2008", "Time": "07:44 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045127, -87.898499 ], "Address": "1105 N WAVERLY PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.898498829476409, 43.045126847625376 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 341, "Incident Number": 82710139, "Date": "09\/27\/2008", "Time": "04:16 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.047629, -87.945301 ], "Address": "1313 N 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945300595360223, 43.047629497085808 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 342, "Incident Number": 82700040, "Date": "09\/26\/2008", "Time": "03:24 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050080, -87.956681 ], "Address": "3405 W CHERRY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956680919095163, 43.0500804740321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 343, "Incident Number": 82700073, "Date": "09\/26\/2008", "Time": "09:00 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.044898, -87.904608 ], "Address": "1032 N JACKSON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.904608158445441, 43.04489764791925 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 344, "Incident Number": 82700137, "Date": "09\/26\/2008", "Time": "03:37 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038825, -87.947795 ], "Address": "2700 W WISCONSIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947794681648332, 43.038825181648335 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 345, "Incident Number": 82700221, "Date": "09\/26\/2008", "Time": "09:35 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038127, -87.907665 ], "Address": "626 N BROADWAY", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.907665287091206, 43.038127016100155 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 346, "Incident Number": 82690247, "Date": "09\/25\/2008", "Time": "10:58 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.037408, -87.908042 ], "Address": "225 E MICHIGAN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 4, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.908042100611681, 43.037407521207406 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 347, "Incident Number": 82680016, "Date": "09\/24\/2008", "Time": "12:05 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.037480, -87.947051 ], "Address": "2621 W MICHIGAN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947050667638067, 43.037479521207395 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 348, "Incident Number": 82680023, "Date": "09\/23\/2008", "Time": "11:31 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045904, -87.950803 ], "Address": "2922 W JUNEAU AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.9508035, 43.045904460470759 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 349, "Incident Number": 82660050, "Date": "09\/22\/2008", "Time": "09:49 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.036207, -87.949319 ], "Address": "2800 W CLYBOURN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949318986546359, 43.036207337280594 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 350, "Incident Number": 82660080, "Date": "09\/22\/2008", "Time": "11:32 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.044640, -87.950893 ], "Address": "2900 W HIGHLAND BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.950893416180961, 43.044640457152525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 351, "Incident Number": 82660092, "Date": "09\/22\/2008", "Time": "07:31 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.036425, -87.954061 ], "Address": "509 N 32ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.954060580933501, 43.036424863725557 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 352, "Incident Number": 82660213, "Date": "09\/22\/2008", "Time": "08:07 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": "THEFT FROM MOTOR VEHICLE", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045336, -87.943899 ], "Address": "1141 N 24TH PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.943899062611635, 43.045336005828375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 353, "Incident Number": 82660233, "Date": "09\/22\/2008", "Time": "11:15 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.037521, -87.940494 ], "Address": "2134 W MICHIGAN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.940494, 43.03752147879262 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 354, "Incident Number": 82650166, "Date": "09\/21\/2008", "Time": "06:24 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033139, -87.951566 ], "Address": "222 N 30TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.951566411853136, 43.033138742714527 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 355, "Incident Number": 82650195, "Date": "09\/21\/2008", "Time": "09:44 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.046595, -87.951341 ], "Address": "1233 N 30TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.951341088146862, 43.046594748542901 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 356, "Incident Number": 82640068, "Date": "09\/20\/2008", "Time": "07:18 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.036678, -87.949206 ], "Address": "520 N 28TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949205882422774, 43.036677723007671 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 357, "Incident Number": 82640109, "Date": "09\/20\/2008", "Time": "11:38 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033121, -87.905836 ], "Address": "212 N MILWAUKEE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 1, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.905836319262875, 43.033121150989629 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 358, "Incident Number": 82640061, "Date": "09\/19\/2008", "Time": "11:40 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.048144, -87.949976 ], "Address": "1334 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949976419066502, 43.048143723007684 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 359, "Incident Number": 82620039, "Date": "09\/18\/2008", "Time": "07:48 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038605, -87.944021 ], "Address": "2435 W WISCONSIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.944021276992316, 43.03860454284748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 360, "Incident Number": 82600108, "Date": "09\/16\/2008", "Time": "04:48 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.037085, -87.937863 ], "Address": "530 N 20TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 6, "m_clusterK8": 2, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.937862651890811, 43.037085348109166 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 361, "Incident Number": 82590079, "Date": "09\/15\/2008", "Time": "10:41 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.044631, -87.912279 ], "Address": "1100 N EDISON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.912279355229913, 43.044630926865572 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 362, "Incident Number": 82580015, "Date": "09\/14\/2008", "Time": "12:57 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.041627, -87.917547 ], "Address": "510 W KILBOURN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.917546749689691, 43.041626613970834 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 363, "Incident Number": 82580095, "Date": "09\/14\/2008", "Time": "02:32 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.040208, -87.950839 ], "Address": "2905 W WELLS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.950839440866829, 43.040208268532091 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 364, "Incident Number": 82570162, "Date": "09\/13\/2008", "Time": "04:49 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.047501, -87.953577 ], "Address": "1316 N 32ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "m_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.953576651999086, 43.047500625091686 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 365, "Incident Number": 82540023, "Date": "09\/10\/2008", "Time": "07:43 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045270, -87.904762 ], "Address": "1129 N JACKSON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.904761687368321, 43.04526989259675 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 366, "Incident Number": 82540095, "Date": "09\/10\/2008", "Time": "12:40 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.051070, -87.934086 ], "Address": "1583S 17TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.934085795332422, 43.051070113435763 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 367, "Incident Number": 82520019, "Date": "09\/08\/2008", "Time": "12:47 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038825, -87.947956 ], "Address": "2714 W WISCONSIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947956201177377, 43.038825181648335 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 368, "Incident Number": 82510174, "Date": "09\/07\/2008", "Time": "08:58 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033131, -87.899688 ], "Address": "200 N HARBOR DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 4, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899688203318973, 43.033131354982004 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 369, "Incident Number": 82510184, "Date": "09\/07\/2008", "Time": "09:07 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.046702, -87.896549 ], "Address": "1260 N PROSPECT AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.896549037134662, 43.046701788736002 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 370, "Incident Number": 82500081, "Date": "09\/06\/2008", "Time": "09:32 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.040426, -87.941525 ], "Address": "806 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.941524761576503, 43.040426488779232 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 371, "Incident Number": 82500183, "Date": "09\/06\/2008", "Time": "09:23 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.041615, -87.916194 ], "Address": "400 W KILBOURN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.916194, 43.041615185190764 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 372, "Incident Number": 82500002, "Date": "09\/05\/2008", "Time": "10:52 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.039035, -87.914484 ], "Address": "710 N OLD WORLD THIRD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 1, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 4, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914483944601727, 43.039034633360274 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 373, "Incident Number": 82480122, "Date": "09\/04\/2008", "Time": "06:09 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038976, -87.947655 ], "Address": "714 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94765465190757, 43.038976060763027 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 374, "Incident Number": 82480127, "Date": "09\/04\/2008", "Time": "06:38 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045396, -87.898530 ], "Address": "1121 N WAVERLY PL #706", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.898530329476401, 43.045395873160601 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 375, "Incident Number": 82480147, "Date": "09\/04\/2008", "Time": "08:05 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043526, -87.939149 ], "Address": "1011 N 21ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.939148598678443, 43.043526335276141 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 376, "Incident Number": 82470032, "Date": "09\/03\/2008", "Time": "06:08 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.035733, -87.951495 ], "Address": "446 N 30TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.951495407957992, 43.035732502914186 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 377, "Incident Number": 82470071, "Date": "09\/03\/2008", "Time": "12:08 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.042624, -87.937796 ], "Address": "944 N 20TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.937795977350305, 43.042623988343252 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 378, "Incident Number": 82450057, "Date": "09\/01\/2008", "Time": "10:09 AM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038976, -87.947655 ], "Address": "714 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94765465190757, 43.038976060763027 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 379, "Incident Number": 82450113, "Date": "09\/01\/2008", "Time": "12:05 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043272, -87.938423 ], "Address": "2020 W STATE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.938423025535229, 43.043272478792595 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 380, "Incident Number": 82450231, "Date": "09\/01\/2008", "Time": "10:59 PM", "Police District": 3.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050463, -87.935211 ], "Address": "1817 W CHERRY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 8, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.935211, 43.050462539529256 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 381, "Incident Number": 82710184, "Date": "09\/27\/2008", "Time": "07:35 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.138062, -88.041842 ], "Address": "10425 W DAPHNE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.041841535568281, 43.138062350986665 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 382, "Incident Number": 82700065, "Date": "09\/26\/2008", "Time": "09:57 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.130808, -88.044088 ], "Address": "6227 N 106TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.044088099255362, 43.130807947544582 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 383, "Incident Number": 82690115, "Date": "09\/25\/2008", "Time": "10:53 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119568, -88.040824 ], "Address": "10300 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.040824309359607, 43.119568247971742 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 384, "Incident Number": 82670158, "Date": "09\/23\/2008", "Time": "05:14 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105072, -88.019370 ], "Address": "8522 W HAMPTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.01937, 43.105071518754563 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 385, "Incident Number": 82660120, "Date": "09\/22\/2008", "Time": "02:07 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.103222, -88.011766 ], "Address": "4700 N 80TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.011766353569328, 43.103222413266792 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 386, "Incident Number": 82650057, "Date": "09\/21\/2008", "Time": "06:24 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.126558, -88.050861 ], "Address": "11122 W FLORIST AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.050860528449419, 43.126557525967925 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 387, "Incident Number": 82640089, "Date": "09\/20\/2008", "Time": "08:50 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073747, -88.020079 ], "Address": "3017 N 86TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.020079106468728, 43.073747413266773 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 388, "Incident Number": 82650007, "Date": "09\/20\/2008", "Time": "09:07 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095429, -88.026388 ], "Address": "4311 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02638810646873, 43.095429335276123 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 389, "Incident Number": 82630024, "Date": "09\/19\/2008", "Time": "05:18 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.139848, -88.040313 ], "Address": "10313 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.040313003145073, 43.139848212199745 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 390, "Incident Number": 82630112, "Date": "09\/19\/2008", "Time": "01:51 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119566, -88.041173 ], "Address": "10330 W SILVER SPRING DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.041172868366715, 43.119565587215959 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 391, "Incident Number": 82610042, "Date": "09\/17\/2008", "Time": "06:44 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095707, -88.017372 ], "Address": "4320 N 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.017372400744634, 43.095706826533558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 392, "Incident Number": 82610048, "Date": "09\/17\/2008", "Time": "08:20 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095474, -88.027545 ], "Address": "4314 N 92ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.027544867996042, 43.095473664723869 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 393, "Incident Number": 82610206, "Date": "09\/17\/2008", "Time": "10:07 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.098629, -88.012589 ], "Address": "8023 W POTOMAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.012589131859727, 43.098628558687842 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 394, "Incident Number": 82610224, "Date": "09\/17\/2008", "Time": "10:41 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084312, -88.014650 ], "Address": "8131 W NASH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.014650223007678, 43.084311517889176 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 395, "Incident Number": 82600037, "Date": "09\/16\/2008", "Time": "09:11 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112990, -88.041449 ], "Address": "10301 W CALDWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.041448500115564, 43.112989772664498 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 396, "Incident Number": 82600074, "Date": "09\/16\/2008", "Time": "11:18 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114127, -88.055562 ], "Address": "5290 N LOVERS LANE RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.05556186344586, 43.114126653904016 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 397, "Incident Number": 82570041, "Date": "09\/13\/2008", "Time": "07:27 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096993, -88.026931 ], "Address": "9116 W CONGRESS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.026930586733215, 43.096992504327822 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 398, "Incident Number": 82570066, "Date": "09\/13\/2008", "Time": "10:12 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.136303, -88.042060 ], "Address": "10428 W JONEN ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.042060131405776, 43.136303361009858 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 399, "Incident Number": 82560045, "Date": "09\/12\/2008", "Time": "06:12 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109342, -88.045753 ], "Address": "5038 N 107TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.045752842460814, 43.109342161809678 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 400, "Incident Number": 82560175, "Date": "09\/12\/2008", "Time": "05:55 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077079, -88.008658 ], "Address": "3209 N 77TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.008658106468729, 43.077078754371286 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 401, "Incident Number": 82560222, "Date": "09\/12\/2008", "Time": "10:32 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096366, -88.016111 ], "Address": "4349 N 83RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.016110624790585, 43.096366173466436 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 402, "Incident Number": 82540174, "Date": "09\/10\/2008", "Time": "06:50 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105676, -88.017150 ], "Address": "8431 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.017150131022987, 43.10567593614762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 403, "Incident Number": 82530072, "Date": "09\/09\/2008", "Time": "12:26 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113838, -88.055565 ], "Address": "5272 N LOVERS LANE RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.055564652661161, 43.113837835824121 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 404, "Incident Number": 82520165, "Date": "09\/08\/2008", "Time": "04:34 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107480, -88.024595 ], "Address": "4928 N 90TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.024595335247469, 43.107480167638073 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 405, "Incident Number": 82510074, "Date": "09\/07\/2008", "Time": "11:17 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121232, -88.037587 ], "Address": "10023 W APPLETON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.037586750533464, 43.121232348837459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 406, "Incident Number": 82490022, "Date": "09\/05\/2008", "Time": "06:59 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106477, -88.019793 ], "Address": "8600 W POTOMAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.0197932325583, 43.106477426048734 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 407, "Incident Number": 82490094, "Date": "09\/05\/2008", "Time": "02:17 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.138955, -88.039144 ], "Address": "10205 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.039144401609775, 43.138954684327565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 408, "Incident Number": 82490142, "Date": "09\/05\/2008", "Time": "06:07 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071735, -88.007284 ], "Address": "2900 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 6, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.007284152238725, 43.071735347761262 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 409, "Incident Number": 82480020, "Date": "09\/04\/2008", "Time": "01:54 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088220, -88.035970 ], "Address": "9835 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.035970189855064, 43.088219519822417 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 410, "Incident Number": 82470021, "Date": "09\/03\/2008", "Time": "02:38 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.086303, -88.016292 ], "Address": "3801 N 83RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.016291599255354, 43.086302832361952 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 411, "Incident Number": 82470038, "Date": "09\/03\/2008", "Time": "07:13 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105663, -88.025984 ], "Address": "4826 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.025984342460816, 43.105662555369605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 412, "Incident Number": 82470043, "Date": "09\/03\/2008", "Time": "07:51 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071183, -88.017385 ], "Address": "2868 N 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 0, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.017384926279846, 43.071183419095149 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 413, "Incident Number": 82460054, "Date": "09\/02\/2008", "Time": "09:52 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072029, -88.007305 ], "Address": "2914 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 6, "m_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.007305382422771, 43.072029040538879 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 414, "Incident Number": 82450086, "Date": "09\/01\/2008", "Time": "12:13 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093476, -88.026412 ], "Address": "4203 N 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.026411580933498, 43.093476419095168 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 415, "Incident Number": 82740031, "Date": "09\/30\/2008", "Time": "12:37 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079651, -87.903824 ], "Address": "3358 N BOOTH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.903823900744641, 43.079650826533566 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 416, "Incident Number": 82740155, "Date": "09\/30\/2008", "Time": "03:40 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089169, -87.906000 ], "Address": "401 E CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906000069392306, 43.089168518899719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 417, "Incident Number": 82740158, "Date": "09\/30\/2008", "Time": "02:39 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.076861, -87.908722 ], "Address": "3218 N PALMER ST #LWR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.908722430175004, 43.07686124562872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 418, "Incident Number": 82730059, "Date": "09\/29\/2008", "Time": "09:32 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.085744, -87.900597 ], "Address": "735 E VIENNA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.900596788490546, 43.085744188059948 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 419, "Incident Number": 82730165, "Date": "09\/29\/2008", "Time": "07:27 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071409, -87.930401 ], "Address": "2900 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930401475482029, 43.071408581387558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 420, "Incident Number": 82720099, "Date": "09\/28\/2008", "Time": "01:54 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077076, -87.932467 ], "Address": "3210 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 6, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932467087252817, 43.077076354982978 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 421, "Incident Number": 82710052, "Date": "09\/27\/2008", "Time": "04:56 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066540, -87.915473 ], "Address": "2634 N 4TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.915473426279846, 43.066539723007679 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 422, "Incident Number": 82700043, "Date": "09\/26\/2008", "Time": "07:45 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087008, -87.916061 ], "Address": "501 W ABERT PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916061304209919, 43.087008325599534 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 423, "Incident Number": 82700072, "Date": "09\/26\/2008", "Time": "10:23 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062525, -87.914034 ], "Address": "2400 N MARTIN L KING JR DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.91403440074464, 43.062524664723867 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 424, "Incident Number": 82690057, "Date": "09\/25\/2008", "Time": "09:29 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063887, -87.919501 ], "Address": "629 W WRIGHT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.919501332361932, 43.063886536211037 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 425, "Incident Number": 82690107, "Date": "09\/25\/2008", "Time": "10:53 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.081793, -87.929789 ], "Address": "1500 W KEEFE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929788508229407, 43.081792896047695 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 426, "Incident Number": 82690130, "Date": "09\/25\/2008", "Time": "10:04 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079498, -87.929756 ], "Address": "3318 N 15TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 6, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92975588631792, 43.079497658895491 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 427, "Incident Number": 82690134, "Date": "09\/25\/2008", "Time": "03:30 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084825, -87.937199 ], "Address": "3711 N 20TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937199080933496, 43.084825051070446 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 428, "Incident Number": 82680075, "Date": "09\/24\/2008", "Time": "11:09 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077707, -87.941218 ], "Address": "3235 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941217602573587, 43.077706994171621 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 429, "Incident Number": 82680162, "Date": "09\/24\/2008", "Time": "06:11 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089169, -87.906000 ], "Address": "401 E CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906000069392306, 43.089168518899719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 430, "Incident Number": 82680167, "Date": "09\/24\/2008", "Time": "06:47 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059130, -87.917481 ], "Address": "502 W GARFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.917480832361932, 43.059129525967919 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 431, "Incident Number": 82670139, "Date": "09\/23\/2008", "Time": "04:14 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062822, -87.918422 ], "Address": "2428 N 6TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.918422397426411, 43.062821884817367 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 432, "Incident Number": 82670206, "Date": "09\/23\/2008", "Time": "07:18 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053774, -87.913305 ], "Address": "233 W VINE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.913304694277585, 43.053773908179572 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 433, "Incident Number": 82660143, "Date": "09\/22\/2008", "Time": "03:16 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083810, -87.917359 ], "Address": "3635 N PORT WASHINGTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.91735909925535, 43.083810031363612 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 434, "Incident Number": 82660212, "Date": "09\/22\/2008", "Time": "08:02 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053077, -87.911215 ], "Address": "1740 N 1ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.91121516276641, 43.053077394853432 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 435, "Incident Number": 82670012, "Date": "09\/22\/2008", "Time": "08:22 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.056408, -87.914631 ], "Address": "327 W BROWN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.914630912166118, 43.056407795820022 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 436, "Incident Number": 82650044, "Date": "09\/21\/2008", "Time": "02:32 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087329, -87.935633 ], "Address": "3860 N 19TH PL", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.935633404639773, 43.087329387731558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 437, "Incident Number": 82650123, "Date": "09\/21\/2008", "Time": "02:18 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063955, -87.912657 ], "Address": "200 W WRIGHT ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.912656751547729, 43.063955088103576 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 438, "Incident Number": 82650128, "Date": "09\/21\/2008", "Time": "02:57 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068487, -87.907694 ], "Address": "2754 N RICHARDS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.907694344468439, 43.06848740801081 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 439, "Incident Number": 82640195, "Date": "09\/20\/2008", "Time": "06:24 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089169, -87.906000 ], "Address": "401 E CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906000069392306, 43.089168518899719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 440, "Incident Number": 82630015, "Date": "09\/19\/2008", "Time": "01:30 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074802, -87.924730 ], "Address": "1019 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.924729967906572, 43.074801628156798 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 441, "Incident Number": 82630049, "Date": "09\/19\/2008", "Time": "08:52 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.049914, -87.915898 ], "Address": "400 W CHERRY ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.91589773145779, 43.049914138407367 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 442, "Incident Number": 82620034, "Date": "09\/18\/2008", "Time": "08:05 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066305, -87.909581 ], "Address": "2631 N PALMER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.909580632003951, 43.066305 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 443, "Incident Number": 82620199, "Date": "09\/18\/2008", "Time": "10:12 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.085457, -87.939612 ], "Address": "3739 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939611599255358, 43.085456779906508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 444, "Incident Number": 82610041, "Date": "09\/17\/2008", "Time": "06:11 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.085007, -87.897456 ], "Address": "3750 N HUMBOLDT BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.897455882422776, 43.085007052455438 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 445, "Incident Number": 82600085, "Date": "09\/16\/2008", "Time": "02:12 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.082472, -87.942271 ], "Address": "2338 W KEEFE AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942271164723877, 43.082471522649698 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 446, "Incident Number": 82590068, "Date": "09\/15\/2008", "Time": "10:01 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067617, -87.914111 ], "Address": "300 W CENTER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.914111247690158, 43.067617166887437 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 447, "Incident Number": 82590131, "Date": "09\/15\/2008", "Time": "04:31 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059072, -87.906110 ], "Address": "418 E GARFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906109887731546, 43.059071522649688 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 448, "Incident Number": 82590181, "Date": "09\/15\/2008", "Time": "04:58 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 449, "Incident Number": 82590244, "Date": "09\/15\/2008", "Time": "11:20 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.063416, -87.909599 ], "Address": "2463 N PALMER ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.909599128685727, 43.063415863725538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 450, "Incident Number": 82580021, "Date": "09\/14\/2008", "Time": "01:21 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064677, -87.917068 ], "Address": "2541 N 5TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.917068168402324, 43.064677094397794 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 451, "Incident Number": 82580031, "Date": "09\/14\/2008", "Time": "02:40 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087095, -87.933300 ], "Address": "3857 N 18TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.933300153644026, 43.087095419095164 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 452, "Incident Number": 82580043, "Date": "09\/14\/2008", "Time": "06:11 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083243, -87.944849 ], "Address": "3533 N 25TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944849080933494, 43.083242696087495 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 453, "Incident Number": 82580111, "Date": "09\/14\/2008", "Time": "05:12 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087329, -87.942060 ], "Address": "3857 N 24TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942059577615282, 43.087329282820718 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 454, "Incident Number": 82570069, "Date": "09\/13\/2008", "Time": "10:26 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.078943, -87.916120 ], "Address": "3300 N MARTIN L KING JR DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916119581712891, 43.078943105747577 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 455, "Incident Number": 82570160, "Date": "09\/13\/2008", "Time": "04:10 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089169, -87.906000 ], "Address": "401 E CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906000069392306, 43.089168518899719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 456, "Incident Number": 82560080, "Date": "09\/12\/2008", "Time": "07:44 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077627, -87.928592 ], "Address": "3240 N 14TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928592419066504, 43.077627052455426 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 457, "Incident Number": 82560162, "Date": "09\/12\/2008", "Time": "04:15 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067043, -87.905361 ], "Address": "2663 N HOLTON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.905360606468719, 43.067042696087469 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 458, "Incident Number": 82550127, "Date": "09\/11\/2008", "Time": "04:40 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084647, -87.928961 ], "Address": "1415 W NASH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928961086733224, 43.084646550637764 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 459, "Incident Number": 82560017, "Date": "09\/11\/2008", "Time": "08:47 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084845, -87.939546 ], "Address": "3708 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939545853569328, 43.084845220093484 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 460, "Incident Number": 82540040, "Date": "09\/10\/2008", "Time": "08:51 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.078294, -87.940414 ], "Address": "2216 W HOPKINS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940413947853045, 43.078294035457375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 461, "Incident Number": 82540051, "Date": "09\/10\/2008", "Time": "09:47 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088489, -87.923452 ], "Address": "3941 N 10TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.923451580933502, 43.088488941716207 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 462, "Incident Number": 82550005, "Date": "09\/10\/2008", "Time": "11:56 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055210, -87.914173 ], "Address": "1900 N MARTIN L KING JR DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.914173488263799, 43.055210171266772 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 463, "Incident Number": 82530134, "Date": "09\/09\/2008", "Time": "06:07 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055211, -87.915615 ], "Address": "1900 N 4TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.915614652077451, 43.055211347922565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 464, "Incident Number": 82530173, "Date": "09\/09\/2008", "Time": "06:25 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087003, -87.929609 ], "Address": "3853 N 15TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92960909536022, 43.087003082434045 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 465, "Incident Number": 82520145, "Date": "09\/08\/2008", "Time": "03:09 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.086962, -87.929516 ], "Address": "3850 N 15TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929515620925415, 43.086961504826235 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 466, "Incident Number": 82530006, "Date": "09\/08\/2008", "Time": "10:43 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088903, -87.899583 ], "Address": "3921 N HUMBOLDT BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.899582805470388, 43.088903194818066 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 467, "Incident Number": 82510075, "Date": "09\/07\/2008", "Time": "10:45 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071938, -87.927559 ], "Address": "2927 N 13TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927559128108797, 43.071938025535218 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 468, "Incident Number": 82510193, "Date": "09\/07\/2008", "Time": "05:48 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083469, -87.897562 ], "Address": "3621 N HUMBOLDT BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.897561650325812, 43.083468754371296 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 469, "Incident Number": 82500083, "Date": "09\/06\/2008", "Time": "10:07 AM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053821, -87.912342 ], "Address": "141 W VINE ST #101", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.912342, 43.053821488458823 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 470, "Incident Number": 82500157, "Date": "09\/06\/2008", "Time": "05:23 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093529, -87.921060 ], "Address": "4155 N PORT WASHINGTON AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 1, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.921060013128638, 43.093529346153488 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 471, "Incident Number": 82490149, "Date": "09\/05\/2008", "Time": "02:20 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074415, -87.906501 ], "Address": "3067 N BUFFUM ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.906501077038357, 43.074414586733212 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 472, "Incident Number": 82470028, "Date": "09\/03\/2008", "Time": "05:08 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068970, -87.905338 ], "Address": "2767 N HOLTON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.905338106468719, 43.0689695029142 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 473, "Incident Number": 82470029, "Date": "09\/03\/2008", "Time": "05:27 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072632, -87.905299 ], "Address": "2969 N HOLTON ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.90529912089545, 43.072632335276126 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 474, "Incident Number": 82470107, "Date": "09\/03\/2008", "Time": "02:20 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080281, -87.909831 ], "Address": "130 E TOWNSEND ST #LWR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 0, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.909831387731543, 43.080280500432693 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 475, "Incident Number": 82460126, "Date": "09\/02\/2008", "Time": "02:04 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.065698, -87.919582 ], "Address": "641 W CLARKE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.919581997085814, 43.065698481245441 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 476, "Incident Number": 82460214, "Date": "09\/02\/2008", "Time": "09:59 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079679, -87.932290 ], "Address": "3327 N 17TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932290099255354, 43.079678612268452 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 477, "Incident Number": 82450074, "Date": "09\/01\/2008", "Time": "11:32 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.078969, -87.907590 ], "Address": "3323 N RICHARDS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 0, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 8, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.907590117577229, 43.078969005828384 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 478, "Incident Number": 82450091, "Date": "09\/01\/2008", "Time": "11:45 AM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.082954, -87.938372 ], "Address": "3524 N 21ST ST #LOWER", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938372411853123, 43.082953994171618 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 479, "Incident Number": 82450119, "Date": "09\/01\/2008", "Time": "02:46 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091162, -87.919544 ], "Address": "4082 N 7TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919543893531269, 43.091161910352582 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 480, "Incident Number": 82450154, "Date": "09\/01\/2008", "Time": "05:40 PM", "Police District": 1.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053862, -87.909130 ], "Address": "216 E VINE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.90912972300768, 43.053862493219334 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 481, "Incident Number": 82740047, "Date": "09\/30\/2008", "Time": "07:01 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073504, -87.959686 ], "Address": "3000 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.959686360782698, 43.073504413266789 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 482, "Incident Number": 82740192, "Date": "09\/30\/2008", "Time": "04:04 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072111, -87.946081 ], "Address": "2925 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946080650325811, 43.072110586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 483, "Incident Number": 82740232, "Date": "09\/30\/2008", "Time": "09:45 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.098696, -87.981838 ], "Address": "4467 N 55TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.981838106468729, 43.098695863725538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 484, "Incident Number": 82730154, "Date": "09\/29\/2008", "Time": "03:05 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083351, -87.967762 ], "Address": "4310 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967761858849443, 43.083350936176288 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 485, "Incident Number": 82730155, "Date": "09\/29\/2008", "Time": "06:32 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073373, -87.944733 ], "Address": "3000 N 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944733324419616, 43.073372513420942 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 486, "Incident Number": 82720029, "Date": "09\/28\/2008", "Time": "03:54 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080489, -87.958372 ], "Address": "3362 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.95837236078269, 43.080488832361937 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 487, "Incident Number": 82720056, "Date": "09\/28\/2008", "Time": "08:59 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.100983, -87.961582 ], "Address": "4609 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.96158165753917, 43.100982754371302 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 488, "Incident Number": 82720105, "Date": "09\/28\/2008", "Time": "02:33 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097489, -87.961593 ], "Address": "4414 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961593386317915, 43.097489245628708 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 489, "Incident Number": 82720162, "Date": "09\/28\/2008", "Time": "06:41 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088118, -87.957055 ], "Address": "3922 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 0, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957055152402049, 43.088117759889649 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 490, "Incident Number": 82710021, "Date": "09\/27\/2008", "Time": "01:28 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.102296, -87.975590 ], "Address": "4671 N 50TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.975590157539173, 43.102296251457091 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 491, "Incident Number": 82690068, "Date": "09\/25\/2008", "Time": "10:29 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080479, -87.959555 ], "Address": "3362 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.959554886317918, 43.080479329447741 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 492, "Incident Number": 82710157, "Date": "09\/25\/2008", "Time": "03:56 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075146, -87.971110 ], "Address": "4601 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97110978901037, 43.075146340581163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 493, "Incident Number": 82670029, "Date": "09\/23\/2008", "Time": "06:38 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083657, -87.987014 ], "Address": "3600 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.987013907958001, 43.083656580904858 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 494, "Incident Number": 82670051, "Date": "09\/23\/2008", "Time": "09:43 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104557, -87.968573 ], "Address": "4415 W HAMPTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.968573025535221, 43.104556521207407 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 495, "Incident Number": 82680004, "Date": "09\/23\/2008", "Time": "11:48 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077383, -87.965456 ], "Address": "3214 N 42ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965455879104553, 43.077382910352583 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 496, "Incident Number": 82660013, "Date": "09\/22\/2008", "Time": "01:33 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.108331, -87.982884 ], "Address": "5600 W FAIRMOUNT AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 7, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.982884125454405, 43.108331321686144 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 497, "Incident Number": 82660079, "Date": "09\/22\/2008", "Time": "11:29 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.103694, -87.965753 ], "Address": "4221 W DERBY PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.965752667638057, 43.103694470136936 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 498, "Incident Number": 82660231, "Date": "09\/22\/2008", "Time": "08:45 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083864, -87.985711 ], "Address": "3613 N 58TH BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.985711092041996, 43.083864115182649 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 499, "Incident Number": 82640137, "Date": "09\/20\/2008", "Time": "02:00 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097859, -87.976815 ], "Address": "4428 N 51ST BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 7, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.976814875209413, 43.097858884817356 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 500, "Incident Number": 82640211, "Date": "09\/20\/2008", "Time": "07:57 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095184, -87.961088 ], "Address": "3851 W MARION ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961088293146034, 43.095184330471902 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 501, "Incident Number": 82640020, "Date": "09\/19\/2008", "Time": "11:42 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.103705, -87.966081 ], "Address": "4233 W DERBY PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966081167638066, 43.103704528420749 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 502, "Incident Number": 82620117, "Date": "09\/18\/2008", "Time": "04:53 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087306, -87.964142 ], "Address": "3860 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 7, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964142375786324, 43.087305562582976 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 503, "Incident Number": 82610028, "Date": "09\/17\/2008", "Time": "02:52 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111333, -87.981282 ], "Address": "5155 N 55TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.981281599255354, 43.11133275437129 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 504, "Incident Number": 82610045, "Date": "09\/17\/2008", "Time": "06:54 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077789, -87.969848 ], "Address": "3235 N 45TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969847555398275, 43.077789282820703 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 505, "Incident Number": 82600048, "Date": "09\/16\/2008", "Time": "10:49 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.086436, -87.972042 ], "Address": "4629 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97204165947241, 43.08643613653426 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 506, "Incident Number": 82600168, "Date": "09\/16\/2008", "Time": "09:12 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077888, -87.947269 ], "Address": "3239 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947269106468724, 43.077888282820709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 507, "Incident Number": 82590052, "Date": "09\/15\/2008", "Time": "09:05 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077787, -87.962111 ], "Address": "3233 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 0, "m_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.962110562611642, 43.077787491257425 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 508, "Incident Number": 82600009, "Date": "09\/15\/2008", "Time": "08:07 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097434, -87.959284 ], "Address": "4410 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.959284017312257, 43.097434459893833 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 509, "Incident Number": 82570021, "Date": "09\/13\/2008", "Time": "01:00 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083163, -87.983371 ], "Address": "3521 N 56TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.983370595360213, 43.083162502914206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 510, "Incident Number": 82570027, "Date": "09\/13\/2008", "Time": "05:02 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071192, -87.969939 ], "Address": "2867 N 45TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969939132003944, 43.071192335276123 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 511, "Incident Number": 82570053, "Date": "09\/13\/2008", "Time": "08:32 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083261, -87.980931 ], "Address": "3525 N 54TH BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.980931117577228, 43.083260696087478 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 512, "Incident Number": 82570070, "Date": "09\/13\/2008", "Time": "10:46 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.102106, -87.959230 ], "Address": "4663 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.959229588146869, 43.102105994171609 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 513, "Incident Number": 82570181, "Date": "09\/13\/2008", "Time": "04:58 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.076208, -87.967468 ], "Address": "3143 N SHERMAN BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967467595360219, 43.076208447948602 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 514, "Incident Number": 82560046, "Date": "09\/12\/2008", "Time": "07:36 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095763, -87.966092 ], "Address": "4333 N 42ND PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966091747005834, 43.095762512183526 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 515, "Incident Number": 82550044, "Date": "09\/11\/2008", "Time": "08:04 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080521, -87.960831 ], "Address": "3373 N 38TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.960830855296891, 43.080521480718254 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 516, "Incident Number": 82550089, "Date": "09\/11\/2008", "Time": "09:00 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091733, -87.959524 ], "Address": "4101 N MONTREAL ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.959523885942545, 43.091732673033746 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 517, "Incident Number": 82540015, "Date": "09\/10\/2008", "Time": "03:13 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.102781, -87.963834 ], "Address": "4706 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.963834386317913, 43.1027814970858 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 518, "Incident Number": 82540028, "Date": "09\/10\/2008", "Time": "08:33 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.100162, -87.963863 ], "Address": "4556 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.963862879104553, 43.100162161809692 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 519, "Incident Number": 82530191, "Date": "09\/09\/2008", "Time": "10:17 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092420, -87.958339 ], "Address": "4139 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958338588146873, 43.092420359426363 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 520, "Incident Number": 82520031, "Date": "09\/08\/2008", "Time": "05:44 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.094970, -87.966002 ], "Address": "4268 N 42ND PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966002390213049, 43.094969580904831 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 521, "Incident Number": 82520053, "Date": "09\/08\/2008", "Time": "09:05 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.100595, -87.965110 ], "Address": "4577 N 42ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.965109573720142, 43.100595115182642 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 522, "Incident Number": 82520129, "Date": "09\/08\/2008", "Time": "12:16 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.081128, -87.944216 ], "Address": "2465 W HOPKINS ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944215750160495, 43.081128303125375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 523, "Incident Number": 82510041, "Date": "09\/07\/2008", "Time": "06:16 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.110451, -87.982528 ], "Address": "5107 N 56TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.982528099255362, 43.1104507543713 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 524, "Incident Number": 82490030, "Date": "09\/05\/2008", "Time": "07:57 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077546, -87.960850 ], "Address": "3227 N 38TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 0, "m_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.960850128108802, 43.077546419095171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 525, "Incident Number": 82490182, "Date": "09\/05\/2008", "Time": "09:47 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080777, -87.975874 ], "Address": "3374 N 50TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.975874353569324, 43.080776664723885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 526, "Incident Number": 82480047, "Date": "09\/04\/2008", "Time": "08:06 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087922, -87.973942 ], "Address": "4833 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.973941633937187, 43.087922110999038 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 527, "Incident Number": 82470063, "Date": "09\/03\/2008", "Time": "11:14 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.100803, -87.960401 ], "Address": "4603 N 38TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.960401102573584, 43.100802586733238 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 528, "Incident Number": 82470189, "Date": "09\/03\/2008", "Time": "10:16 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087523, -87.948801 ], "Address": "2812 W MELVINA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.948801, 43.087523467684107 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 529, "Incident Number": 82470190, "Date": "09\/03\/2008", "Time": "09:28 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.101049, -87.958041 ], "Address": "4617 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958040699167711, 43.101048569495092 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 530, "Incident Number": 82460108, "Date": "09\/02\/2008", "Time": "02:57 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.087802, -87.958723 ], "Address": "3600 W MELVINA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9587235, 43.087802489324197 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 531, "Incident Number": 82460138, "Date": "09\/02\/2008", "Time": "04:50 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104625, -87.984830 ], "Address": "5735 W HAMPTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 7, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.984830116567608, 43.104624539529247 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 532, "Incident Number": 82460209, "Date": "09\/02\/2008", "Time": "10:42 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079089, -87.944890 ], "Address": "2500 W CONCORDIA AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944890080904841, 43.079089493219335 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 533, "Incident Number": 82450110, "Date": "09\/01\/2008", "Time": "02:14 PM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107157, -87.980112 ], "Address": "4931 N 54TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 3, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.980111599255352, 43.107156670552257 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 534, "Incident Number": 82740016, "Date": "09\/30\/2008", "Time": "01:27 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.008449, -87.939801 ], "Address": "2101 W ROGERS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.939801167638066, 43.008449481245457 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 535, "Incident Number": 82730009, "Date": "09\/29\/2008", "Time": "02:07 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.021388, -87.961360 ], "Address": "3749 W NATIONAL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 3, "e_clusterK8": 6, "g_clusterK8": 2, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.9613597142651, 43.021387542847492 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 536, "Incident Number": 82730021, "Date": "09\/29\/2008", "Time": "06:51 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.019930, -87.952500 ], "Address": "1104 S 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.952499555728039, 43.01992983462133 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 537, "Incident Number": 82720068, "Date": "09\/28\/2008", "Time": "10:19 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.996807, -87.951852 ], "Address": "2637 S 30TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 2, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 6, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.951851599255349, 42.996807167638053 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 538, "Incident Number": 82720200, "Date": "09\/28\/2008", "Time": "10:33 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009991, -87.945032 ], "Address": "1912 S 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.945032390213058, 43.009991329447757 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 539, "Incident Number": 82700050, "Date": "09\/26\/2008", "Time": "07:57 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.006148, -87.949223 ], "Address": "2120 S 28TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.949222907957989, 43.006147857897162 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 540, "Incident Number": 82690093, "Date": "09\/25\/2008", "Time": "12:10 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009498, -87.952842 ], "Address": "1935 S 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.952841599255351, 43.009497754371296 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 541, "Incident Number": 82690100, "Date": "09\/25\/2008", "Time": "11:10 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.024220, -87.939460 ], "Address": "2100 W PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.939460430607681, 43.024219516590179 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 542, "Incident Number": 82690217, "Date": "09\/25\/2008", "Time": "08:49 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018865, -87.947665 ], "Address": "1210 S LAYTON BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947664870993151, 43.018865036654653 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 543, "Incident Number": 82630201, "Date": "09\/19\/2008", "Time": "07:34 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.016713, -87.963315 ], "Address": "1412 S 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.963314651681117, 43.016713390044941 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 544, "Incident Number": 82620194, "Date": "09\/18\/2008", "Time": "11:04 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010335, -87.958034 ], "Address": "3524 W BURNHAM ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.958033984203553, 43.010335116721144 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 545, "Incident Number": 82600021, "Date": "09\/16\/2008", "Time": "06:22 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.015428, -87.939416 ], "Address": "1524 S 21ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.939415893531276, 43.015427832361951 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 546, "Incident Number": 82600034, "Date": "09\/16\/2008", "Time": "08:53 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009498, -87.952842 ], "Address": "1935 S 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.952841599255351, 43.009497754371296 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 547, "Incident Number": 82600181, "Date": "09\/16\/2008", "Time": "10:40 PM", "Police District": 2.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.007042, -87.936674 ], "Address": "2066 S 19TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936674406502405, 43.007041891132268 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 548, "Incident Number": 82590135, "Date": "09\/15\/2008", "Time": "04:44 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.016959, -87.945543 ], "Address": "2513 W GREENFIELD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945542664723874, 43.016958546742615 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 549, "Incident Number": 82590149, "Date": "09\/15\/2008", "Time": "04:21 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018209, -87.950213 ], "Address": "1234 S 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.950212886317914, 43.018209167638076 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 550, "Incident Number": 82570104, "Date": "09\/13\/2008", "Time": "11:48 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.012359, -87.947785 ], "Address": "1702 S LAYTON BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.947785459028452, 43.012358968636391 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 551, "Incident Number": 82560138, "Date": "09\/12\/2008", "Time": "11:35 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.021651, -87.952620 ], "Address": "923 S 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.952619533762928, 43.021651339435188 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 552, "Incident Number": 82560216, "Date": "09\/12\/2008", "Time": "09:21 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010345, -87.941920 ], "Address": "2220 W BURNHAM ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.941920080904836, 43.010345482110836 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 553, "Incident Number": 82560223, "Date": "09\/12\/2008", "Time": "10:41 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.997175, -87.954037 ], "Address": "3135 W FOREST HOME AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 2, "m_clusterK8": 1, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 7, "g_clusterK10": 6, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.954036816665806, 42.997174722719222 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 554, "Incident Number": 82530085, "Date": "09\/09\/2008", "Time": "01:01 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009021, -87.958969 ], "Address": "1957 S 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.958969001009606, 43.009021173466436 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 555, "Incident Number": 82530142, "Date": "09\/09\/2008", "Time": "06:25 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.022664, -87.946313 ], "Address": "772 S 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.946313375786332, 43.022664 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 556, "Incident Number": 82520035, "Date": "09\/08\/2008", "Time": "06:19 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.022690, -87.939934 ], "Address": "2110 W NATIONAL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.939933626291136, 43.022690453257383 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 557, "Incident Number": 82520037, "Date": "09\/08\/2008", "Time": "06:58 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.021625, -87.957079 ], "Address": "3423 W NATIONAL AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.957078516792649, 43.021624528420759 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 558, "Incident Number": 82520157, "Date": "09\/08\/2008", "Time": "03:27 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.024220, -87.939460 ], "Address": "2100 W PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.939460430607681, 43.024219516590179 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 559, "Incident Number": 82520236, "Date": "09\/08\/2008", "Time": "10:16 PM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.023873, -87.952245 ], "Address": "3022 W PIERCE ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.952244537191987, 43.023873434935531 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 560, "Incident Number": 82510070, "Date": "09\/07\/2008", "Time": "10:31 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.014068, -87.951383 ], "Address": "2933 W LAPHAM ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.951382606440063, 43.014068466818721 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 561, "Incident Number": 82460043, "Date": "09\/02\/2008", "Time": "09:00 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020141, -87.942449 ], "Address": "2310 W VIEAU PL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.942449398015356, 43.020141157938539 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 562, "Incident Number": 82460062, "Date": "09\/02\/2008", "Time": "10:35 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.014547, -87.943671 ], "Address": "1567 S 24TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.943671033758193, 43.014546754371281 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 563, "Incident Number": 82450054, "Date": "09\/01\/2008", "Time": "09:30 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.007625, -87.945159 ], "Address": "2039 S 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.945159062611637, 43.007625167638054 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 564, "Incident Number": 82450089, "Date": "09\/01\/2008", "Time": "11:48 AM", "Police District": 6.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.024690, -87.947882 ], "Address": "645 S LAYTON BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 5, "g_clusterK9": 4, "m_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 6, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.947881540971551, 43.024689838190312 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 565, "Incident Number": 82740039, "Date": "09\/30\/2008", "Time": "04:31 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.168361, -88.027427 ], "Address": "8264 N 93RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.027427239079188, 43.168361468780617 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 566, "Incident Number": 82740041, "Date": "09\/30\/2008", "Time": "04:37 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.182323, -88.015535 ], "Address": "9050 N 85TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.015534843037756, 43.182322742714518 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 567, "Incident Number": 82740069, "Date": "09\/30\/2008", "Time": "07:15 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177664, -88.011660 ], "Address": "8205 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.011659612793451, 43.177663817041463 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 568, "Incident Number": 82740085, "Date": "09\/30\/2008", "Time": "10:34 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.162460, -88.031699 ], "Address": "7968 N GRANVILLE RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.031698953632755, 43.162459583703452 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 569, "Incident Number": 82720040, "Date": "09\/28\/2008", "Time": "01:18 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124121, -87.988244 ], "Address": "5848 N 62ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.988243879104544, 43.124120717179295 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 570, "Incident Number": 82720041, "Date": "09\/28\/2008", "Time": "04:16 AM", "Police District": 4.0, "Offense 1": "ALL OTHER LARCENY", "Offense 2": "MOTOR VEHICLE THEFT", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121526, -87.989743 ], "Address": "5737 N 63RD ST #4", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.989742897035981, 43.121525622437431 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 571, "Incident Number": 82720041, "Date": "09\/28\/2008", "Time": "04:16 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121526, -87.989743 ], "Address": "5737 N 63RD ST #4", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.989742897035981, 43.121525622437431 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 572, "Incident Number": 82720042, "Date": "09\/28\/2008", "Time": "02:54 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.183539, -88.032945 ], "Address": "9040 N 97TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.032944867996051, 43.183539366639735 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 573, "Incident Number": 82720047, "Date": "09\/28\/2008", "Time": "04:02 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.147205, -87.985464 ], "Address": "7100 N 60TH ST #309", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.985463877950721, 43.147205245628726 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 574, "Incident Number": 82720053, "Date": "09\/28\/2008", "Time": "08:40 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.184280, -88.027348 ], "Address": "9150 N 95TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.027348067141943, 43.184280048300486 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 575, "Incident Number": 82720055, "Date": "09\/28\/2008", "Time": "09:44 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.180663, -88.024271 ], "Address": "8941 N SWAN RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.024271119451285, 43.180663494315851 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 576, "Incident Number": 82720209, "Date": "09\/28\/2008", "Time": "10:50 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.178543, -88.028373 ], "Address": "8884 N 95TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.028373343037757, 43.178543077990668 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 577, "Incident Number": 82710025, "Date": "09\/27\/2008", "Time": "01:25 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.163127, -87.991074 ], "Address": "6519 W BRADLEY RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.991074167638061, 43.163127484563681 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 578, "Incident Number": 82700054, "Date": "09\/26\/2008", "Time": "08:21 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.134365, -87.995118 ], "Address": "6407 N 67TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.995117668647666, 43.134364948929552 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 579, "Incident Number": 82700219, "Date": "09\/26\/2008", "Time": "09:15 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.136803, -87.996158 ], "Address": "6722 W SHELBY ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.996157893848391, 43.136803109642727 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 580, "Incident Number": 82710018, "Date": "09\/26\/2008", "Time": "10:04 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121167, -87.988792 ], "Address": "6217 W THURSTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.988791944630378, 43.121166539529263 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 581, "Incident Number": 82690039, "Date": "09\/25\/2008", "Time": "06:20 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124012, -87.987192 ], "Address": "5850 N 61ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987192415171364, 43.124012465722217 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 582, "Incident Number": 82690048, "Date": "09\/25\/2008", "Time": "07:10 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124121, -87.988244 ], "Address": "5848 N 62ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.988243879104544, 43.124120717179295 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 583, "Incident Number": 82690079, "Date": "09\/25\/2008", "Time": "07:15 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.178867, -88.024344 ], "Address": "8871 N SWAN RD #APTK", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.024343615015042, 43.178866970755337 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 584, "Incident Number": 82690133, "Date": "09\/25\/2008", "Time": "01:44 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.139018, -88.004809 ], "Address": "6641 N 75TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.004808584449634, 43.139018317713017 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 585, "Incident Number": 82680175, "Date": "09\/24\/2008", "Time": "07:45 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.160100, -87.985001 ], "Address": "7805 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.985000621038736, 43.160099971694805 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 586, "Incident Number": 82630089, "Date": "09\/19\/2008", "Time": "11:01 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121523, -87.989628 ], "Address": "5736 N 63RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.989628217054644, 43.121523129394362 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 587, "Incident Number": 82600027, "Date": "09\/16\/2008", "Time": "07:11 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.156809, -88.006632 ], "Address": "7635 N 78TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006631570401908, 43.156808895089135 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 588, "Incident Number": 82600149, "Date": "09\/16\/2008", "Time": "04:16 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.140243, -88.004751 ], "Address": "6749 N 75TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.004751064689103, 43.140242543741508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 589, "Incident Number": 82610184, "Date": "09\/16\/2008", "Time": "04:16 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.140243, -88.004751 ], "Address": "6749 N 75TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.004751064689103, 43.140242543741508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 590, "Incident Number": 82570132, "Date": "09\/13\/2008", "Time": "03:03 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177608, -88.023010 ], "Address": "8975 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.023010248542903, 43.177607531738985 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 591, "Incident Number": 82570201, "Date": "09\/13\/2008", "Time": "10:36 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.178698, -88.024328 ], "Address": "8835 N SWAN RD #1", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.024328099832289, 43.178697577557969 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 592, "Incident Number": 82560095, "Date": "09\/12\/2008", "Time": "10:59 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.134365, -87.995118 ], "Address": "6407 N 67TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.995117668647666, 43.134364948929552 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 594, "Incident Number": 82560145, "Date": "09\/12\/2008", "Time": "04:09 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177668, -88.017711 ], "Address": "8665 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.017710806249795, 43.177668466675428 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 595, "Incident Number": 82560221, "Date": "09\/12\/2008", "Time": "10:31 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.117353, -87.981144 ], "Address": "5480 N 55TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.981144393531267, 43.117352664723882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 596, "Incident Number": 82550017, "Date": "09\/11\/2008", "Time": "01:27 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.179403, -88.030942 ], "Address": "8831 N 96TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.030942186651487, 43.179402756795476 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 597, "Incident Number": 82550041, "Date": "09\/11\/2008", "Time": "08:34 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.137674, -87.985683 ], "Address": "6600 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.985682882422765, 43.137673826533558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 598, "Incident Number": 82550132, "Date": "09\/11\/2008", "Time": "04:48 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.178446, -88.042466 ], "Address": "10501 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.042465670696487, 43.178445611662859 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 599, "Incident Number": 82550138, "Date": "09\/11\/2008", "Time": "05:08 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.184512, -88.002775 ], "Address": "9114 N 75TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.002775153371772, 43.184511865028831 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 600, "Incident Number": 82540083, "Date": "09\/10\/2008", "Time": "01:03 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.160519, -87.984981 ], "Address": "7869 N 60TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.984980672109188, 43.160519234491545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 601, "Incident Number": 82520203, "Date": "09\/08\/2008", "Time": "05:48 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.121209, -87.988580 ], "Address": "6204 W THURSTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.988579606440069, 43.121209493219318 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 602, "Incident Number": 82520233, "Date": "09\/08\/2008", "Time": "09:32 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.134096, -87.991893 ], "Address": "6438 W MILL RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.991892664723878, 43.134095522649702 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 603, "Incident Number": 82490081, "Date": "09\/05\/2008", "Time": "11:59 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.124444, -87.987173 ], "Address": "5870 N 61ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.98717344070657, 43.124444465722206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 604, "Incident Number": 82480113, "Date": "09\/04\/2008", "Time": "04:34 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177965, -88.011514 ], "Address": "8120 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.011513783195127, 43.17796549336262 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 605, "Incident Number": 82470156, "Date": "09\/03\/2008", "Time": "08:36 PM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.156990, -88.005118 ], "Address": "7643 N 76TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.005117580933501, 43.156989701915876 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 606, "Incident Number": 82480078, "Date": "09\/03\/2008", "Time": "11:17 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177608, -88.023010 ], "Address": "8975 W BROWN DEER RD", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.023010248542903, 43.177607531738985 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 607, "Incident Number": 82450052, "Date": "09\/01\/2008", "Time": "08:38 AM", "Police District": 4.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.117383, -87.987322 ], "Address": "5464 N 61ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987321845094357, 43.117382766210767 ] } }
]
}
|
/*
0xor1 http://github.com/0xor1
*/
(function () {
function app() {
var threePanel = new UIControls.ThreePanel(document.getElementById("threeViewport"))
, gameBoard = new Sudoku.GameBoard(3)
, assistant = new Sudoku.Assistant(gameBoard)
, gameBoard3D = new Sudoku.GameBoard3D(gameBoard)
, possibilityCube3D = new Sudoku.PossibilityCube3D(gameBoard, assistant, gameBoard3D, threePanel)
;
initialiseDomControls();
gameBoard.loadStartingConfiguration(Sudoku.getNewStartingConfig());
threePanel.add(gameBoard3D);
threePanel.resize();
threePanel.start();
focusCameraOnBoard();
function initialiseDomControls(){
var toggleAssistantTab = document.getElementById('toggleAssistantTab')
, newGameTab = document.getElementById('newGameTab')
, resetBoardTab = document.getElementById('resetBoardTab')
, saveStartingConfigTab = document.getElementById('saveStartingConfigTab')
, clearBoardTab = document.getElementById('clearBoardTab')
;
toggleAssistantTab.addEventListener(
'click',
function(){
if(possibilityCube3D._isHidden){
focusCameraOnCube();
possibilityCube3D.showAll();
} else {
focusCameraOnBoard();
possibilityCube3D.hideAll();
}
},
false
);
newGameTab.addEventListener(
'click',
getNewStartingConfig,
false
);
resetBoardTab.addEventListener(
'click',
function(){
gameBoard.setToStartingConfiguration();
},
false
);
saveStartingConfigTab.addEventListener(
'click',
function(){
gameBoard.saveStartingConfiguration();
},
false
);
clearBoardTab.addEventListener(
'click',
function(){
gameBoard.wipeClean()
},
false
);
function getNewStartingConfig(){
newGameTab.removeEventListener('click',getNewStartingConfig);
gameBoard.loadStartingConfiguration(Sudoku.getNewStartingConfig());
setTimeout(function(){newGameTab.addEventListener('click',getNewStartingConfig,false);},1000);
}
}
function focusCameraOnBoard() {
var n = gameBoard.getGameSize()
, nSqrd = n * n
, len = 500
, cam = threePanel.camera
, tar = threePanel.controls.target
;
threePanel.controls.noRotate = true;
Utils.animate({
obj:tar,
prop:"z",
target:0,
length:len
});
Utils.animate({
obj:cam.rotation,
prop:"z",
target:0,
length:len
});
Utils.animate({
obj:cam.position,
prop:"x",
target:0,
length:len
});
Utils.animate({
obj:cam.position,
prop:"y",
target:0,
length:len
});
Utils.animate({
obj:cam.position,
prop:"z",
target: 0.8 * ((nSqrd - 1) * (Sudoku.GameBoard3D.cellSize + Sudoku.GameBoard3D.cellSpacing) + (n - 1) * Sudoku.GameBoard3D.subGridSpacing),
length:len,
callback:function(){
threePanel.camera.up = new THREE.Vector3(0,1,0);
}
});
}
function focusCameraOnCube() {
var n = gameBoard.getGameSize()
, nSqrd = n * n
, len = 500
, cam = threePanel.camera
, tar = threePanel.controls.target
;
threePanel.controls.noRotate = false;
Utils.animate({
obj:tar,
prop:"x",
target:0,
length:len
});
Utils.animate({
obj:tar,
prop:"y",
target:0,
length:len
});
Utils.animate({
obj:tar,
prop:"z",
target: 0.5 * (((Sudoku.GameBoard3D.cellSize + Sudoku.GameBoard3D.cellSpacing) * nSqrd) + Sudoku.PossibilityCube3D.zOffset ),
length:len
});
Utils.animate({
obj:cam.position,
prop:"x",
target:0,
length:len
});
Utils.animate({
obj:cam.position,
prop:"y",
target:0,
length:len
});
Utils.animate({
obj:cam.position,
prop:"z",
target: 2.3 * (Sudoku.PossibilityCube3D.zOffset + 0.5 * (Sudoku.GameBoard3D.cellSize + Sudoku.GameBoard3D.cellSpacing) * nSqrd),
length:len
});
}
}
window.addEventListener("load", app, false);
})();
|
/**
* ============================================================
* Español
* ============================================================
*
* Translators:
*
* Hyuchia <diego@hyuchia.com>
*/
export default {
'AdvanceHelp': 'Para avanzar en el juego, presiona espacio o haz click',
'AllowPlayback': 'Click here to allow audio playback',
'Audio': 'Audio',
'AutoPlay': 'Auto',
'AutoPlayButton': 'Activar juego automático',
'AutoPlaySpeed': 'Velocidad de Juego Automático',
'Back': 'Atrás',
'BackButton': 'Atrás',
'Cancel': 'Cancelar',
'Close': 'Cerrar',
'Confirm': '¿Deseas salir?',
'Credits': 'Créditos',
'Delete': 'Eliminar',
'DialogLogButton': 'Mostrar el historial de dialogos',
'FullScreen': 'Pantalla Completa',
'Gallery': 'Galería',
'Help': 'Ayuda',
'Hide': 'Ocultar',
'HideButton': 'Esconder el Texto',
'iOSAudioWarning': 'Las configuraciones de Audio no están disponibles en iOS',
'KeyboardShortcuts': 'Atajos de Teclado',
'Language': 'Lenguaje',
'Load': 'Cargar',
'LoadAutoSaveSlots': 'Juegos Guardados Automaticamente',
'LoadButton': 'Abrir la Pantalla de Cargar',
'Loading': 'Cargando',
'LoadingMessage': 'Espere mientras se cargan los archivos',
'LoadSlots': 'Juegos Guardados',
'LocalStorageWarning': 'El Almacenaje Local no está disponible en este navegador',
'Log': 'Historial',
'Music': 'Volumen de la Música',
'NewContent': 'Un nuevo contenido está disponible, recarga la página para obtener la versión más nueva',
'NoSavedGames': 'No hay juegos guardados',
'NoAutoSavedGames': 'No hay juegos guardados automaticamente',
'NoDialogsAvailable': 'No hay dialogos disponibles. Los dialogos aparecerán aqui una vez que ocurran en el juego',
'OK': 'Aceptar',
'OrientationWarning': 'Por favor rota tu dispositivo para jugar',
'Overwrite': 'Sobreescribir',
'QuickButtons': 'Botones del Menú Rápido',
'QuickMenu': 'Menú Rápido',
'Quit': 'Salir',
'QuitButton': 'Salir del Juego',
'Resolution': 'Resolución',
'Save': 'Guardar',
'SaveButton': 'Abrir la Pantalla de Guardar',
'SaveInSlot': 'Guardar en ranura',
'SelectYourLanguage': 'Selecciona tu idioma',
'Settings': 'Configuración',
'SettingsButton': 'Abrir la Pantalla de Configuración',
'Show': 'Mostrar',
'Skip': 'Saltar',
'SkipButton': 'Entrar al modo de salto',
'SlotDeletion': '¿Está seguro de querer eliminar este juego?',
'SlotOverwrite': '¿Está seguro de querer Sobreescribir este juego?',
'Sound': 'Volumen de los Sonidos',
'Start': 'Comenzar',
'Stop': 'Detener',
'TextSpeed': 'Velocidad del Texto',
'Video': 'Volumen de los Videos',
'Voice': 'Volumen de la Voz',
'Windowed': 'Ventana'
}; |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime");
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M14.5 7H16v3h-1.5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 15.5h-1.5V14h-1v3H8v-3H7v4.5H5.5v-5c0-.55.45-1 1-1H11c.55 0 1 .45 1 1v5zm3.5 0H14v-6h3.5c.55 0 1 .45 1 1V16c0 .55-.45 1-1 1h-2v1.5zm2-8c0 .55-.45 1-1 1H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h2.5c.55 0 1 .45 1 1v4zM10 9H8v1h3v1.5H6.5V9c0-.55.45-1 1-1h2V7h-3V5.5H10c.55 0 1 .45 1 1V8c0 .55-.45 1-1 1zm5.5 5H17v1.5h-1.5z"
}), 'TwentyZeroMp');
exports.default = _default; |
/**
* Require the given path.
*
* @param {String} path
* @return {Object} exports
* @api public
*/
function require(path, parent, orig) {
var resolved = require.resolve(path);
// lookup failed
if (null == resolved) {
orig = orig || path;
parent = parent || 'root';
var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
err.path = orig;
err.parent = parent;
err.require = true;
throw err;
}
var module = require.modules[resolved];
// perform real require()
// by invoking the module's
// registered function
if (!module.exports) {
module.exports = {};
module.client = module.component = true;
module.call(this, module.exports, require.relative(resolved), module);
}
return module.exports;
}
/**
* Registered modules.
*/
require.modules = {};
/**
* Registered aliases.
*/
require.aliases = {};
/**
* Resolve `path`.
*
* Lookup:
*
* - PATH/index.js
* - PATH.js
* - PATH
*
* @param {String} path
* @return {String} path or null
* @api private
*/
require.resolve = function(path) {
if (path.charAt(0) === '/') path = path.slice(1);
var paths = [
path,
path + '.js',
path + '.json',
path + '/index.js',
path + '/index.json'
];
for (var i = 0; i < paths.length; i++) {
var path = paths[i];
if (require.modules.hasOwnProperty(path)) return path;
if (require.aliases.hasOwnProperty(path)) return require.aliases[path];
}
};
/**
* Normalize `path` relative to the current path.
*
* @param {String} curr
* @param {String} path
* @return {String}
* @api private
*/
require.normalize = function(curr, path) {
var segs = [];
if ('.' != path.charAt(0)) return path;
curr = curr.split('/');
path = path.split('/');
for (var i = 0; i < path.length; ++i) {
if ('..' == path[i]) {
curr.pop();
} else if ('.' != path[i] && '' != path[i]) {
segs.push(path[i]);
}
}
return curr.concat(segs).join('/');
};
/**
* Register module at `path` with callback `definition`.
*
* @param {String} path
* @param {Function} definition
* @api private
*/
require.register = function(path, definition) {
require.modules[path] = definition;
};
/**
* Alias a module definition.
*
* @param {String} from
* @param {String} to
* @api private
*/
require.alias = function(from, to) {
if (!require.modules.hasOwnProperty(from)) {
throw new Error('Failed to alias "' + from + '", it does not exist');
}
require.aliases[to] = from;
};
/**
* Return a require function relative to the `parent` path.
*
* @param {String} parent
* @return {Function}
* @api private
*/
require.relative = function(parent) {
var p = require.normalize(parent, '..');
/**
* lastIndexOf helper.
*/
function lastIndexOf(arr, obj) {
var i = arr.length;
while (i--) {
if (arr[i] === obj) return i;
}
return -1;
}
/**
* The relative require() itself.
*/
function localRequire(path) {
var resolved = localRequire.resolve(path);
return require(resolved, parent, path);
}
/**
* Resolve relative to the parent.
*/
localRequire.resolve = function(path) {
var c = path.charAt(0);
if ('/' == c) return path.slice(1);
if ('.' == c) return require.normalize(p, path);
// resolve deps by returning
// the dep in the nearest "deps"
// directory
var segs = parent.split('/');
var i = lastIndexOf(segs, 'deps') + 1;
if (!i) i = 0;
path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
return path;
};
/**
* Check if module is defined at `path`.
*/
localRequire.exists = function(path) {
return require.modules.hasOwnProperty(localRequire.resolve(path));
};
return localRequire;
};
require.register("component-emitter/index.js", function(exports, require, module){
/**
* Expose `Emitter`.
*/
module.exports = Emitter;
/**
* Initialize a new `Emitter`.
*
* @api public
*/
function Emitter(obj) {
if (obj) return mixin(obj);
};
/**
* Mixin the emitter properties.
*
* @param {Object} obj
* @return {Object}
* @api private
*/
function mixin(obj) {
for (var key in Emitter.prototype) {
obj[key] = Emitter.prototype[key];
}
return obj;
}
/**
* Listen on the given `event` with `fn`.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.on =
Emitter.prototype.addEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
(this._callbacks[event] = this._callbacks[event] || [])
.push(fn);
return this;
};
/**
* Adds an `event` listener that will be invoked a single
* time then automatically removed.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.once = function(event, fn){
var self = this;
this._callbacks = this._callbacks || {};
function on() {
self.off(event, on);
fn.apply(this, arguments);
}
on.fn = fn;
this.on(event, on);
return this;
};
/**
* Remove the given callback for `event` or all
* registered callbacks.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.off =
Emitter.prototype.removeListener =
Emitter.prototype.removeAllListeners =
Emitter.prototype.removeEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
// all
if (0 == arguments.length) {
this._callbacks = {};
return this;
}
// specific event
var callbacks = this._callbacks[event];
if (!callbacks) return this;
// remove all handlers
if (1 == arguments.length) {
delete this._callbacks[event];
return this;
}
// remove specific handler
var cb;
for (var i = 0; i < callbacks.length; i++) {
cb = callbacks[i];
if (cb === fn || cb.fn === fn) {
callbacks.splice(i, 1);
break;
}
}
return this;
};
/**
* Emit `event` with the given args.
*
* @param {String} event
* @param {Mixed} ...
* @return {Emitter}
*/
Emitter.prototype.emit = function(event){
this._callbacks = this._callbacks || {};
var args = [].slice.call(arguments, 1)
, callbacks = this._callbacks[event];
if (callbacks) {
callbacks = callbacks.slice(0);
for (var i = 0, len = callbacks.length; i < len; ++i) {
callbacks[i].apply(this, args);
}
}
return this;
};
/**
* Return array of callbacks for `event`.
*
* @param {String} event
* @return {Array}
* @api public
*/
Emitter.prototype.listeners = function(event){
this._callbacks = this._callbacks || {};
return this._callbacks[event] || [];
};
/**
* Check if this emitter has `event` handlers.
*
* @param {String} event
* @return {Boolean}
* @api public
*/
Emitter.prototype.hasListeners = function(event){
return !! this.listeners(event).length;
};
});
require.register("NetEase-pomelo-protocol/lib/protocol.js", function(exports, require, module){
(function (exports, ByteArray, global) {
var Protocol = exports;
var PKG_HEAD_BYTES = 4;
var MSG_FLAG_BYTES = 1;
var MSG_ROUTE_CODE_BYTES = 2;
var MSG_ID_MAX_BYTES = 5;
var MSG_ROUTE_LEN_BYTES = 1;
var MSG_ROUTE_CODE_MAX = 0xffff;
var MSG_COMPRESS_ROUTE_MASK = 0x1;
var MSG_TYPE_MASK = 0x7;
var Package = Protocol.Package = {};
var Message = Protocol.Message = {};
Package.TYPE_HANDSHAKE = 1;
Package.TYPE_HANDSHAKE_ACK = 2;
Package.TYPE_HEARTBEAT = 3;
Package.TYPE_DATA = 4;
Package.TYPE_KICK = 5;
Message.TYPE_REQUEST = 0;
Message.TYPE_NOTIFY = 1;
Message.TYPE_RESPONSE = 2;
Message.TYPE_PUSH = 3;
/**
* pomele client encode
* id message id;
* route message route
* msg message body
* socketio current support string
*/
Protocol.strencode = function(str) {
var byteArray = new ByteArray(str.length * 3);
var offset = 0;
for(var i = 0; i < str.length; i++){
var charCode = str.charCodeAt(i);
var codes = null;
if(charCode <= 0x7f){
codes = [charCode];
}else if(charCode <= 0x7ff){
codes = [0xc0|(charCode>>6), 0x80|(charCode & 0x3f)];
}else{
codes = [0xe0|(charCode>>12), 0x80|((charCode & 0xfc0)>>6), 0x80|(charCode & 0x3f)];
}
for(var j = 0; j < codes.length; j++){
byteArray[offset] = codes[j];
++offset;
}
}
var _buffer = new ByteArray(offset);
copyArray(_buffer, 0, byteArray, 0, offset);
return _buffer;
};
/**
* client decode
* msg String data
* return Message Object
*/
Protocol.strdecode = function(buffer) {
var bytes = new ByteArray(buffer);
var array = [];
var offset = 0;
var charCode = 0;
var end = bytes.length;
while(offset < end){
if(bytes[offset] < 128){
charCode = bytes[offset];
offset += 1;
}else if(bytes[offset] < 224){
charCode = ((bytes[offset] & 0x3f)<<6) + (bytes[offset+1] & 0x3f);
offset += 2;
}else{
charCode = ((bytes[offset] & 0x0f)<<12) + ((bytes[offset+1] & 0x3f)<<6) + (bytes[offset+2] & 0x3f);
offset += 3;
}
array.push(charCode);
}
return String.fromCharCode.apply(null, array);
};
/**
* Package protocol encode.
*
* Pomelo package format:
* +------+-------------+------------------+
* | type | body length | body |
* +------+-------------+------------------+
*
* Head: 4bytes
* 0: package type,
* 1 - handshake,
* 2 - handshake ack,
* 3 - heartbeat,
* 4 - data
* 5 - kick
* 1 - 3: big-endian body length
* Body: body length bytes
*
* @param {Number} type package type
* @param {ByteArray} body body content in bytes
* @return {ByteArray} new byte array that contains encode result
*/
Package.encode = function(type, body){
var length = body ? body.length : 0;
var buffer = new ByteArray(PKG_HEAD_BYTES + length);
var index = 0;
buffer[index++] = type & 0xff;
buffer[index++] = (length >> 16) & 0xff;
buffer[index++] = (length >> 8) & 0xff;
buffer[index++] = length & 0xff;
if(body) {
copyArray(buffer, index, body, 0, length);
}
return buffer;
};
/**
* Package protocol decode.
* See encode for package format.
*
* @param {ByteArray} buffer byte array containing package content
* @return {Object} {type: package type, buffer: body byte array}
*/
Package.decode = function(buffer){
var offset = 0;
var bytes = new ByteArray(buffer);
var length = 0;
var rs = [];
while(offset < bytes.length) {
var type = bytes[offset++];
length = ((bytes[offset++]) << 16 | (bytes[offset++]) << 8 | bytes[offset++]) >>> 0;
var body = length ? new ByteArray(length) : null;
copyArray(body, 0, bytes, offset, length);
offset += length;
rs.push({'type': type, 'body': body});
}
return rs.length === 1 ? rs[0]: rs;
};
/**
* Message protocol encode.
*
* @param {Number} id message id
* @param {Number} type message type
* @param {Number} compressRoute whether compress route
* @param {Number|String} route route code or route string
* @param {Buffer} msg message body bytes
* @return {Buffer} encode result
*/
Message.encode = function(id, type, compressRoute, route, msg){
// caculate message max length
var idBytes = msgHasId(type) ? caculateMsgIdBytes(id) : 0;
var msgLen = MSG_FLAG_BYTES + idBytes;
if(msgHasRoute(type)) {
if(compressRoute) {
if(typeof route !== 'number'){
throw new Error('error flag for number route!');
}
msgLen += MSG_ROUTE_CODE_BYTES;
} else {
msgLen += MSG_ROUTE_LEN_BYTES;
if(route) {
route = Protocol.strencode(route);
if(route.length>255) {
throw new Error('route maxlength is overflow');
}
msgLen += route.length;
}
}
}
if(msg) {
msgLen += msg.length;
}
var buffer = new ByteArray(msgLen);
var offset = 0;
// add flag
offset = encodeMsgFlag(type, compressRoute, buffer, offset);
// add message id
if(msgHasId(type)) {
offset = encodeMsgId(id, buffer, offset);
}
// add route
if(msgHasRoute(type)) {
offset = encodeMsgRoute(compressRoute, route, buffer, offset);
}
// add body
if(msg) {
offset = encodeMsgBody(msg, buffer, offset);
}
return buffer;
};
/**
* Message protocol decode.
*
* @param {Buffer|Uint8Array} buffer message bytes
* @return {Object} message object
*/
Message.decode = function(buffer) {
var bytes = new ByteArray(buffer);
var bytesLen = bytes.length || bytes.byteLength;
var offset = 0;
var id = 0;
var route = null;
// parse flag
var flag = bytes[offset++];
var compressRoute = flag & MSG_COMPRESS_ROUTE_MASK;
var type = (flag >> 1) & MSG_TYPE_MASK;
// parse id
if(msgHasId(type)) {
var m = parseInt(bytes[offset]);
var i = 0;
do{
var m = parseInt(bytes[offset]);
id = id + ((m & 0x7f) * Math.pow(2,(7*i)));
offset++;
i++;
}while(m >= 128);
}
// parse route
if(msgHasRoute(type)) {
if(compressRoute) {
route = (bytes[offset++]) << 8 | bytes[offset++];
} else {
var routeLen = bytes[offset++];
if(routeLen) {
route = new ByteArray(routeLen);
copyArray(route, 0, bytes, offset, routeLen);
route = Protocol.strdecode(route);
} else {
route = '';
}
offset += routeLen;
}
}
// parse body
var bodyLen = bytesLen - offset;
var body = new ByteArray(bodyLen);
copyArray(body, 0, bytes, offset, bodyLen);
return {'id': id, 'type': type, 'compressRoute': compressRoute,
'route': route, 'body': body};
};
var copyArray = function(dest, doffset, src, soffset, length) {
if('function' === typeof src.copy) {
// Buffer
src.copy(dest, doffset, soffset, soffset + length);
} else {
// Uint8Array
for(var index=0; index<length; index++){
dest[doffset++] = src[soffset++];
}
}
};
var msgHasId = function(type) {
return type === Message.TYPE_REQUEST || type === Message.TYPE_RESPONSE;
};
var msgHasRoute = function(type) {
return type === Message.TYPE_REQUEST || type === Message.TYPE_NOTIFY ||
type === Message.TYPE_PUSH;
};
var caculateMsgIdBytes = function(id) {
var len = 0;
do {
len += 1;
id >>= 7;
} while(id > 0);
return len;
};
var encodeMsgFlag = function(type, compressRoute, buffer, offset) {
if(type !== Message.TYPE_REQUEST && type !== Message.TYPE_NOTIFY &&
type !== Message.TYPE_RESPONSE && type !== Message.TYPE_PUSH) {
throw new Error('unkonw message type: ' + type);
}
buffer[offset] = (type << 1) | (compressRoute ? 1 : 0);
return offset + MSG_FLAG_BYTES;
};
var encodeMsgId = function(id, buffer, offset) {
do{
var tmp = id % 128;
var next = Math.floor(id/128);
if(next !== 0){
tmp = tmp + 128;
}
buffer[offset++] = tmp;
id = next;
} while(id !== 0);
return offset;
};
var encodeMsgRoute = function(compressRoute, route, buffer, offset) {
if (compressRoute) {
if(route > MSG_ROUTE_CODE_MAX){
throw new Error('route number is overflow');
}
buffer[offset++] = (route >> 8) & 0xff;
buffer[offset++] = route & 0xff;
} else {
if(route) {
buffer[offset++] = route.length & 0xff;
copyArray(buffer, offset, route, 0, route.length);
offset += route.length;
} else {
buffer[offset++] = 0;
}
}
return offset;
};
var encodeMsgBody = function(msg, buffer, offset) {
copyArray(buffer, offset, msg, 0, msg.length);
return offset + msg.length;
};
module.exports = Protocol;
if(typeof(window) != "undefined") {
window.Protocol = Protocol;
}
})(typeof(window)=="undefined" ? module.exports : (this.Protocol = {}),typeof(window)=="undefined" ? Buffer : Uint8Array, this);
});
require.register("pomelonode-pomelo-protobuf/lib/client/protobuf.js", function(exports, require, module){
/* ProtocolBuffer client 0.1.0*/
/**
* pomelo-protobuf
* @author <zhang0935@gmail.com>
*/
/**
* Protocol buffer root
* In browser, it will be window.protbuf
*/
(function (exports, global){
var Protobuf = exports;
Protobuf.init = function(opts){
//On the serverside, use serverProtos to encode messages send to client
Protobuf.encoder.init(opts.encoderProtos);
//On the serverside, user clientProtos to decode messages receive from clients
Protobuf.decoder.init(opts.decoderProtos);
};
Protobuf.encode = function(key, msg){
return Protobuf.encoder.encode(key, msg);
};
Protobuf.decode = function(key, msg){
return Protobuf.decoder.decode(key, msg);
};
// exports to support for components
module.exports = Protobuf;
if(typeof(window) != "undefined") {
window.protobuf = Protobuf;
}
})(typeof(window) == "undefined" ? module.exports : (this.protobuf = {}), this);
/**
* constants
*/
(function (exports, global){
var constants = exports.constants = {};
constants.TYPES = {
uInt32 : 0,
sInt32 : 0,
int32 : 0,
double : 1,
string : 2,
message : 2,
float : 5
};
})('undefined' !== typeof protobuf ? protobuf : module.exports, this);
/**
* util module
*/
(function (exports, global){
var Util = exports.util = {};
Util.isSimpleType = function(type){
return ( type === 'uInt32' ||
type === 'sInt32' ||
type === 'int32' ||
type === 'uInt64' ||
type === 'sInt64' ||
type === 'float' ||
type === 'double' );
};
})('undefined' !== typeof protobuf ? protobuf : module.exports, this);
/**
* codec module
*/
(function (exports, global){
var Codec = exports.codec = {};
var buffer = new ArrayBuffer(8);
var float32Array = new Float32Array(buffer);
var float64Array = new Float64Array(buffer);
var uInt8Array = new Uint8Array(buffer);
Codec.encodeUInt32 = function(n){
var n = parseInt(n);
if(isNaN(n) || n < 0){
return null;
}
var result = [];
do{
var tmp = n % 128;
var next = Math.floor(n/128);
if(next !== 0){
tmp = tmp + 128;
}
result.push(tmp);
n = next;
}while(n !== 0);
return result;
};
Codec.encodeSInt32 = function(n){
var n = parseInt(n);
if(isNaN(n)){
return null;
}
n = n<0?(Math.abs(n)*2-1):n*2;
return Codec.encodeUInt32(n);
};
Codec.decodeUInt32 = function(bytes){
var n = 0;
for(var i = 0; i < bytes.length; i++){
var m = parseInt(bytes[i]);
n = n + ((m & 0x7f) * Math.pow(2,(7*i)));
if(m < 128){
return n;
}
}
return n;
};
Codec.decodeSInt32 = function(bytes){
var n = this.decodeUInt32(bytes);
var flag = ((n%2) === 1)?-1:1;
n = ((n%2 + n)/2)*flag;
return n;
};
Codec.encodeFloat = function(float){
float32Array[0] = float;
return uInt8Array;
};
Codec.decodeFloat = function(bytes, offset){
if(!bytes || bytes.length < (offset +4)){
return null;
}
for(var i = 0; i < 4; i++){
uInt8Array[i] = bytes[offset + i];
}
return float32Array[0];
};
Codec.encodeDouble = function(double){
float64Array[0] = double;
return uInt8Array.subarray(0, 8);
};
Codec.decodeDouble = function(bytes, offset){
if(!bytes || bytes.length < (8 + offset)){
return null;
}
for(var i = 0; i < 8; i++){
uInt8Array[i] = bytes[offset + i];
}
return float64Array[0];
};
Codec.encodeStr = function(bytes, offset, str){
for(var i = 0; i < str.length; i++){
var code = str.charCodeAt(i);
var codes = encode2UTF8(code);
for(var j = 0; j < codes.length; j++){
bytes[offset] = codes[j];
offset++;
}
}
return offset;
};
/**
* Decode string from utf8 bytes
*/
Codec.decodeStr = function(bytes, offset, length){
var array = [];
var end = offset + length;
while(offset < end){
var code = 0;
if(bytes[offset] < 128){
code = bytes[offset];
offset += 1;
}else if(bytes[offset] < 224){
code = ((bytes[offset] & 0x3f)<<6) + (bytes[offset+1] & 0x3f);
offset += 2;
}else{
code = ((bytes[offset] & 0x0f)<<12) + ((bytes[offset+1] & 0x3f)<<6) + (bytes[offset+2] & 0x3f);
offset += 3;
}
array.push(code);
}
var str = '';
for(var i = 0; i < array.length;){
str += String.fromCharCode.apply(null, array.slice(i, i + 10000));
i += 10000;
}
return str;
};
/**
* Return the byte length of the str use utf8
*/
Codec.byteLength = function(str){
if(typeof(str) !== 'string'){
return -1;
}
var length = 0;
for(var i = 0; i < str.length; i++){
var code = str.charCodeAt(i);
length += codeLength(code);
}
return length;
};
/**
* Encode a unicode16 char code to utf8 bytes
*/
function encode2UTF8(charCode){
if(charCode <= 0x7f){
return [charCode];
}else if(charCode <= 0x7ff){
return [0xc0|(charCode>>6), 0x80|(charCode & 0x3f)];
}else{
return [0xe0|(charCode>>12), 0x80|((charCode & 0xfc0)>>6), 0x80|(charCode & 0x3f)];
}
}
function codeLength(code){
if(code <= 0x7f){
return 1;
}else if(code <= 0x7ff){
return 2;
}else{
return 3;
}
}
})('undefined' !== typeof protobuf ? protobuf : module.exports, this);
/**
* encoder module
*/
(function (exports, global){
var protobuf = exports;
var MsgEncoder = exports.encoder = {};
var codec = protobuf.codec;
var constant = protobuf.constants;
var util = protobuf.util;
MsgEncoder.init = function(protos){
this.protos = protos || {};
};
MsgEncoder.encode = function(route, msg){
//Get protos from protos map use the route as key
var protos = this.protos[route];
//Check msg
if(!checkMsg(msg, protos)){
return null;
}
//Set the length of the buffer 2 times bigger to prevent overflow
var length = codec.byteLength(JSON.stringify(msg));
//Init buffer and offset
var buffer = new ArrayBuffer(length);
var uInt8Array = new Uint8Array(buffer);
var offset = 0;
if(!!protos){
offset = encodeMsg(uInt8Array, offset, protos, msg);
if(offset > 0){
return uInt8Array.subarray(0, offset);
}
}
return null;
};
/**
* Check if the msg follow the defination in the protos
*/
function checkMsg(msg, protos){
if(!protos){
return false;
}
for(var name in protos){
var proto = protos[name];
//All required element must exist
switch(proto.option){
case 'required' :
if(typeof(msg[name]) === 'undefined'){
return false;
}
case 'optional' :
if(typeof(msg[name]) !== 'undefined'){
if(!!protos.__messages[proto.type]){
checkMsg(msg[name], protos.__messages[proto.type]);
}
}
break;
case 'repeated' :
//Check nest message in repeated elements
if(!!msg[name] && !!protos.__messages[proto.type]){
for(var i = 0; i < msg[name].length; i++){
if(!checkMsg(msg[name][i], protos.__messages[proto.type])){
return false;
}
}
}
break;
}
}
return true;
}
function encodeMsg(buffer, offset, protos, msg){
for(var name in msg){
if(!!protos[name]){
var proto = protos[name];
switch(proto.option){
case 'required' :
case 'optional' :
offset = writeBytes(buffer, offset, encodeTag(proto.type, proto.tag));
offset = encodeProp(msg[name], proto.type, offset, buffer, protos);
break;
case 'repeated' :
if(msg[name].length > 0){
offset = encodeArray(msg[name], proto, offset, buffer, protos);
}
break;
}
}
}
return offset;
}
function encodeProp(value, type, offset, buffer, protos){
switch(type){
case 'uInt32':
offset = writeBytes(buffer, offset, codec.encodeUInt32(value));
break;
case 'int32' :
case 'sInt32':
offset = writeBytes(buffer, offset, codec.encodeSInt32(value));
break;
case 'float':
writeBytes(buffer, offset, codec.encodeFloat(value));
offset += 4;
break;
case 'double':
writeBytes(buffer, offset, codec.encodeDouble(value));
offset += 8;
break;
case 'string':
var length = codec.byteLength(value);
//Encode length
offset = writeBytes(buffer, offset, codec.encodeUInt32(length));
//write string
codec.encodeStr(buffer, offset, value);
offset += length;
break;
default :
if(!!protos.__messages[type]){
//Use a tmp buffer to build an internal msg
var tmpBuffer = new ArrayBuffer(codec.byteLength(JSON.stringify(value)));
var length = 0;
length = encodeMsg(tmpBuffer, length, protos.__messages[type], value);
//Encode length
offset = writeBytes(buffer, offset, codec.encodeUInt32(length));
//contact the object
for(var i = 0; i < length; i++){
buffer[offset] = tmpBuffer[i];
offset++;
}
}
break;
}
return offset;
}
/**
* Encode reapeated properties, simple msg and object are decode differented
*/
function encodeArray(array, proto, offset, buffer, protos){
var i = 0;
if(util.isSimpleType(proto.type)){
offset = writeBytes(buffer, offset, encodeTag(proto.type, proto.tag));
offset = writeBytes(buffer, offset, codec.encodeUInt32(array.length));
for(i = 0; i < array.length; i++){
offset = encodeProp(array[i], proto.type, offset, buffer);
}
}else{
for(i = 0; i < array.length; i++){
offset = writeBytes(buffer, offset, encodeTag(proto.type, proto.tag));
offset = encodeProp(array[i], proto.type, offset, buffer, protos);
}
}
return offset;
}
function writeBytes(buffer, offset, bytes){
for(var i = 0; i < bytes.length; i++, offset++){
buffer[offset] = bytes[i];
}
return offset;
}
function encodeTag(type, tag){
var value = constant.TYPES[type]||2;
return codec.encodeUInt32((tag<<3)|value);
}
})('undefined' !== typeof protobuf ? protobuf : module.exports, this);
/**
* decoder module
*/
(function (exports, global){
var protobuf = exports;
var MsgDecoder = exports.decoder = {};
var codec = protobuf.codec;
var util = protobuf.util;
var buffer;
var offset = 0;
MsgDecoder.init = function(protos){
this.protos = protos || {};
};
MsgDecoder.setProtos = function(protos){
if(!!protos){
this.protos = protos;
}
};
MsgDecoder.decode = function(route, buf){
var protos = this.protos[route];
buffer = buf;
offset = 0;
if(!!protos){
return decodeMsg({}, protos, buffer.length);
}
return null;
};
function decodeMsg(msg, protos, length){
while(offset<length){
var head = getHead();
var type = head.type;
var tag = head.tag;
var name = protos.__tags[tag];
switch(protos[name].option){
case 'optional' :
case 'required' :
msg[name] = decodeProp(protos[name].type, protos);
break;
case 'repeated' :
if(!msg[name]){
msg[name] = [];
}
decodeArray(msg[name], protos[name].type, protos);
break;
}
}
return msg;
}
/**
* Test if the given msg is finished
*/
function isFinish(msg, protos){
return (!protos.__tags[peekHead().tag]);
}
/**
* Get property head from protobuf
*/
function getHead(){
var tag = codec.decodeUInt32(getBytes());
return {
type : tag&0x7,
tag : tag>>3
};
}
/**
* Get tag head without move the offset
*/
function peekHead(){
var tag = codec.decodeUInt32(peekBytes());
return {
type : tag&0x7,
tag : tag>>3
};
}
function decodeProp(type, protos){
switch(type){
case 'uInt32':
return codec.decodeUInt32(getBytes());
case 'int32' :
case 'sInt32' :
return codec.decodeSInt32(getBytes());
case 'float' :
var float = codec.decodeFloat(buffer, offset);
offset += 4;
return float;
case 'double' :
var double = codec.decodeDouble(buffer, offset);
offset += 8;
return double;
case 'string' :
var length = codec.decodeUInt32(getBytes());
var str = codec.decodeStr(buffer, offset, length);
offset += length;
return str;
default :
if(!!protos && !!protos.__messages[type]){
var length = codec.decodeUInt32(getBytes());
var msg = {};
decodeMsg(msg, protos.__messages[type], offset+length);
return msg;
}
break;
}
}
function decodeArray(array, type, protos){
if(util.isSimpleType(type)){
var length = codec.decodeUInt32(getBytes());
for(var i = 0; i < length; i++){
array.push(decodeProp(type));
}
}else{
array.push(decodeProp(type, protos));
}
}
function getBytes(flag){
var bytes = [];
var pos = offset;
flag = flag || false;
var b;
do{
b = buffer[pos];
bytes.push(b);
pos++;
}while(b >= 128);
if(!flag){
offset = pos;
}
return bytes;
}
function peekBytes(){
return getBytes(true);
}
})('undefined' !== typeof protobuf ? protobuf : module.exports, this);
});
require.register("pomelonode-pomelo-jsclient-websocket/lib/pomelo-client.js", function(exports, require, module){
(function() {
var JS_WS_CLIENT_TYPE = 'js-websocket';
var JS_WS_CLIENT_VERSION = '0.0.1';
var Protocol = window.Protocol;
var Package = Protocol.Package;
var Message = Protocol.Message;
var EventEmitter = window.EventEmitter;
if(typeof(window) != "undefined" && typeof(sys) != 'undefined' && sys.localStorage) {
window.localStorage = sys.localStorage;
}
var RES_OK = 200;
var RES_FAIL = 500;
var RES_OLD_CLIENT = 501;
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
}
var root = window;
var pomelo = Object.create(EventEmitter.prototype); // object extend from object
root.pomelo = pomelo;
var socket = null;
var reqId = 0;
var callbacks = {};
var handlers = {};
//Map from request id to route
var routeMap = {};
var heartbeatInterval = 0;
var heartbeatTimeout = 0;
var nextHeartbeatTimeout = 0;
var gapThreshold = 100; // heartbeat gap threashold
var heartbeatId = null;
var heartbeatTimeoutId = null;
var handshakeCallback = null;
var decode = null;
var encode = null;
var useCrypto;
var handshakeBuffer = {
'sys': {
type: JS_WS_CLIENT_TYPE,
version: JS_WS_CLIENT_VERSION
},
'user': {
}
};
var initCallback = null;
pomelo.init = function(params, cb){
initCallback = cb;
var host = params.host;
var port = params.port;
var url = 'ws://' + host;
if(port) {
url += ':' + port;
}
handshakeBuffer.user = params.user;
handshakeCallback = params.handshakeCallback;
initWebSocket(url, cb);
};
var initWebSocket = function(url,cb){
var onopen = function(event){
var obj = Package.encode(Package.TYPE_HANDSHAKE, Protocol.strencode(JSON.stringify(handshakeBuffer)));
send(obj);
};
var onmessage = function(event) {
processPackage(Package.decode(event.data), cb);
// new package arrived, update the heartbeat timeout
if(heartbeatTimeout) {
nextHeartbeatTimeout = Date.now() + heartbeatTimeout;
}
};
var onerror = function(event) {
pomelo.emit('io-error', event);
console.error('socket error: ', event);
};
var onclose = function(event){
pomelo.emit('close',event);
pomelo.emit('disconnect', event);
console.error('socket close: ', event);
};
socket = new WebSocket(url);
socket.binaryType = 'arraybuffer';
socket.onopen = onopen;
socket.onmessage = onmessage;
socket.onerror = onerror;
socket.onclose = onclose;
};
pomelo.disconnect = function() {
if(socket) {
if(socket.disconnect) socket.disconnect();
if(socket.close) socket.close();
console.log('disconnect');
socket = null;
}
if(heartbeatId) {
clearTimeout(heartbeatId);
heartbeatId = null;
}
if(heartbeatTimeoutId) {
clearTimeout(heartbeatTimeoutId);
heartbeatTimeoutId = null;
}
};
pomelo.request = function(route, msg, cb) {
if(arguments.length === 2 && typeof msg === 'function') {
cb = msg;
msg = {};
} else {
msg = msg || {};
}
route = route || msg.route;
if(!route) {
return;
}
reqId++;
sendMessage(reqId, route, msg);
callbacks[reqId] = cb;
routeMap[reqId] = route;
};
pomelo.notify = function(route, msg) {
msg = msg || {};
sendMessage(0, route, msg);
};
var sendMessage = function(reqId, route, msg) {
var type = reqId ? Message.TYPE_REQUEST : Message.TYPE_NOTIFY;
//compress message by protobuf
var protos = !!pomelo.data.protos?pomelo.data.protos.client:{};
if(!!protos[route]){
msg = protobuf.encode(route, msg);
}else{
msg = Protocol.strencode(JSON.stringify(msg));
}
var compressRoute = 0;
if(pomelo.dict && pomelo.dict[route]){
route = pomelo.dict[route];
compressRoute = 1;
}
msg = Message.encode(reqId, type, compressRoute, route, msg);
var packet = Package.encode(Package.TYPE_DATA, msg);
send(packet);
};
var send = function(packet){
socket.send(packet.buffer);
};
var handler = {};
var heartbeat = function(data) {
if(!heartbeatInterval) {
// no heartbeat
return;
}
var obj = Package.encode(Package.TYPE_HEARTBEAT);
if(heartbeatTimeoutId) {
clearTimeout(heartbeatTimeoutId);
heartbeatTimeoutId = null;
}
if(heartbeatId) {
// already in a heartbeat interval
return;
}
heartbeatId = setTimeout(function() {
heartbeatId = null;
send(obj);
nextHeartbeatTimeout = Date.now() + heartbeatTimeout;
heartbeatTimeoutId = setTimeout(heartbeatTimeoutCb, heartbeatTimeout);
}, heartbeatInterval);
};
var heartbeatTimeoutCb = function() {
var gap = nextHeartbeatTimeout - Date.now();
if(gap > gapThreshold) {
heartbeatTimeoutId = setTimeout(heartbeatTimeoutCb, gap);
} else {
console.error('server heartbeat timeout');
pomelo.emit('heartbeat timeout');
pomelo.disconnect();
}
};
var handshake = function(data){
data = JSON.parse(Protocol.strdecode(data));
if(data.code === RES_OLD_CLIENT) {
pomelo.emit('error', 'client version not fullfill');
return;
}
if(data.code !== RES_OK) {
pomelo.emit('error', 'handshake fail');
return;
}
handshakeInit(data);
var obj = Package.encode(Package.TYPE_HANDSHAKE_ACK);
send(obj);
if(initCallback) {
initCallback(socket);
initCallback = null;
}
};
var onData = function(data){
//probuff decode
var msg = Message.decode(data);
if(msg.id > 0){
msg.route = routeMap[msg.id];
delete routeMap[msg.id];
if(!msg.route){
return;
}
}
msg.body = deCompose(msg);
processMessage(pomelo, msg);
};
var onKick = function(data) {
data = JSON.parse(Protocol.strdecode(data));
pomelo.emit('onKick', data);
};
handlers[Package.TYPE_HANDSHAKE] = handshake;
handlers[Package.TYPE_HEARTBEAT] = heartbeat;
handlers[Package.TYPE_DATA] = onData;
handlers[Package.TYPE_KICK] = onKick;
var processPackage = function(msgs) {
if(Array.isArray(msgs)) {
for(var i=0; i<msgs.length; i++) {
var msg = msgs[i];
handlers[msg.type](msg.body);
}
} else {
handlers[msgs.type](msgs.body);
}
};
var processMessage = function(pomelo, msg) {
if(!msg.id) {
// server push message
pomelo.emit(msg.route, msg.body);
}
//if have a id then find the callback function with the request
var cb = callbacks[msg.id];
delete callbacks[msg.id];
if(typeof cb !== 'function') {
return;
}
cb(msg.body);
return;
};
var processMessageBatch = function(pomelo, msgs) {
for(var i=0, l=msgs.length; i<l; i++) {
processMessage(pomelo, msgs[i]);
}
};
var deCompose = function(msg){
var protos = !!pomelo.data.protos?pomelo.data.protos.server:{};
var abbrs = pomelo.data.abbrs;
var route = msg.route;
//Decompose route from dict
if(msg.compressRoute) {
if(!abbrs[route]){
return {};
}
route = msg.route = abbrs[route];
}
if(!!protos[route]){
return protobuf.decode(route, msg.body);
}else{
return JSON.parse(Protocol.strdecode(msg.body));
}
return msg;
};
var handshakeInit = function(data){
if(data.sys && data.sys.heartbeat) {
heartbeatInterval = data.sys.heartbeat * 1000; // heartbeat interval
heartbeatTimeout = heartbeatInterval * 2; // max heartbeat timeout
} else {
heartbeatInterval = 0;
heartbeatTimeout = 0;
}
initData(data);
if(typeof handshakeCallback === 'function') {
handshakeCallback(data.user);
}
};
//Initilize data used in pomelo client
var initData = function(data){
if(!data || !data.sys) {
return;
}
pomelo.data = pomelo.data || {};
var dict = data.sys.dict;
var protos = data.sys.protos;
//Init compress dict
if(dict){
pomelo.data.dict = dict;
pomelo.data.abbrs = {};
for(var route in dict){
pomelo.data.abbrs[dict[route]] = route;
}
}
//Init protobuf protos
if(protos){
pomelo.data.protos = {
server : protos.server || {},
client : protos.client || {}
};
if(!!protobuf){
protobuf.init({encoderProtos: protos.client, decoderProtos: protos.server});
}
}
};
module.exports = pomelo;
})();
});
require.register("boot/index.js", function(exports, require, module){
var Emitter = require('emitter');
window.EventEmitter = Emitter;
var protocol = require('pomelo-protocol');
window.Protocol = protocol;
var protobuf = require('pomelo-protobuf');
window.protobuf = protobuf;
var pomelo = require('pomelo-jsclient-websocket');
window.pomelo = pomelo;
});
require.alias("boot/index.js", "pomelo-client/deps/boot/index.js");
require.alias("boot/index.js", "boot/index.js");
require.alias("component-emitter/index.js", "boot/deps/emitter/index.js");
require.alias("NetEase-pomelo-protocol/lib/protocol.js", "boot/deps/pomelo-protocol/lib/protocol.js");
require.alias("NetEase-pomelo-protocol/lib/protocol.js", "boot/deps/pomelo-protocol/index.js");
require.alias("NetEase-pomelo-protocol/lib/protocol.js", "NetEase-pomelo-protocol/index.js");
require.alias("pomelonode-pomelo-protobuf/lib/client/protobuf.js", "boot/deps/pomelo-protobuf/lib/client/protobuf.js");
require.alias("pomelonode-pomelo-protobuf/lib/client/protobuf.js", "boot/deps/pomelo-protobuf/index.js");
require.alias("pomelonode-pomelo-protobuf/lib/client/protobuf.js", "pomelonode-pomelo-protobuf/index.js");
require.alias("pomelonode-pomelo-jsclient-websocket/lib/pomelo-client.js", "boot/deps/pomelo-jsclient-websocket/lib/pomelo-client.js");
require.alias("pomelonode-pomelo-jsclient-websocket/lib/pomelo-client.js", "boot/deps/pomelo-jsclient-websocket/index.js");
require.alias("pomelonode-pomelo-jsclient-websocket/lib/pomelo-client.js", "pomelonode-pomelo-jsclient-websocket/index.js");
|
var fs = require("fs");
var readline = require('readline');
var parseCodebook = require("./codebook");
// load bucket definitions
bucket_definitions = {};
fs.readdirSync(__dirname + "/../buckets/").forEach(function(d) {
var buckets = require(__dirname + "/../buckets/" + d);
Object.keys(buckets).forEach(function(bucket_key) {
var bucket = buckets[bucket_key];
if (bucket_definitions[bucket_key]) {
console.log("Warning: two bucket files have the same key", bucket_key);
}
bucket_definitions[bucket_key] = bucket;
});
});
module.exports = function(opts) {
var codebook = fs.readFileSync(opts._[1] + ".cbk", "utf8"),
instream = fs.createReadStream(opts._[1] + ".dat", { encoding: 'utf8' }),
outstream = fs.createWriteStream(opts._[1] + ".tsv");
/****** PARSE THE CODEBOOK *******/
var cb = parseCodebook(codebook);
var fields = cb.dictionary.map(function(d) { return d.Variable; });
var buckets = [];
var sql_statement = "CREATE TABLE `" + cb.description + "`(\n";
opts.bucket = opts.bucket || opts.buckets;
// this tracks fields from the original dataset that we need to bucket
var fields_to_bucket = {};
// if we're going to bucketize any vars, let's make fields for them.
if (opts.bucket) {
opts.bucket.split(",").forEach(function(bucket_name) {
if (bucket_definitions[bucket_name]) {
var bucket = bucket_definitions[bucket_name];
// we'll use this to cache lookups in memory
bucket.lookup = {};
// some buckets apply to multiple fields, like HHINCOME and INCTOT
// we want to catch this like EDUC_SP if there are joined attributes
var bucket_fields = [bucket.field];
if (~fields.indexOf(bucket.field + "_SP")) {
bucket_fields.push(bucket.field + "_SP");
}
bucket_fields.forEach(function(field) {
fields_to_bucket[field] = bucket;
fields.push(field+"_bucketed");
});
} else {
console.log("Couldn't find a bucket matching", bucket_name)
}
});
}
// fields to ignore in the output
//var eliminate = ["DATANUM","PERNUM","GQ"];
var eliminate = [];
if (!opts.keep_original) {
eliminate = eliminate.concat(Object.keys(fields_to_bucket));
}
if (opts.ignore) {
eliminate = eliminate.concat(opts.ignore.split(","));
}
fields = fields.filter(function(d) { return eliminate.indexOf(d) == -1; });
// check if we have the necessary fields for complete PUMAs
if (opts.full_pumas) {
if (!~fields.indexOf("STATEFIP") || (!~fields.indexOf("PUMA") && !~fields.indexOf("PUMASUPR"))) {
console.log("For the --full_pumas option to work, you need to have both 'PUMA' and 'STATEFIP' in your original data request. Ignoring.");
delete opts.full_pumas;
}
}
// now that we have our fields, we can construct the sql CREATE TABLE statement
// it's not at all ideal to alot 64 characters for every field, but haven't written logic to figure out max size or type
fields.forEach(function(field) {
sql_statement += "`" + field + "` varchar(64) DEFAULT NULL,\n"
});
sql_statement = sql_statement.slice(0,-2); // nix final ","
sql_statement += "\n) ENGINE=InnoDB DEFAULT CHARSET=utf8";
fs.writeFileSync(opts._[1] + ".sql", sql_statement);
outstream.write(fields.join("\t") + "\n");
// read file line by line
var buffer = "",
total = 0,
start = new Date().getTime(), // let's time the operation
datum;
var rl = readline.createInterface({
input: instream,
output: process.stdout,
terminal: false
});
// read each line from the original .dat file and match it up to codebook
rl.on('line', function(line) {
datum = {};
cb.dictionary.forEach(function(column) {
// data from .dat file in relevant character ranges
var valStr = line.slice(column.Columns[0]-1, column.Columns[1]);
if (cb.definitions[column.Variable]) {
// plain-language value of that variable, if found in codebook
var label = cb.definitions[column.Variable][valStr] || "N/A",
// convert to native integer or float if pattern matches
val = /^[0-9]+$/.test(label) ? parseInt(label,10) : (/^[0-9]+\.[0-9]+$/.test(label) ? parseFloat(label) : label);
} else {
var label = "",
val = /^[0-9]+$/.test(valStr) ? parseInt(valStr,10) : (/^[0-9]+\.[0-9]+$/.test(valStr) ? parseFloat(valStr) : valStr); // convert to native integer or float if pattern matches
}
// some special cases to account for
// PERWT and HHWT have two implicit decimals
if (column.Variable === "PERWT" || column.Variable === "HHWT") {
val /= 100;
}
// annoying thing they do with age
if (column.Variable === "AGE") {
val = parseInt(valStr);
}
datum[column.Variable] = { val: val, label: label, valStr: valStr };
});
if (opts.full_pumas) {
if (datum.PUMA) {
var full_puma = datum.STATEFIP.valStr + datum.PUMA.valStr;
datum.PUMA = {
val: full_puma,
label: '', // we have these labels in pumas.json, but nowhere to currently put them in the output. (And would add hugely to filesize)
valStr: full_puma
};
} else if (datum.PUMASUPR) {
var full_puma = datum.PUMASUPR.valStr;
//console.log(full_puma)
datum.PUMASUPR = {
val: full_puma,
label: '', // we have these labels in pumas.json, but nowhere to currently put them in the output. (And would add hugely to filesize)
valStr: full_puma
};
}
}
for (var field in fields_to_bucket) {
if (!datum[field]) {
//console.log(field);
continue;
}
var bucket = fields_to_bucket[field],
valStr = datum[field].valStr,
field_name = field + "_bucketed";
// check cache
if (!bucket.lookup[valStr]) {
var val = parseInt(valStr, 10),
bucketed = false;
for (var b in bucket.buckets) {
if (val >= bucket.buckets[b][0] && val <= bucket.buckets[b][1]) {
bucket.lookup[valStr] = bucket.buckets[b][2];
bucketed = true;
break;
}
}
if (!bucketed) {
bucket.lookup[valStr] = val;
}
}
datum[field_name] = { val: bucket.lookup[valStr] };
if (fields.indexOf(field) == -1) {
delete datum[field];
}
}
buffer += fields.map(function(d) { return datum[d].val; }).join("\t") + "\n";
//console.log(datum);
total += 1;
if (total % 1000 === 0) {
process.stdout.write("Scanned " + total + " lines\r");
}
if (total % (opts.buffer || 10000) === 0) {
outstream.write(buffer);
buffer = "";
}
});
rl.on("close", function() {
outstream.write(buffer);
var end = new Date().getTime(),
delta = Math.round((end - start) / 1000);
console.log("Finished parsing " + total + " lines in " + delta + " seconds.");
console.log("Wrote output to " + opts._[1] + ".tsv");
console.log("Wrote SQL CREATE TABLE statement to", opts._[1] + ".sql");
});
} |
'use strict'
module.exports = {
create,
lookup,
add,
print,
keys
}
/**
* create new AVL tree node
* @returns {{key: null, value: null, height: number, left: null, right: null}}
*/
function create(key, value) {
if (!Buffer.isBuffer(key)) {
throw new TypeError('expected buffer')
}
return {
key,
value,
left: null,
right: null,
height: 0
}
}
/**
* compare 2 keys
* @param tree_key {Buffer}
* @param key {string|Buffer}
* @returns {number}
*/
function compare(tree_key, key) {
let buf
if (Buffer.isBuffer(key)) {
buf = key
} else if (typeof key == 'string') {
buf = Buffer.from(key)
} else {
throw new TypeError('Argument `key` must be a Buffer or a string')
}
return Buffer.compare(tree_key, buf)
}
/**
* search `key` in AVL tree
* @param tree {Object}
* @param key {Buffer|String}
* @returns {Buffer|Object|null}
*/
function lookup(tree, key) {
if (!tree) {
return null
}
switch (compare(tree.key, key)) {
case 0:
return tree
case 1:
return lookup(tree.right, key)
case -1:
return lookup(tree.left, key)
default:
break
}
}
/**
* height of AVL tree
* @param tree {Object}
* @returns {number}
*/
function height(tree) {
return tree ? tree.height : -1
}
/**
* insert new key / value into AVL tree
* @param tree
* @param key
* @param value
* @returns {*}
*/
function add(tree, key, value) {
if (!tree) {
return create(key, value)
}
switch (compare(tree.key, key)) {
case -1:
tree.left = add(tree.left, key, value)
return balance(tree) == -2 ? add_left(tree, key) : patch(tree)
case 1:
tree.right = add(tree.right, key, value)
return balance(tree) == 2 ? add_right(tree, key) : patch(tree)
case 0:
tree.value = value
break
default:
break
}
return tree
}
function balance(tree) {
return height(tree.right) - height(tree.left)
}
function add_left(tree, key) {
switch (compare(tree.left.key, key)) {
case -1:
return rotate_right(tree)
case 1:
return rotate_left_right(tree)
default:
break
}
return tree
}
function add_right(tree, key) {
switch (compare(tree.right.key, key)) {
case -1:
return rotate_right_left(tree)
case 1:
return rotate_left(tree)
default:
break
}
return tree
}
function rotate_right(tree) {
const left = tree.left
tree.left = left.right
left.right = tree
patch(tree)
patch(left)
return left
}
function rotate_left(tree) {
const right = tree.right
tree.right = right.left
right.left = tree
patch(tree)
patch(right)
return right
}
function rotate_left_right(tree) {
tree.left = rotate_left(tree.left)
return rotate_right(tree)
}
function rotate_right_left(tree) {
tree.right = rotate_right(tree.right)
return rotate_left(tree)
}
function print(tree, level) {
level = level >>> 0
if (!tree) {
return
}
for(let i = 0; i < level; ++i) {
process.stdout.write("\t")
}
console.log("%s (h=%s, v=%s)", tree.key.toString(), tree.height, tree.value)
print(tree.left, level + 1)
print(tree.right, level + 1)
}
/**
* get all keys from AVL tree
* @param tree
* @returns {*}
*/
function keys(tree) {
return keys_internal(tree, [])
}
function keys_internal(tree, list) {
if (!tree) {
return list
}
list.push(tree.key.toString())
return keys_internal(tree.left, keys_internal(tree.right, list))
}
function patch(tree) {
tree.height = Math.max(height(tree.left), height(tree.right)) + 1
return tree
}
|
'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Volunteer = mongoose.model('Volunteer'),
agent = request.agent(app);
/**
* Globals
*/
var credentials, user, volunteer;
/**
* Volunteer routes tests
*/
describe('Volunteer CRUD tests', function() {
beforeEach(function(done) {
// Create user credentials
credentials = {
username: 'username',
password: 'password'
};
// Create a new user
user = new User({
firstName: 'Full',
lastName: 'Name',
displayName: 'Full Name',
email: 'test@test.com',
username: credentials.username,
password: credentials.password,
provider: 'local'
});
// Save a user to the test db and create new Volunteer
user.save(function() {
volunteer = {
name: 'Volunteer Name'
};
done();
});
});
it('should be able to save Volunteer instance if logged in', function(done) {
agent.post('/auth/signin')
.send(credentials)
.expect(200)
.end(function(signinErr, signinRes) {
// Handle signin error
if (signinErr) done(signinErr);
// Get the userId
var userId = user.id;
// Save a new Volunteer
agent.post('/volunteers')
.send(volunteer)
.expect(200)
.end(function(volunteerSaveErr, volunteerSaveRes) {
// Handle Volunteer save error
if (volunteerSaveErr) done(volunteerSaveErr);
// Get a list of Volunteers
agent.get('/volunteers')
.end(function(volunteersGetErr, volunteersGetRes) {
// Handle Volunteer save error
if (volunteersGetErr) done(volunteersGetErr);
// Get Volunteers list
var volunteers = volunteersGetRes.body;
// Set assertions
(volunteers[0].user._id).should.equal(userId);
(volunteers[0].name).should.match('Volunteer Name');
// Call the assertion callback
done();
});
});
});
});
it('should not be able to save Volunteer instance if not logged in', function(done) {
agent.post('/volunteers')
.send(volunteer)
.expect(401)
.end(function(volunteerSaveErr, volunteerSaveRes) {
// Call the assertion callback
done(volunteerSaveErr);
});
});
it('should not be able to save Volunteer instance if no name is provided', function(done) {
// Invalidate name field
volunteer.name = '';
agent.post('/auth/signin')
.send(credentials)
.expect(200)
.end(function(signinErr, signinRes) {
// Handle signin error
if (signinErr) done(signinErr);
// Get the userId
var userId = user.id;
// Save a new Volunteer
agent.post('/volunteers')
.send(volunteer)
.expect(400)
.end(function(volunteerSaveErr, volunteerSaveRes) {
// Set message assertion
(volunteerSaveRes.body.message).should.match('Please fill Volunteer name');
// Handle Volunteer save error
done(volunteerSaveErr);
});
});
});
it('should be able to update Volunteer instance if signed in', function(done) {
agent.post('/auth/signin')
.send(credentials)
.expect(200)
.end(function(signinErr, signinRes) {
// Handle signin error
if (signinErr) done(signinErr);
// Get the userId
var userId = user.id;
// Save a new Volunteer
agent.post('/volunteers')
.send(volunteer)
.expect(200)
.end(function(volunteerSaveErr, volunteerSaveRes) {
// Handle Volunteer save error
if (volunteerSaveErr) done(volunteerSaveErr);
// Update Volunteer name
volunteer.name = 'WHY YOU GOTTA BE SO MEAN?';
// Update existing Volunteer
agent.put('/volunteers/' + volunteerSaveRes.body._id)
.send(volunteer)
.expect(200)
.end(function(volunteerUpdateErr, volunteerUpdateRes) {
// Handle Volunteer update error
if (volunteerUpdateErr) done(volunteerUpdateErr);
// Set assertions
(volunteerUpdateRes.body._id).should.equal(volunteerSaveRes.body._id);
(volunteerUpdateRes.body.name).should.match('WHY YOU GOTTA BE SO MEAN?');
// Call the assertion callback
done();
});
});
});
});
it('should be able to get a list of Volunteers if not signed in', function(done) {
// Create new Volunteer model instance
var volunteerObj = new Volunteer(volunteer);
// Save the Volunteer
volunteerObj.save(function() {
// Request Volunteers
request(app).get('/volunteers')
.end(function(req, res) {
// Set assertion
res.body.should.be.an.Array.with.lengthOf(1);
// Call the assertion callback
done();
});
});
});
it('should be able to get a single Volunteer if not signed in', function(done) {
// Create new Volunteer model instance
var volunteerObj = new Volunteer(volunteer);
// Save the Volunteer
volunteerObj.save(function() {
request(app).get('/volunteers/' + volunteerObj._id)
.end(function(req, res) {
// Set assertion
res.body.should.be.an.Object.with.property('name', volunteer.name);
// Call the assertion callback
done();
});
});
});
it('should be able to delete Volunteer instance if signed in', function(done) {
agent.post('/auth/signin')
.send(credentials)
.expect(200)
.end(function(signinErr, signinRes) {
// Handle signin error
if (signinErr) done(signinErr);
// Get the userId
var userId = user.id;
// Save a new Volunteer
agent.post('/volunteers')
.send(volunteer)
.expect(200)
.end(function(volunteerSaveErr, volunteerSaveRes) {
// Handle Volunteer save error
if (volunteerSaveErr) done(volunteerSaveErr);
// Delete existing Volunteer
agent.delete('/volunteers/' + volunteerSaveRes.body._id)
.send(volunteer)
.expect(200)
.end(function(volunteerDeleteErr, volunteerDeleteRes) {
// Handle Volunteer error error
if (volunteerDeleteErr) done(volunteerDeleteErr);
// Set assertions
(volunteerDeleteRes.body._id).should.equal(volunteerSaveRes.body._id);
// Call the assertion callback
done();
});
});
});
});
it('should not be able to delete Volunteer instance if not signed in', function(done) {
// Set Volunteer user
volunteer.user = user;
// Create new Volunteer model instance
var volunteerObj = new Volunteer(volunteer);
// Save the Volunteer
volunteerObj.save(function() {
// Try deleting Volunteer
request(app).delete('/volunteers/' + volunteerObj._id)
.expect(401)
.end(function(volunteerDeleteErr, volunteerDeleteRes) {
// Set message assertion
(volunteerDeleteRes.body.message).should.match('User is not logged in');
// Handle Volunteer error error
done(volunteerDeleteErr);
});
});
});
afterEach(function(done) {
User.remove().exec();
Volunteer.remove().exec();
done();
});
}); |
version https://git-lfs.github.com/spec/v1
oid sha256:a03d3c78698a5ed09d5699c62d36ee9cbfb4263225fbe4a0e9d0a1ae179161f2
size 11551
|
module.exports = require("npm:once@1.3.3/once.js"); |
/* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState, convertToRaw, ContentState, Modifier } from 'draft-js';
import draftToHtml from 'draftjs-to-html';
import htmlToDraft from 'html-to-draftjs';
import { Editor } from 'react-draft-wysiwyg';
import Codemirror from 'react-codemirror';
import sampleEditorContent from '../../../util/sampleEditorContent';
const Installation = () => (
<div className="docs-section">
<h2>Using editor component</h2>
<div className="docs-desc">Package can be installed from node package manager using npm or yarn commands.</div>
<Codemirror
value={
'npm install -S react-draft-wysiwyg\n' +
'yarn add react-draft-wysiwyg'
}
options={{
lineNumbers: true,
readOnly: true,
}}
/>
<div className="docs-desc top-margined">
<div>Peer dependencies and the required versions.</div>
<ol>
<li>draft-js: 0.10.x</li>
<li>immutable: 3.x, 4.x</li>
<li>react: 0.13.x, 0.14.x, ^15.0.0-0, 15.x.x</li>
<li>react-dom: 0.13.x, 0.14.x, ^15.0.0-0, 15.x.x</li>
</ol>
</div>
</div>
);
export default Installation;
|
import CalendarLocale from 'rc-calendar/lib/locale/et_EE';
import TimePickerLocale from '../../time-picker/locale/et_EE';
// 统一合并为完整的 Locale
const locale = {
lang: Object.assign({ placeholder: 'Vali kuupäev', rangePlaceholder: ['Algus kuupäev', 'Lõpu kuupäev'] }, CalendarLocale),
timePickerLocale: Object.assign({}, TimePickerLocale),
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
export default locale;
|
export const MARKDOWN_CHANGED = 'MARKDOWN_CHANGED';
export const ENABLE_SCROLL_CHANGED = 'ENABLE_SCROLL_CHANGED';
export const RESET = 'RESET';
export const TOGGLE_SCROLLING = 'TOGGLE_SCROLLING';
|
var _div, _p;
(function () {
var _div2;
const AppItem = () => {
return _div || (_div = <div>child</div>);
};
class App extends React.Component {
render() {
return _div2 || (_div2 = <div>
{_p || (_p = <p>Parent</p>)}
<AppItem />
</div>);
}
}
});
|
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
var factory = require('../../../src/express/tables/middlewareFactory'),
executeOperation = require('../../../src/express/middleware/executeOperation'),
express = require('express'),
expect = require('chai').expect;
describe('azure-mobile-apps.express.tables.middlewareFactory', function () {
it('uses executeOperation for operation middleware if none was specified', function () {
var router = express.Router(),
configuration = {
middleware: {
execute: [],
get: []
}
};
factory(configuration, router, executeOperation());
expect(router.stack[0].route.stack.length).to.equal(3);
expect(router.stack[0].route.stack[1].handle.constructor).to.equal(Function); // used to test against executeOperation, no longer possible
});
it('returns router if no execution middleware was specified', function () {
var router = express.Router(),
configuration = {
middleware: {
execute: [],
get: []
}
};
var results = factory(configuration, router, executeOperation());
expect(results.length).to.equal(1);
expect(results[0]).to.equal(router);
})
it('arranges middleware onto router', function () {
var router = express.Router(),
configuration = {
middleware: {
execute: [testMiddleware],
get: [testMiddleware],
post: [testMiddleware, testMiddleware]
}
};
factory(configuration, router, executeOperation());
expect(router.stack.length).to.equal(8);
// too flaky
// expect(router.stack[0].route.methods.get).to.be.true;
// expect(router.stack[0].route.stack.length).to.equal(3);
// expect(router.stack[0].route.stack[1].handle).to.equal(testMiddleware);
//
// expect(router.stack[1].route.methods.post).to.be.true;
// expect(router.stack[1].route.stack.length).to.equal(4);
// expect(router.stack[1].route.stack[1].handle).to.equal(testMiddleware);
// expect(router.stack[1].route.stack[2].handle).to.equal(testMiddleware);
});
function testMiddleware(req, res, next) { }
})
|
#!/usr/bin/env node
var app = require("commander");
var getLists = require("./lib/get-lists");
var auth = require("./lib/auth");
app.description("List your lists").parse(process.argv);
function main() {
getLists(function(err, data) {
if (err) process.exit(1);
data.forEach(function(val, index, array) {
console.log("— " + val.title + " (" + val.tasks.length + ")");
});
});
}
auth(main);
|
/**
* Created by paul on 4/23/15.
*/
'use strict';
Meteor.publish('servers', function () {
var user = Meteor.users.findOne({_id: this.userId},{fields: {isAdmin: 1}});
if (!user || !user.isAdmin) {
return this.ready();
}
return Collections.Servers.find({});
});
|
import path from 'path'
import { CucumberAdapter } from '../lib/adapter'
const conf = {
cucumberOpts: {
timeout: 15000,
require: [path.join(__dirname, '/fixtures/retry-step-definition.js')]
}
}
const feature = ['./test/fixtures/retry.feature']
const NOOP = () => {}
const WebdriverIO = class {}
WebdriverIO.prototype = {
/**
* task of this command is to add 1 so we can have a simple demo test like
* browser.command(1).should.be.equal(2)
*/
url: () => new Promise((resolve) => {
setTimeout(() => resolve('url'), 1000)
}),
click: () => new Promise((resolve) => {
setTimeout(() => resolve('click'), 1000)
}),
getTitle: (ms = 500) => new Promise((resolve) => {
setTimeout(() => resolve('Google'), 1000)
}),
pause: (ms = 500) => new Promise((resolve) => {
setTimeout(() => resolve('pause'), 1000)
})
}
process.send = NOOP
let timeToExecute
describe('retryTest', () => {
describe('can retry failed step definitions', () => {
before(async () => {
global.browser = new WebdriverIO()
global.browser.options = {}
const adapter = new CucumberAdapter(0, conf, feature, {})
global.browser.getPrototype = () => WebdriverIO.prototype
const start = new Date().getTime();
(await adapter.run()).should.be.equal(0, 'actual test failed')
timeToExecute = new Date().getTime() - start
})
it('should take the expected amount of time to execute suite', () => {
timeToExecute.should.be.above(10000)
})
})
})
|
var config = require("../config/config")
, Sequelize = require("../../index")
, sequelize = new Sequelize(config.mysql.database, config.mysql.username, config.mysql.password, { pool: config.mysql.pool, logging: false, host: config.mysql.host, port: config.mysql.port })
, Helpers = new (require("../config/helpers"))(sequelize)
describe('BelongsTo', function() {
var User = null
, Task = null
var setup = function() {
User = sequelize.define('User', { username: Sequelize.STRING, enabled: {
type: Sequelize.BOOLEAN,
defaultValue: true
}})
Task = sequelize.define('Task', { title: Sequelize.STRING })
}
beforeEach(function() { Helpers.dropAllTables(); setup() })
afterEach(function() { Helpers.dropAllTables() })
it('adds the foreign key', function() {
Task.belongsTo(User)
expect(Task.attributes['UserId']).toEqual("INTEGER")
})
it("underscores the foreign key", function() {
Task = sequelize.define('Task', { title: Sequelize.STRING }, {underscored: true})
Task.belongsTo(User)
expect(Task.attributes['user_id']).toEqual("INTEGER")
})
it("uses the passed foreign key", function() {
Task.belongsTo(User, {foreignKey: 'person_id'})
expect(Task.attributes['person_id']).toEqual("INTEGER")
})
it("defines getters and setters", function() {
Task.belongsTo(User)
var task = Task.build({title: 'asd'})
expect(task.setUser).toBeDefined()
expect(task.getUser).toBeDefined()
})
it("aliases the getters and setters according to the passed 'as' option", function() {
Task.belongsTo(User, {as: 'Person'})
var task = Task.build({title: 'asd'})
expect(task.setPerson).toBeDefined()
expect(task.getPerson).toBeDefined()
})
it("aliases associations to the same table according to the passed 'as' option", function() {
Task.belongsTo(User, {as: 'Poster'})
Task.belongsTo(User, {as: 'Owner'})
var task = Task.build({title: 'asd'})
expect(task.getPoster).toBeDefined()
expect(task.setPoster).toBeDefined()
expect(task.getOwner).toBeDefined()
expect(task.setOwner).toBeDefined()
})
it("intializes the foreign key with null", function() {
Task.belongsTo(User)
var task = Task.build({title: 'asd'})
expect(task['UserId']).not.toBeDefined();
})
it("sets and gets the correct objects", function() {
Task.belongsTo(User, {as: 'User'})
Helpers.async(function(done) {
User.sync({force: true}).success(function() {
Task.sync({force: true}).success(done)
})
})
Helpers.async(function(done) {
User.create({username: 'asd'}).success(function(u) {
Task.create({title: 'a task'}).success(function(t) {
t.setUser(u).success(function() {
t.getUser().success(function(user) {
expect(user.username).toEqual('asd')
done()
})
})
})
})
})
})
it('extends the id where param with the supplied where params', function() {
Task.belongsTo(User, {as: 'User'})
Helpers.async(function(done) {
User.sync({force: true}).success(function() {
Task.sync({force: true}).success(done)
})
})
Helpers.async(function(done) {
User.create({username: 'asd', enabled: false}).success(function(u) {
Task.create({title: 'a task'}).success(function(t) {
t.setUser(u).success(function() {
t.getUser({where: {enabled: true}}).success(function(user) {
expect(user).toEqual(null)
done()
})
})
})
})
})
})
it("handles self associations", function() {
Helpers.async(function(done) {
var Person = sequelize.define('Person', { name: Sequelize.STRING })
Person.belongsTo(Person, {as: 'Mother', foreignKey: 'MotherId'})
Person.belongsTo(Person, {as: 'Father', foreignKey: 'FatherId'})
Person.sync({force: true}).success(function() {
var p = Person.build()
expect(p.setFather).toBeDefined()
expect(p.setMother).toBeDefined()
done()
})
})
})
it("sets the foreign key in self associations", function() {
var Person = sequelize.define('Person', { name: Sequelize.STRING })
Person.belongsTo(Person, {as: 'Mother'})
expect(Person.associations.MotherPersons.options.foreignKey).toEqual('MotherId')
})
})
|
if (Meteor.isClient) {
Template.samlDemo.events({
'click .saml-login': function(event, template){
event.preventDefault();
var provider = $(event.target).data('provider');
Meteor.loginWithSaml({
provider:provider
}, function(error, result){
//handle errors and result
});
}
});
} |
import Ember from 'ember';
export default Ember.Mixin.create({
classNameBindings:['hasFocus'],
hasFocus: false,
focusTarget: null,
focusIn(e){
if(this.get('focusTarget')){
if(!this.get('focusTraget.hasFocus')){
this.set('focusTraget.hasFocus', true);
}
} else {
if(!this.get('hasFocus')){
this.set('hasFocus', true);
}
}
},
focusOut(e){
if(this.get('focusTarget')){
if(this.get('focusTraget.hasFocus')){
this.set('focusTraget.hasFocus', false);
}
} else {
if(this.get('hasFocus')){
this.set('hasFocus', false);
}
}
}
});
|
/* globals describe, it, expect, beforeEach*/
import ParsersDicom from '../../src/parsers/parsers.dicom';
import ParsersNifti from '../../src/parsers/parsers.nifti';
let dicomDataset = {
format: 'dicom',
url: '/base/data/dicom/adi_slice.dcm',
parser: ParsersDicom,
};
let niftiDataset = {
format: 'nifti',
url: '/base/data/nifti/adi_slice.nii',
parser: ParsersNifti,
};
// let nrrdDataset = {
// format: 'nrrd',
// url: '/base/data/nrrd/adi_slice.nrrd',
// parser: ParsersNrrd
// };
function crop( value, decimals ){
return (Math.floor( Math.pow(10, decimals) * value) / Math.pow(10, decimals));
}
function test( dataset, datasetDicom ) {
let parserDicom = null;
beforeEach((done) => {
// fetch dicom data
let oReqDicom = new XMLHttpRequest();
oReqDicom.open('GET', datasetDicom.url, true);
oReqDicom.responseType = 'arraybuffer';
oReqDicom.onload = () => {
let buffer = oReqDicom.response;
if (buffer) {
parserDicom = new datasetDicom.parser({
url: datasetDicom.url,
buffer}
, 0);
done();
}
};
oReqDicom.send();
});
// test extraction of tags of interest
describe(dataset.format, function() {
let parser = null;
beforeEach((done) => {
// fetch other data
let oReqData = new XMLHttpRequest();
oReqData.open('GET', dataset.url, true);
oReqData.responseType = 'arraybuffer';
oReqData.onload = () => {
let buffer = oReqData.response;
if (buffer) {
parser = new dataset.parser({
url: dataset.url,
buffer}
, 0);
done();
}
};
oReqData.send();
});
it('image position', function() {
let frameIndex = 0;
let dicomImagePosition = parserDicom.imagePosition(frameIndex);
let imagePosition = parser.imagePosition(frameIndex);
expect( crop(imagePosition[0], 5 ) ).toBe( crop( dicomImagePosition[0], 5 ) );
expect( crop(imagePosition[1], 5 ) ).toBe( crop( dicomImagePosition[1], 5 ) );
expect( crop(imagePosition[2], 5 ) ).toBe( crop( dicomImagePosition[2], 5 ) );
});
it('pixel spacing', function() {
let frameIndex = 0;
let dicomPixelSpacing = parserDicom.pixelSpacing(frameIndex);
let pixelSpacing = parser.pixelSpacing(frameIndex);
// check typeof and length...
expect( crop(pixelSpacing[0], 5) ).toBe( crop(dicomPixelSpacing[0], 5) );
expect( crop(pixelSpacing[1], 5) ).toBe( crop(dicomPixelSpacing[1], 5) );
});
it('image orientation', function() {
let frameIndex = 0;
let dicomOrientation = parserDicom.imageOrientation(frameIndex);
let dataOrientation = parser.imageOrientation(frameIndex);
expect( crop(dataOrientation[0], 5 ) ).toBe(crop( dicomOrientation[0], 5 ) );
expect( crop(dataOrientation[1], 5 ) ).toBe(crop( dicomOrientation[1], 5 ) );
expect( crop(dataOrientation[2], 5 ) ).toBe(crop( dicomOrientation[2], 5 ) );
expect( crop(dataOrientation[3], 5 ) ).toBe(crop( dicomOrientation[3], 5 ) );
expect( crop(dataOrientation[4], 5 ) ).toBe(crop( dicomOrientation[4], 5 ) );
expect( crop(dataOrientation[5], 5 ) ).toBe(crop( dicomOrientation[5], 5 ) );
});
it('pixel data', function() {
let frameIndex = 0;
let rows = parser.rows(frameIndex);
let columns = parser.columns(frameIndex);
let dicomPixelData = parserDicom.extractPixelData(frameIndex);
let pixelData = parser.extractPixelData(frameIndex);
expect( pixelData.join() ).toEqual( dicomPixelData.join() );
});
});
}
describe('Orientation', function() {
test( niftiDataset, dicomDataset );
// test( nrrdDataset );
});
// test dataset that does not work anymore..
// does current visualization make sense?
// test first and last from siena |
/* eslint-disable camelcase */
const { setLocalNav } = require('../../middleware')
const { isItaTierDAccount } = require('../../../lib/is-tier-type-company')
const { LOCAL_NAV } = require('../constants')
function setCompaniesLocalNav(req, res, next) {
const { company } = res.locals
const isCoreTeamCompany =
!isItaTierDAccount(company) && company.one_list_group_tier
const navItems = LOCAL_NAV.map((item) =>
item.path === 'advisers' && isCoreTeamCompany
? { ...item, label: 'Core team' }
: item
)
setLocalNav(navItems)(req, res, next)
}
module.exports = setCompaniesLocalNav
|
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
chalk = require('chalk'),
glob = require('glob'),
fs = require('fs'),
path = require('path');
/**
* Get files by glob patterns
*/
var getGlobbedPaths = function (globPatterns, excludes) {
// URL paths regex
var urlRegex = new RegExp('^(?:[a-z]+:)?\/\/', 'i');
// The output array
var output = [];
// If glob pattern is array then we use each pattern in a recursive way, otherwise we use glob
if (_.isArray(globPatterns)) {
globPatterns.forEach(function (globPattern) {
output = _.union(output, getGlobbedPaths(globPattern, excludes));
});
} else if (_.isString(globPatterns)) {
if (urlRegex.test(globPatterns)) {
output.push(globPatterns);
} else {
var files = glob.sync(globPatterns);
if (excludes) {
files = files.map(function (file) {
if (_.isArray(excludes)) {
for (var i in excludes) {
file = file.replace(excludes[i], '');
}
} else {
file = file.replace(excludes, '');
}
return file;
});
}
output = _.union(output, files);
}
}
return output;
};
/**
* Validate NODE_ENV existence
*/
var validateEnvironmentVariable = function () {
var environmentFiles = glob.sync('./config/env/' + process.env.NODE_ENV + '.js');
console.log();
if (!environmentFiles.length) {
if (process.env.NODE_ENV) {
console.error(chalk.red('+ Error: No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead'));
} else {
console.error(chalk.red('+ Error: NODE_ENV is not defined! Using default development environment'));
}
process.env.NODE_ENV = 'development';
}
// Reset console color
console.log(chalk.white(''));
};
/**
* Validate Secure=true parameter can actually be turned on
* because it requires certs and key files to be available
*/
var validateSecureMode = function (config) {
if (!config.secure || config.secure.ssl !== true) {
return true;
}
var privateKey = fs.existsSync(path.resolve(config.secure.privateKey));
var certificate = fs.existsSync(path.resolve(config.secure.certificate));
if (!privateKey || !certificate) {
console.log(chalk.red('+ Error: Certificate file or key file is missing, falling back to non-SSL mode'));
console.log(chalk.red(' To create them, simply run the following from your shell: sh ./scripts/generate-ssl-certs.sh'));
console.log();
config.secure.ssl = false;
}
};
/**
* Validate Session Secret parameter is not set to default in production
*/
var validateSessionSecret = function (config, testing) {
if (process.env.NODE_ENV !== 'production') {
return true;
}
if (config.sessionSecret === 'MEAN') {
if (!testing) {
console.log(chalk.red('+ WARNING: It is strongly recommended that you change sessionSecret config while running in production!'));
console.log(chalk.red(' Please add `sessionSecret: process.env.SESSION_SECRET || \'super amazing secret\'` to '));
console.log(chalk.red(' `config/env/production.js` or `config/env/local.js`'));
console.log();
}
return false;
} else {
return true;
}
};
/**
* Initialize global configuration files
*/
var initGlobalConfigFolders = function (config, assets) {
// Appending files
config.folders = {
server: {},
client: {}
};
// Setting globbed client paths
config.folders.client = getGlobbedPaths(path.join(process.cwd(), 'modules/*/client/'), process.cwd().replace(new RegExp(/\\/g), '/'));
};
/**
* Initialize global configuration files
*/
var initGlobalConfigFiles = function (config, assets) {
// Appending files
config.files = {
server: {},
client: {}
};
// Setting Globbed model files
config.files.server.models = getGlobbedPaths(assets.server.models);
// Setting Globbed route files
config.files.server.routes = getGlobbedPaths(assets.server.routes);
// Setting Globbed config files
config.files.server.configs = getGlobbedPaths(assets.server.config);
// Setting Globbed socket files
config.files.server.sockets = getGlobbedPaths(assets.server.sockets);
// Setting Globbed policies files
config.files.server.policies = getGlobbedPaths(assets.server.policies);
// Setting Globbed js files
config.files.client.js = getGlobbedPaths(assets.client.lib.js, 'public/').concat(getGlobbedPaths(assets.client.js, ['public/']));
// Setting Globbed css files
config.files.client.css = getGlobbedPaths(assets.client.lib.css, 'public/').concat(getGlobbedPaths(assets.client.css, ['public/']));
// Setting Globbed test files
config.files.client.tests = getGlobbedPaths(assets.client.tests);
};
/**
* Initialize global configuration
*/
var initGlobalConfig = function () {
// Validate NODE_ENV existence
validateEnvironmentVariable();
// Get the default assets
var defaultAssets = require(path.join(process.cwd(), 'config/assets/default'));
// Get the current assets
var environmentAssets = require(path.join(process.cwd(), 'config/assets/', process.env.NODE_ENV)) || {};
// Merge assets
var assets = _.merge(defaultAssets, environmentAssets);
// Get the default config
var defaultConfig = require(path.join(process.cwd(), 'config/env/default'));
// Get the current config
var environmentConfig = require(path.join(process.cwd(), 'config/env/', process.env.NODE_ENV)) || {};
// Merge config files
var config = _.merge(defaultConfig, environmentConfig);
// read package.json for MEAN.JS project information
var pkg = require(path.resolve('./package.json'));
config.meanjs = pkg;
// Extend the config object with the local-NODE_ENV.js custom/local environment. This will override any settings present in the local configuration.
config = _.merge(config, (fs.existsSync(path.join(process.cwd(), 'config/env/local-' + process.env.NODE_ENV + '.js')) && require(path.join(process.cwd(), 'config/env/local-' + process.env.NODE_ENV + '.js'))) || {});
// Initialize global globbed files
initGlobalConfigFiles(config, assets);
// Initialize global globbed folders
initGlobalConfigFolders(config, assets);
// Validate Secure SSL mode can be used
validateSecureMode(config);
// Validate session secret
validateSessionSecret(config);
// Expose configuration utilities
config.utils = {
getGlobbedPaths: getGlobbedPaths,
validateSessionSecret: validateSessionSecret
};
return config;
};
/**
* Set configuration object
*/
module.exports = initGlobalConfig();
|
var pull = require('pull-level')
var toStream = require('pull-stream-to-stream')
var liveStream = module.exports = function (db, opts) {
var ts
opts = opts || {}
opts.tail = opts.tail !== false
if(opts.old === false)
return toStream(null, pull.live(db, opts))
opts.onSync = function () {
ts.emit('sync')
}
return ts = toStream(null, pull.read(db, opts))
}
module.exports.install = function (db) {
db.methods = db.methods || {}
db.methods['liveStream'] =
db.methods['createLiveStream'] = {type: 'readable'}
db.liveStream =
db.createLiveStream =
function (opts) {
return liveStream(db, opts)
}
}
|
//>>built
define({blockquote:"Blokksitat"}); |
/*!
* https://github.com/gilmoreorless/css-shorthand-properties
* MIT Licensed: http://gilmoreorless.mit-license.org/
*/
(function (exports) {
/**
* Data collated from multiple W3C specs: http://www.w3.org/Style/CSS/current-work
* Only specs that are Candidate Recommendations or better are counted, with the
* exception of some Working Drafts that have a lot of traction in browser implementations.
* So far the WD specs included here are Animation, Transitions and Flexbox.
*
* @type {Object}
*/
var props = exports.shorthandProperties = {
// CSS 2.1: http://www.w3.org/TR/CSS2/propidx.html
'list-style': ['-type', '-position', '-image'],
'margin': ['-top', '-right', '-bottom', '-left'],
'outline': ['-width', '-style', '-color'],
'padding': ['-top', '-right', '-bottom', '-left'],
// CSS Backgrounds and Borders Module Level 3: http://www.w3.org/TR/css3-background/
'background': ['-image', '-position', '-size', '-repeat', '-origin', '-clip', '-attachment', '-color'],
'border': ['-width', '-style', '-color'],
'border-color': ['border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color'],
'border-style': ['border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style'],
'border-width': ['border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'],
'border-top': ['-width', '-style', '-color'],
'border-right': ['-width', '-style', '-color'],
'border-bottom': ['-width', '-style', '-color'],
'border-left': ['-width', '-style', '-color'],
'border-radius': ['border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'],
'border-image': ['-source', '-slice', '-width', '-outset', '-repeat'],
// CSS Fonts Module Level 3: http://www.w3.org/TR/css3-fonts/
'font': ['-style', '-variant', '-weight', '-stretch', '-size', 'line-height', '-family'],
'font-variant': ['-ligatures', '-alternates', '-caps', '-numeric', '-east-asian'],
// CSS Masking Module Level 1: http://www.w3.org/TR/css-masking/
'mask': ['-image', '-mode', '-position', '-size', '-repeat', '-origin', '-clip'],
'mask-border': ['-source', '-slice', '-width', '-outset', '-repeat', '-mode'],
// CSS Multi-column Layout Module: http://www.w3.org/TR/css3-multicol/
'columns': ['column-width', 'column-count'],
'column-rule': ['-width', '-style', '-color'],
// CSS Speech Module: http://www.w3.org/TR/css3-speech/
'cue': ['-before', '-after'],
'pause': ['-before', '-after'],
'rest': ['-before', '-after'],
// CSS Text Decoration Module Level 3: http://www.w3.org/TR/css-text-decor-3/
'text-decoration': ['-line', '-style', '-color'],
'text-emphasis': ['-style', '-color'],
// CSS Animations (WD): http://www.w3.org/TR/css3-animations
'animation': ['-name', '-duration', '-timing-function', '-delay', '-iteration-count', '-direction', '-fill-mode', '-play-state'],
// CSS Transitions (WD): http://www.w3.org/TR/css3-transitions/
'transition': ['-property', '-duration', '-timing-function', '-delay'],
// CSS Flexible Box Layout Module Level 1 (WD): http://www.w3.org/TR/css3-flexbox/
'flex': ['-grow', '-shrink', '-basis']
};
/**
* Expand a shorthand property into an array of longhand properties
* @param {string} property CSS property name
* @param {boolean} recurse Expand sub-properties, when applicable - default false
* @return {array} List of longhand properties, or the original property if it's not a shorthand
*/
exports.expand = function (property, recurse) {
if (!props.hasOwnProperty(property)) {
return [property];
}
return props[property].map(function (p) {
var longhand = p.substr(0, 1) === '-' ? property + p : p;
return recurse ? exports.expand(longhand, recurse) : longhand;
});
};
})((function (root) {
// CommonJS
if (typeof module !== 'undefined' && module.exports !== undefined) return module.exports;
// Global `cssShorthandProps`
return (root.cssShorthandProps = {});
})(this));
|
var SingleObserver = (function(__super__) {
inherits(SingleObserver, __super__);
function SingleObserver(o, obj, s) {
this._o = o;
this._obj = obj;
this._s = s;
this._i = 0;
this._hv = false;
this._v = null;
__super__.call(this);
}
SingleObserver.prototype.next = function (x) {
var shouldYield = false;
if (this._obj.predicate) {
var res = tryCatch(this._obj.predicate)(x, this._i++, this._s);
if (res === errorObj) { return this._o.onError(res.e); }
Boolean(res) && (shouldYield = true);
} else if (!this._obj.predicate) {
shouldYield = true;
}
if (shouldYield) {
if (this._hv) {
return this._o.onError(new Error('Sequence contains more than one matching element'));
}
this._hv = true;
this._v = x;
}
};
SingleObserver.prototype.error = function (e) { this._o.onError(e); };
SingleObserver.prototype.completed = function () {
if (this._hv) {
this._o.onNext(this._v);
this._o.onCompleted();
}
else if (this._obj.defaultValue === undefined) {
this._o.onError(new EmptyError());
} else {
this._o.onNext(this._obj.defaultValue);
this._o.onCompleted();
}
};
return SingleObserver;
}(AbstractObserver));
/**
* Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence.
* @returns {Observable} Sequence containing the single element in the observable sequence that satisfies the condition in the predicate.
*/
observableProto.single = function (predicate, thisArg) {
var obj = {}, source = this;
if (typeof arguments[0] === 'object') {
obj = arguments[0];
} else {
obj = {
predicate: arguments[0],
thisArg: arguments[1],
defaultValue: arguments[2]
};
}
if (isFunction (obj.predicate)) {
var fn = obj.predicate;
obj.predicate = bindCallback(fn, obj.thisArg, 3);
}
return new AnonymousObservable(function (o) {
return source.subscribe(new SingleObserver(o, obj, source));
}, source);
};
|
define(['Chance', 'mocha', 'chai', 'underscore'], function (Chance, mocha, chai, _) {
var expect = chai.expect;
describe("Dice", function () {
var die, dice, chance = new Chance();
it("returns a properly bounded d4", function () {
_(1000).times(function () {
die = chance.d4();
expect(die).to.be.within(1, 4);
});
});
it("returns a properly bounded d6", function () {
_(1000).times(function () {
die = chance.d6();
expect(die).to.be.within(1, 6);
});
});
it("returns a properly bounded d8", function () {
_(1000).times(function () {
die = chance.d8();
expect(die).to.be.within(1, 8);
});
});
it("returns a properly bounded d10", function () {
_(1000).times(function () {
die = chance.d10();
expect(die).to.be.within(1, 10);
});
});
it("returns a properly bounded d12", function () {
_(1000).times(function () {
die = chance.d12();
expect(die).to.be.within(1, 12);
});
});
it("returns a properly bounded d20", function () {
_(1000).times(function () {
die = chance.d20();
expect(die).to.be.within(1, 20);
});
});
it("returns a properly bounded d30", function () {
_(1000).times(function () {
die = chance.d30();
expect(die).to.be.within(1, 30);
});
});
it("returns a properly bounded d100", function () {
_(1000).times(function () {
die = chance.d100();
expect(die).to.be.within(1, 100);
});
});
it("rpg() appears to work as expected", function () {
_(1000).times(function () {
expect(function () { chance.rpg(); }).to.throw(Error);
expect(function () { chance.rpg("3"); }).to.throw(Error);
expect(function () { chance.rpg("hd23"); }).to.throw(Error);
expect(function () { chance.rpg("3d23d2"); }).to.throw(Error);
dice = chance.rpg('5d20');
expect(dice).to.be.an.array;
expect(dice).to.have.length(5);
_.map(dice, function (die) {
expect(die).to.be.within(1, 20);
});
});
});
it("rpg() will take and obey a sum", function () {
var rpg = 0;
_(1000).times(function () {
rpg = chance.rpg('4d20', {sum: true});
expect(rpg).to.be.a.number;
expect(rpg).to.be.within(4, 80);
});
});
});
describe("Mac Address", function () {
var mac, chance = new Chance();
it("returns a proper mac address", function () {
_(1000).times(function () {
mac = chance.mac_address();
expect(mac).to.match(/([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}/);
});
});
it("returns a proper colon separated mac address", function () {
_(1000).times(function () {
mac = chance.mac_address({separator: ":"});
expect(mac).to.match(/([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}:([0-9a-fA-F]){2}/);
});
});
it("returns a proper hyphen separated mac address", function () {
_(1000).times(function () {
mac = chance.mac_address({separator:"-"});
expect(mac).to.match(/([0-9a-fA-F]){2}-([0-9a-fA-F]){2}-([0-9a-fA-F]){2}-([0-9a-fA-F]){2}-([0-9a-fA-F]){2}-([0-9a-fA-F]){2}/);
});
});
it("returns a proper network version mac address", function () {
_(1000).times(function () {
mac = chance.mac_address({networkVersion:true});
expect(mac).to.match(/([0-9a-fA-F]){4}.([0-9a-fA-F]){4}.([0-9a-fA-F]){4}/);
});
});
});
describe("Apple Token", function(){
var apple_token, chance = new Chance();
it("returns a proper apple token", function () {
_(1000).times(function () {
apple_token = chance.apple_token();
expect(apple_token).to.match(/([0-9a-fA-F]){64}/);
});
});
});
describe("Guid", function () {
var guid, chance = new Chance();
it("returns a proper guid", function () {
_(1000).times(function () {
guid = chance.guid();
expect(guid).to.match(/([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}/);
});
});
it("returns a proper version 1 guid", function () {
_(1000).times(function () {
guid = chance.guid({version: 1});
expect(guid).to.match(/([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-1([0-9a-fA-F]){3}-([ab89])([0-9a-fA-F]){3}-([0-9a-fA-F]){12}/);
});
});
it("returns a proper version 2 guid", function () {
_(1000).times(function () {
guid = chance.guid({version: 2});
expect(guid).to.match(/([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-2([0-9a-fA-F]){3}-([ab89])([0-9a-fA-F]){3}-([0-9a-fA-F]){12}/);
});
});
it("returns a proper version 3 guid", function () {
_(1000).times(function () {
guid = chance.guid({version: 3});
expect(guid).to.match(/([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-3([0-9a-fA-F]){3}-([ab89])([0-9a-fA-F]){3}-([0-9a-fA-F]){12}/);
});
});
it("returns a proper version 4 guid", function () {
_(1000).times(function () {
guid = chance.guid({version: 4});
expect(guid).to.match(/([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-4([0-9a-fA-F]){3}-([ab89])([0-9a-fA-F]){3}-([0-9a-fA-F]){12}/);
});
});
it("returns a proper version 5 guid", function () {
_(1000).times(function () {
guid = chance.guid({version: 5});
expect(guid).to.match(/([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-5([0-9a-fA-F]){3}-([ab89])([0-9a-fA-F]){3}-([0-9a-fA-F]){12}/);
});
});
});
describe("Hash", function () {
var hash, length, chance = new Chance();
it("returns a proper hash", function () {
_(1000).times(function () {
hash = chance.hash();
expect(hash).to.match(/([0-9a-f]){40}/);
expect(hash).to.have.length(40);
});
});
it("obeys length, if supplied", function () {
_(1000).times(function () {
length = chance.natural({min: 1, max: 64});
hash = chance.hash({length: length});
expect(hash).to.have.length(length);
});
});
});
describe("Mixin", function () {
var chance = new Chance();
it("exists", function () {
expect(chance).to.have.property('mixin');
});
it("works with a simple function", function () {
chance.mixin({
'user': function () {
return {
first: chance.first(),
last: chance.last(),
email: chance.email()
};
}
});
expect(chance).to.have.property('user');
_(1000).times(function () {
expect(chance.user()).to.be.ok;
expect(chance.user()).to.have.property('first');
});
});
it("multiple mixins work, can call previously defined mixins", function () {
chance.mixin({
'user': function () {
return {
first: chance.first(),
last: chance.last(),
email: chance.email()
};
},
'social_user': function () {
var user = chance.user();
user.network = chance.pick(['facebook', 'twitter']);
return user;
}
});
expect(chance).to.have.property('social_user');
_(1000).times(function () {
expect(chance.social_user()).to.be.ok;
expect(chance.social_user()).to.have.property('first');
expect(chance.social_user()).to.have.property('network');
});
});
});
});
|
var game = new PhaserNano.Game(800, 600, 'canvas', '', { preload: preload, create: create, update: update, render: render });
function preload () {
game.load.path = 'assets/';
game.load.image('sky2');
game.load.atlas('atlas_hash_trim');
}
var layer;
function create() {
game.add.sprite(0, 0, 'sky2');
layer = game.add.layer(400, 300);
// layer.scale.set(2);
var sprite;
for (var x = 0; x < (64 * 9); x += 64)
{
sprite = layer.create.sprite(-256 + x, 0, 'atlas_hash_trim', 'diamond');
sprite.anchor.set(0.5);
if (x % 128)
{
sprite.scale.y = -1;
}
}
for (var y = 0; y < (64 * 9); y += 64)
{
sprite = layer.create.sprite(0, -256 + y, 'atlas_hash_trim', 'diamond');
sprite.anchor.set(0.5);
if (y % 128)
{
sprite.scale.y = -1;
}
}
}
function update() {
layer.rotation += 0.01;
}
function render() {
}
|
// [VexFlow](http://vexflow.com) - Copyright (c) Mohit Muthanna 2010.
//
// ## Description
// Implements time signatures glyphs for staffs
// See tables.js for the internal time signatures
// representation
import { Vex } from './vex';
import { Glyph } from './glyph';
import { StaveModifier } from './stavemodifier';
const assertIsValidFraction = (timeSpec) => {
const numbers = timeSpec.split('/').filter((number) => number !== '');
if (numbers.length !== 2) {
throw new Vex.RERR(
'BadTimeSignature',
`Invalid time spec: ${timeSpec}. Must be in the form "<numerator>/<denominator>"`
);
}
numbers.forEach((number) => {
if (isNaN(Number(number))) {
throw new Vex.RERR('BadTimeSignature', `Invalid time spec: ${timeSpec}. Must contain two valid numbers.`);
}
});
};
export class TimeSignature extends StaveModifier {
static get CATEGORY() {
return 'timesignatures';
}
static get glyphs() {
return {
C: {
code: 'timeSigCommon',
point: 40,
line: 2,
},
'C|': {
code: 'timeSigCutCommon',
point: 40,
line: 2,
},
};
}
constructor(timeSpec = null, customPadding = 15, validate_args = true) {
super();
this.setAttribute('type', 'TimeSignature');
this.validate_args = validate_args;
if (timeSpec === null) return;
const padding = customPadding;
this.point = this.musicFont.lookupMetric('digits.point');
const fontLineShift = this.musicFont.lookupMetric('digits.shiftLine', 0);
this.topLine = 2 + fontLineShift;
this.bottomLine = 4 + fontLineShift;
this.setPosition(StaveModifier.Position.BEGIN);
this.setTimeSig(timeSpec);
this.setWidth(this.timeSig.glyph.getMetrics().width);
this.setPadding(padding);
}
getCategory() {
return TimeSignature.CATEGORY;
}
parseTimeSpec(timeSpec) {
if (timeSpec === 'C' || timeSpec === 'C|') {
const { line, code, point } = TimeSignature.glyphs[timeSpec];
return {
line,
num: false,
glyph: new Glyph(code, point),
};
}
if (this.validate_args) {
assertIsValidFraction(timeSpec);
}
const [topDigits, botDigits] = timeSpec.split('/').map((number) => number.split(''));
return {
num: true,
glyph: this.makeTimeSignatureGlyph(topDigits, botDigits),
};
}
makeTimeSignatureGlyph(topDigits, botDigits) {
const glyph = new Glyph('timeSig0', this.point);
glyph.topGlyphs = [];
glyph.botGlyphs = [];
let topWidth = 0;
for (let i = 0; i < topDigits.length; ++i) {
const num = topDigits[i];
const topGlyph = new Glyph('timeSig' + num, this.point);
glyph.topGlyphs.push(topGlyph);
topWidth += topGlyph.getMetrics().width;
}
let botWidth = 0;
for (let i = 0; i < botDigits.length; ++i) {
const num = botDigits[i];
const botGlyph = new Glyph('timeSig' + num, this.point);
glyph.botGlyphs.push(botGlyph);
botWidth += botGlyph.getMetrics().width;
}
const width = topWidth > botWidth ? topWidth : botWidth;
const xMin = glyph.getMetrics().x_min;
glyph.getMetrics = () => ({
x_min: xMin,
x_max: xMin + width,
width,
});
const topStartX = (width - topWidth) / 2.0;
const botStartX = (width - botWidth) / 2.0;
const that = this;
glyph.renderToStave = function renderToStave(x) {
let start_x = x + topStartX;
for (let i = 0; i < this.topGlyphs.length; ++i) {
const glyph = this.topGlyphs[i];
Glyph.renderOutline(
this.context,
glyph.metrics.outline,
glyph.scale,
start_x + glyph.x_shift,
this.stave.getYForLine(that.topLine)
);
start_x += glyph.getMetrics().width;
}
start_x = x + botStartX;
for (let i = 0; i < this.botGlyphs.length; ++i) {
const glyph = this.botGlyphs[i];
that.placeGlyphOnLine(glyph, this.stave, glyph.line);
Glyph.renderOutline(
this.context,
glyph.metrics.outline,
glyph.scale,
start_x + glyph.x_shift,
this.stave.getYForLine(that.bottomLine)
);
start_x += glyph.getMetrics().width;
}
};
return glyph;
}
getTimeSig() {
return this.timeSig;
}
setTimeSig(timeSpec) {
this.timeSig = this.parseTimeSpec(timeSpec);
return this;
}
draw() {
if (!this.x) {
throw new Vex.RERR('TimeSignatureError', "Can't draw time signature without x.");
}
if (!this.stave) {
throw new Vex.RERR('TimeSignatureError', "Can't draw time signature without stave.");
}
this.setRendered();
this.timeSig.glyph.setStave(this.stave);
this.timeSig.glyph.setContext(this.stave.context);
this.placeGlyphOnLine(this.timeSig.glyph, this.stave, this.timeSig.line);
this.timeSig.glyph.renderToStave(this.x);
}
}
|
$(document).ready(function(){
var name = $('#name');
if (name.length > 0){
$('#whoareyou').submit(function(e){
if ($.trim(name.val()).length < 1) {
e.preventDefault();
$('div.control-group').addClass('error');
$('<div class="alert alert-error">You must enter in your name.</div>').prependTo('#container');
}
});
}
var msg = $('#msg');
if (msg.length > 0){
$('#send').submit(function(e){
if ($.trim(msg.val()).length < 1) {
e.preventDefault();
$('div.control-group').addClass('error');
$('<div class="alert alert-error">You must enter in a message</div>').prependTo('#container');
}
});
}
}); |
var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');
/* GET home page. */
router.get('/', function(req, res, next) {
// TODO: set this from database value
res.render('index', { title: 'Broadsword' });
});
module.exports = router;
|
'use strict';
describe('Service: authService', function () {
// load the service's module
beforeEach(module('tbsApp'));
// instantiate service
var authService;
beforeEach(inject(function (_authService_) {
authService = _authService_;
}));
it('should do something', function () {
expect(!!authService).toBe(true);
});
});
|
import './Button';
|
import { get, set } from "@ember/object";
function factory( fn ) {
/**
* @param {Enumerable} enumerable
* @param {...*} args
* @returns {Array}
*/
return function( enumerable, ...args ) {
const meta = get( enumerable, "meta" );
enumerable = enumerable[ fn ]( ...args );
if ( meta ) {
set( enumerable, "meta", meta );
}
return enumerable;
};
}
export const toArray = factory( "toArray" );
export const mapBy = factory( "mapBy" );
|
import less from 'less/lib/less'
export function addStyleSheet(str) {
less().render(str, (e, output) => {
if(e){
utils.exception.error(e)
return
}
var s = document.querySelector('#mk-meta-design-dynamic-style')
if (s)
s.remove()
var head = document.head || document.getElementsByTagName('head')[0]
var style = document.createElement('style')
style.id = 'mk-meta-design-dynamic-style'
style.type = 'text/css'
style.innerHTML = output.css
head.appendChild(style)
})
}
export default {
addStyleSheet
} |
(function() {
'use strict';
describe('user.client.controller.settings.social.js', function () {
var $scope,
$rootScope,
SocialAccountsController,
Authentication,
$httpBackend;
beforeEach(module('users'));
beforeEach(inject(function(_$rootScope_, $controller, _Authentication_, _$httpBackend_, _User_) {
$rootScope = _$rootScope_;
$scope = $rootScope.$new();
_Authentication_.user = new _User_();
SocialAccountsController = $controller('SocialAccountsController as vm', {
$scope: $scope,
Authentication: _Authentication_
});
$httpBackend = _$httpBackend_;
}));
describe('SocialAccountsController', function () {
it('should have a vm variable', function () {
expect($scope.vm).to.be.an('object');
});
describe('vm', function () {
it('should have a property providers that is an array', function () {
expect($scope.vm.providers).to.be.an('array');
expect($scope.vm.providers.length).to.equal(6);
});
it('should have a property user that is an object', function () {
expect($scope.vm.user).to.be.an('object');
});
it('should have a property remove that is a function', function () {
expect($scope.vm.remove).to.be.an('function');
});
describe('remove()', function () {
it('should set error and success to undefined', function () {
$scope.vm.success = 'test';
$scope.vm.error = 'test';
$scope.vm.remove();
expect($scope.vm.success).to.equal(undefined);
expect($scope.vm.error).to.equal(undefined);
});
//TODO Complete when server rework is done with JWT
});
});
});
});
})();
|
function reportError(msg) {
// Show the error in the form:
$('#payment-errors').text(msg).addClass('error');
// Re-enable the submit button:
$('#submitBtn').prop('disabled', false);
return false;
}
$(document).ready(function() {
// Watch for a form submission:
$("#payment-form").submit(function(event) {
//Flag variable:
var error = false;
//disable submit button to prevent repeated clicking
$('#submitBtn').attr('disabled', 'disabled');
// Get the values:
var ccNum = $('.number').val(),
cvcNum = $('.cvc').val(),
expMonth = $('.exp-month').val(),
expYear = $('.exp-year').val();
// Validate the number:
if (!Stripe.card.validateCardNumber(ccNum)) {
error = true;
reportError('The credit card number appears to be invalid.');
}
// Validate the CVC:
if (!Stripe.card.validateCVC(cvcNum)) {
error = true;
reportError('The CVC number appears to be invalid.');
}
// Validate the expiration:
if (!Stripe.card.validateExpiry(expMonth, expYear)) {
error = true;
reportError('The expiration date appears to be invalid.');
}
// Check for errors:
if (!error) {
// Get the Stripe token:
Stripe.card.createToken({
number: ccNum,
cvc: cvcNum,
exp_month: expMonth,
exp_year: expYear
}, stripeResponseHandler);
}
//Prevent the form from submitting:
return false;
}); // form submission
}); // document ready.
//Function handles the Stripe response:
function stripeResponseHandler(status, response) {
if (response.error) {
reportError(response.error.message);
} else { // No errors, submit the form.
// Get a reference to the form:
var f = $("#payment-form");
// Get the token from the response:
var token = response['id'];
// Add the token to the form:
f.append('<input type="hidden" name="stripeToken" value="' + token + '" />');
// Submit the form:
f.get(0).submit();
}
}
|
//#region Copyright, Version, and Description
/*
* Copyright 2015 IdeaBlade, Inc. All Rights Reserved.
* Use, reproduction, distribution, and modification of this code is subject to the terms and
* conditions of the IdeaBlade Breeze license, available at http://www.breezejs.com/license
*
* Author: Ward Bell
* Version: 1.0.7
* --------------------------------------------------------------------------------
* Adds metadataHelper extensions to Breeze
* Source:
* https://github.com/Breeze/breeze.js.labs/blob/master/breeze.metadata-helper.js
*
* Depends on Breeze which it patches
*
* You can use these helpers when creating metadata by hand
* to improve workflow and reduce data entry errors.
*
* The helpers reflect an opinion about developer workflow
* that may or may not work for you.
* Use these helpers "as is" or use for inspiration in creating your own.
*
* For example usage, see:
* https://github.com/Breeze/breeze.js.samples/blob/master/net/DocCode/DocCode/tests/helpers/metadataOnClient.js
*
* For a discussion of how they work and why, see:
* http://www.breezejs.com/documentation/metadata-by-hand#addTypeToStore
*
*/
//#endregion
// ReSharper disable InconsistentNaming
(function (definition) {
if (typeof breeze === "object") {
definition(breeze);
} else if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
// CommonJS or Node
var b = require('breeze-client');
definition(b);
} else if (typeof define === "function" && define["amd"]) {
// Requirejs / AMD
define(['breeze-client'], definition);
} else {
throw new Error("Can't find breeze");
}
}(function (breeze) {
'use strict';
// MetadataHelper constructor
var helper = function (defaultNamespace, defaultAutoGeneratedKeyType) {
this.defaultNamespace = defaultNamespace || '';
this.defaultAutoGeneratedKeyType =
defaultAutoGeneratedKeyType ||
breeze.AutoGeneratedKeyType.None;
};
helper.prototype = {
constructor: helper,
addDataService: addDataService,
addTypeNameAsResource: addTypeNameAsResource,
addTypeToStore: addTypeToStore,
convertValidators: convertValidators,
findEntityKey: findEntityKey,
inferDefaultResourceName: inferDefaultResourceName,
inferValidators: inferValidators,
patch: patch,
pluralize: pluralize,
replaceDataPropertyAliases: replaceDataPropertyAliases,
replaceNavPropertyAliases: replaceNavPropertyAliases,
setDefaultAutoGeneratedKeyType: setDefaultAutoGeneratedKeyType,
setDefaultNamespace: setDefaultNamespace,
_hasOwnProperty: _hasOwnProperty,
_isArray: _isArray
};
breeze.config.MetadataHelper = helper;
var DT = breeze.DataType;
var Validator = breeze.Validator;
function addDataService(store, serviceName) {
store.addDataService(
new breeze.DataService({ serviceName: serviceName })
);
}
// Create the type from the definition hash and add the type to the store
// fixes some defaults, infers certain validators,
// add adds the type's "shortname" as a resource name
function addTypeToStore(store, typeDef) {
this.patch(typeDef);
var type = typeDef.isComplexType ?
new breeze.ComplexType(typeDef) :
new breeze.EntityType(typeDef);
store.addEntityType(type);
this.inferValidators(type);
this.addTypeNameAsResource(store, type);
return type;
}
// Often helpful to have the type's 'shortName' available as a resource name
// as when composing a query to be executed locally against the cache.
// This function adds the type's 'shortName' as one of the resource names for the type.
// Theoretically two types in different models could have the same 'shortName'
// and thus we would associate the same resource name with the two different types.
// While unlikely, breeze should offer a way to remove a resource name for a type.
function addTypeNameAsResource(store, type) {
if (!type.isComplexType) {
store.setEntityTypeForResourceName(type.shortName, type);
}
}
// While Breeze requires that the validators collection be defined with Validator instances
// we support alternative expression of validators in JSON form (as if coming from the server)
// Validator:
// phone: { maxLength: 24, validators: [ Validator.phone() ] },
// JSON:
// phone: { maxLength: 24, validators: [ {name: 'phone'} ] },
// This fn converts JSON to a Validator instance
function convertValidators(typeName, propName, propDef) {
var validators = propDef.validators;
if (!_isArray(validators)) {
//throw "{0}.{1}.validators must be an array".format(typeName, propName);
// coerce to array instead of throwing
propDef.validators = validators = [validators];
}
validators.forEach(function (val, ix) {
if (val instanceof Validator) return;
try {
validators[ix] = Validator.fromJSON(val);
} catch (ex) {
throw "{0}.{1}.validators[{2}] = '{3}' can't be converted to a known Validator."
.format(typeName, propName, ix, JSON.stringify(val));
}
});
}
function findEntityKey(typeDef) {
var dps = typeDef.dataProperties;
var typenameId = typeDef.shortName.toLowerCase() + 'id';
for (var key in dps) {
var prop = dps[key];
if (prop.isPartOfKey) { // found a key part; stop analysis
return key;
}
// if type were Person, would look for 'id' or 'personid'
if (prop.isPartOfKey == null) {
// isPartOfKey is null or undefined; is it a candidate?
var keyLc = key.toLowerCase();
if (keyLc === 'id' || keyLc === typenameId) {
// infer this property is the key; stop further analysis
prop.isPartOfKey = true;
return key;
}
}
}
return null;
}
function inferDefaultResourceName(typeDef) {
if (typeDef.defaultResourceName === undefined) {
typeDef.defaultResourceName = this.pluralize(typeDef.shortName);
}
}
function inferValidators(entityType) {
entityType.dataProperties.forEach(function (prop) {
if (!prop.isNullable) { // is required.
addValidator(prop, Validator.required());
};
addValidator(prop, getDataTypeValidator(prop));
if (prop.maxLength != null && prop.dataType === DT.String) {
addValidator(prop, Validator.maxLength({ maxLength: prop.maxLength }));
}
});
return entityType;
function addValidator(prop, validator) {
if (!validator) { return; } // no validator arg
var valName = validator.name;
var validators = prop.validators;
var found = validators.filter(function (val) { return val.name == valName; });
if (!found.length) { // this validator has not already been specified
validators.push(validator);
}
}
function getDataTypeValidator(prop) {
var dataType = prop.dataType;
var validatorCtor = !dataType || dataType === DT.String ? null : dataType.validatorCtor;
return validatorCtor ? validatorCtor() : null;
}
}
function normalizeNavProp(key, prop) {
switch (typeof (prop)) {
case 'string':
return { entityTypeName: prop };
case 'object':
return prop;
default:
// nav prop name (key) is same as EntityName (PascalCased)
var ename = key.substr(0, 1).toUpperCase() + key.substr(1);
return { entityTypeName: ename };
}
}
// Patch some defaults in the type definition object
// Todo: consider moving some of these patches into breeze itself
function patch(typeDef) {
var key, prop;
if (typeDef.name) { // 'name' -> 'shortName' property
renameAttrib(typeDef, 'name', 'shortName');
}
var typeName = typeDef.shortName;
// if no namespace specified, assign the helper defaultNamespace
var namespace = typeDef.namespace = typeDef.namespace || this.defaultNamespace;
if (!typeDef.isComplexType) {
this.inferDefaultResourceName(typeDef);
this.findEntityKey(typeDef);
// if entityType lacks an autoGeneratedKeyType, use the helper defaultAutoGeneratedKeyType
typeDef.autoGeneratedKeyType = typeDef.autoGeneratedKeyType || this.defaultAutoGeneratedKeyType;
}
var dps = typeDef.dataProperties;
for (key in dps) {
prop = dps[key];
this.replaceDataPropertyAliases(prop, key);
if (prop.complexTypeName && prop.complexTypeName.indexOf(":#") === -1) {
// if complexTypeName is unqualified, suffix with the entity's own namespace
prop.complexTypeName += ':#' + namespace;
}
// key always required (not nullable) unless explictly nullable
if (prop.isPartOfKey) { prop.isNullable = prop.isNullable === true; }
if (prop.validators) { this.convertValidators(typeName, key, prop); }
};
var navs = typeDef.navigationProperties;
for (key in navs) {
prop = navs[key] = normalizeNavProp(key, navs[key]);
this.replaceNavPropertyAliases(prop,key);
var propTypeName = prop.entityTypeName;
// append the namespace to entityTypeName if missing
var nsStart = propTypeName.indexOf(":#");
if (nsStart === -1) {
// name is unqualified; append the namespace
prop.entityTypeName += ':#' + namespace;
} else {
propTypeName = propTypeName.slice(0, nsStart);
}
// Infer that it's a child nav if no FKs, no invFKs, and not a collection
if (prop.foreignKeyNames === undefined && prop.isScalar !== false &&
prop.invForeignKeyNames === undefined) {
// Look for candidate FK property among the data properties as
// (1) propertyname + id OR (2) unqualified typename + 'id'
var candidate1 = key.toLowerCase() + 'id';
var candidate2 = propTypeName.toLowerCase() + 'id';
var fk = Object.keys(dps).filter(
function (k) {
k = k.toLowerCase();
return k === candidate1 || k === candidate2;
})[0];
if (fk) { prop.foreignKeyNames = [fk]; }
}
if (prop.associationName === undefined) {
var isParent = prop.isScalar === false ||
prop.invForeignKeyNames ||
prop.foreignKeyNames === undefined;
// association name is 'ChildType_ParentType'
prop.associationName =
(isParent ? propTypeName : typeName) + '_' +
(isParent ? typeName : propTypeName);
}
// coerce FK names to array
var keyNames = prop.foreignKeyNames;
if (keyNames && !_isArray(keyNames)) {
prop.foreignKeyNames = [keyNames];
}
keyNames = prop.invForeignKeyNames;
if (keyNames && !_isArray(keyNames)) {
prop.invForeignKeyNames = [keyNames];
}
};
}
function pluralize(word) {
// Lame English pluralizer; plenty better on the web
var len = word.length;
switch (word[len - 1]) {
case 's': // class -> classes
return word + 'es';
case 'x': // box -> boxes
return word + 'es';
case 'y': // fly -> flies
return word.substr(0, len - 1) + 'ies';
default: // cat -> cats
return word + 's';
}
}
function renameAttrib(obj, oldName, newName) {
if (obj[newName] !== undefined) {
throw "renameAttrib error; new name, '" + newName + "' is already defined for the object.";
}
obj[newName] = obj[oldName];
delete obj[oldName];
}
/*
* Support common aliases in DataProperty attributes to reduce tedium
* type -> dataType
* complex || complexType -> complexTypeName
* null -> isNullable
* max -> maxLength
* default -> defaultValue
*/
function replaceDataPropertyAliases(prop, propertyName) {
for (var key in prop) {
if (_hasOwnProperty(prop, key)) {
var keyLc = key.toLowerCase();
if (keyLc === 'type') {
renameAttrib(prop, key, 'dataType');
} else if (keyLc === 'complex' || keyLc === 'complextype') {
renameAttrib(prop, key, 'complexTypeName');
} else if (keyLc === 'max' && (prop.dataType === undefined || prop.dataType === DT.String)) {
renameAttrib(prop, key, 'maxLength');
} else if (keyLc.indexOf('null') > -1 && key !== 'isNullable' && typeof (prop[key]) === 'boolean') {
renameAttrib(prop, key, 'isNullable');
} else if (keyLc === 'required') {
prop[key] = !prop[key];
renameAttrib(prop, key, 'isNullable');
} else if (keyLc.indexOf('key') > -1 && key !== 'isPartOfKey' && typeof (prop[key]) === 'boolean') {
renameAttrib(prop, key, 'isPartOfKey');
} else if (keyLc === 'default') {
renameAttrib(prop, key, 'defaultValue');
} else if (keyLc === 'isone' || keyLc === 'hasone') {
renameAttrib(prop, key, 'isScalar');
// Mongo subdocuments could be collections of complex types
} else if (keyLc === 'ismany' || keyLc === 'hasmany') {
prop[key] = !prop[key];
renameAttrib(prop, key, 'isScalar');
}
}
}
}
/*
* Support common aliases in Navigation Property attributes to reduce tedium
* type -> entityTypeName
* FK|FKs -> foreignKeyNames
* invFK|invFKs -> invForeignKeyNames
* assoc -> associationName
* isOne | hasOne -> isScalar
* isMany | hasMany -> isScalar with boolean flipped
*/
function replaceNavPropertyAliases(prop, propertyName) {
for (var key in prop) {
if (_hasOwnProperty(prop, key)) {
var keyLc = key.toLowerCase();
if (keyLc === 'type') {
renameAttrib(prop, key, 'entityTypeName');
} else if (keyLc === 'fk' || keyLc === 'fks' || keyLc === 'key') {
renameAttrib(prop, key, 'foreignKeyNames');
} else if (keyLc === 'isone' || keyLc === 'hasone') {
renameAttrib(prop, key, 'isScalar');
} else if (keyLc === 'ismany' || keyLc === 'hasmany') {
prop[key] = !prop[key];
renameAttrib(prop, key, 'isScalar');
} else if (keyLc === 'invfk' || keyLc === 'invfks') {
renameAttrib(prop, key, 'invForeignKeyNames');
} else if (keyLc.indexOf('assoc') > -1 && key !== 'associationName') {
renameAttrib(prop, key, 'associationName');
}
}
}
}
function setDefaultAutoGeneratedKeyType(autoGeneratedKeyType) {
this.defaultAutoGeneratedKeyType =
autoGeneratedKeyType ||
breeze.AutoGeneratedKeyType.None;
}
function setDefaultNamespace(namespace) {
this.defaultNamespace = namespace || '';
}
function _hasOwnProperty(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function _isArray(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
}
})); |
// QClient.js
// ==========
// Main module exported from this library.
// Require our dependencies
var https = require('https'),
crypto = require('crypto');
// QClient
// -------
// The main function exposed to your code.
// QClient will take your client ID and token
// and set up subsequent API calls.
//
// `clientId` [String] - The Client ID you are given when signing up for Q
// `secretToken` [String] - The secret token you are given when signin up for Q
// `options` [Object] - Options object. DO NOT USE THIS. For development only.
function QClient(clientId, secretToken, options) {
if (!(this instanceof QClient)) return new QClient(clientId, secretToken);
var opts = (typeof options === 'undefined') ? {} : options;
// Allow overriding options. Do not use this outside of development.
this.host = (typeof opts.host === 'undefined') ? 'q.aplo.me' : opts.host;
this.port = (typeof opts.port === 'undefined') ? 443 : opts.host;
this.setApiKey(clientId);
this.setToken(secretToken);
}
QClient.prototype = {
// API key setter method
setApiKey: function(key) {
if (key) this.clientId = key;
},
// Secret token setter
setToken: function(secret) {
if (secret) this.secretToken = secret;
},
// Signature
// ---------
// Build a signature to send in the
// request header.
//
// `endpoint` [String] - The API endpoint (including dynamic params and query strings) that will be requested
// `reqBody` [String] - The request body as a string
//
// returns [String] - the request signature as SHA1 HMAC
signature: function(endpoint, reqBody) {
var hmac = crypto.createHmac('sha1', this.secretToken).setEncoding('hex'),
body = reqBody || '';
hmac.write(endpoint + body);
hmac.end();
return hmac.read();
},
// Get Subsidy
// -----------
// Returns a subsidy and an array of plans available
// to the consumer based on their rating and demographic
// info. Eligible plans already have cost sharing reductions
// included.
//
// `state` [String] - 2 letter state abbreviation
// `zip` [String, Number] - 5 digit zip code
// `demographics` [Object] - Object containing rating information. See
// Q API docs for more on the structure of this object.
// `cb` [Function] - Function called when response is available. Should take a
// single String for arguments.
//
// returns [Function] - Passes an Object to your callback containing the subsidy amount and array of plan objects
getSubsidy: function(state, zip, demographics, cb) {
var endpoint = ['/plans', state, zip].join('/');
demographics = JSON.stringify(demographics);
var request = https.request({
host: this.host,
path: endpoint,
port: this.port,
method: 'POST',
headers: {
'Authorization': this.clientId + ':' + this.signature(endpoint, demographics),
'Content-Type': 'application/json',
'Content-Length': demographics.length
}
}, function(response) {
var reply = '';
response.on('data', function(chunk) {
reply += chunk;
});
response.on('end', function() {
return cb(null, reply);
});
response.on('error', function(err) {
return cb(err, reply);
});
});
request.write(demographics);
request.end();
},
// Get licenses
// ------------
// Get a list of valid health insurance licenses
// for an agent based on their NPN number
//
// `npn` [Number] - The NPN number of the agent to use
// `cb` [Function] - Function to call when response is ready (should accept error and body arguments)
getLicenses: function(npn, cb) {
var endpoint = ['/licenses', npn].join('/');
https.get({
host: this.host,
path: endpoint,
port: this.port,
headers: {
'Authorization': this.clientId + ':' + this.signature(endpoint),
'Content-Type': 'application/json'
}
}, function(response) {
var reply = '';
response.on('data', function(data) {
reply += data;
})
.on('end', function() {
if (response.statusCode === 200) {
var resultObj = JSON.parse(reply);
resultObj.licenses.forEach(function(license) {
license.issued_date = new Date(license.issued_date);
if (license.expiration_date !== 'PERPETUAL')
license.expiration_date = new Date(license.expiration_date);
license.last_updated = new Date('license.last_updated');
});
return cb(null, resultObj);
} else {
return cb('Non-200 status returned', response.statusCode);
}
});
}).on('error', function(err) {
return cb('Unhandled exception', err.message);
});
},
// Get Plan Info
// -------------
// Gets plan information for a single plan
getPlanInfo: function(planId, state, county, cb) {
var endpoint = ['/plans/info', planId, state, county.replace(/ /g, '_')].join('/');
https.get({
host: this.host,
path: endpoint,
port: this.port,
headers: {
'Authorization': this.clientId + ':' + this.signature(endpoint),
'Content-Type': 'application/json'
}
}, function(response) {
var reply = '';
response.on('data', function(data) {
reply += data;
});
response.on('end', function() {
if (response.statusCode === 200) {
return cb(null, reply);
} else {
return cb('Non-200 status returned', response.statusCode);
}
});
response.on('error', function(err) {
return cb(err, err.message);
});
});
}
};
module.exports = QClient;
|
/**
* Imports
*/
import test from 'tape'
import PicturePasswordModal from '.'
/**
* <Picture Password Modal/> tests
*/
test('<PicturePasswordModal/> should work', t => {
})
|
var Webpack = require('webpack'),
path = require('path');
var eslintrcPath = path.resolve(__dirname, '.eslintrc'),
nodeModulesPath = path.resolve(__dirname, 'node_modules'),
buildPath = path.resolve(__dirname, 'build'),
mainPath = path.resolve(__dirname, 'src', 'app.js');
var config = {
devtool: 'eval',
watch: true,
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:8080',
mainPath
],
output: {
path: buildPath,
filename: 'bundle.js',
publicPath: '/build/'
},
module: {
// preLoaders: [{
// test: /\.js(x)?$/,
// loader: 'eslint',
// exclude: nodeModulesPath
// }],
loaders: [{
test: /\.js(x)?$/,
loader: 'babel',
exclude: nodeModulesPath
}, {
test: /\.(css|scss)$/,
loaders: ['style', 'css', 'sass']
}, {
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: 'url?limit=8192'
}, {
test: /\.(woff|woff2|ttf|eot)$/,
loader: 'url'
}]
},
plugins: [
new Webpack.HotModuleReplacementPlugin(),
new Webpack.NoErrorsPlugin()
],
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.scss']
},
eslint: {
configFile: eslintrcPath
}
};
module.exports = config;
|
'use strict';
var _ = require('underscore');
var Hoard = require('./backbone.hoard');
var mergeOptions = ['expires', 'timeToLive'];
// A Policy determines key generation and cache eviction
var Policy = function (options) {
_.extend(this, _.pick(options || {}, mergeOptions));
this.initialize.apply(this, arguments);
};
_.extend(Policy.prototype, Hoard.Events, {
initialize: function () {},
// Generate a key for the given model
// The key will be used to determine uniqueness in the store
getKey: function (model, method, options) {
return this.getUrl(model, method, options);
},
// Get the url for the given model
getUrl: function (model, method, options) {
return _.result(model, 'url');
},
// Get the data from the given model
getData: function (model, options) {
return model.toJSON();
},
// Get the collection associated with the model
getCollection: function (model, options) {
return model.collection;
},
// Do two models refer to the same resource?
// @param model: the raw model attributes
// @param otherModel: the raw model attributes
areModelsSame: function (model, otherModel) {
return model.id === otherModel.id;
},
// Find the same resource within a collection
// @param collection: the raw collection array
// @param model: the raw model attributes
findSameModel: function (collection, model) {
return _.find(collection, function (other) {
return this.areModelsSame(model, other);
}, this);
},
// Generate metadata
// Overwrite to return meaningful metadata
getMetadata: function (key, response, options) {
return {};
},
// Return true if the item associated with the given metadata should be evicted.
// Return false otherwise.
// Override if you want to use metaData to determine whether or not to evict the item
shouldEvictItem: function (meta) {
return false;
},
// Return an array of keys to evict
// By default, clear the world
getKeysToEvict: function (metadata, key, value, error) {
return _.keys(metadata);
}
});
Policy.extend = Hoard._proxyExtend;
module.exports = Policy;
|
// Import libraries for making a component
import React from 'react';
import {
StyleSheet,
View,
} from 'react-native';
// Make a component
const CardSection = props => (
<View style={styles.containerStyle}>
{props.children}
</View>
);
// ========================================================
// PropTypes check
// ========================================================
CardSection.propTypes = {
children: React.PropTypes.element.isRequired, // for single child
};
// ========================================================
// Styles
// ========================================================
const styles = StyleSheet.create({
containerStyle: {
borderBottomWidth: 1,
padding: 5,
backgroundColor: '#fff',
justifyContent: 'flex-start',
flexDirection: 'row',
borderColor: '#ddd',
position: 'relative',
},
});
// ========================================================
// Exports
// ========================================================
// Make the component available to other parts of the app
export { CardSection };
|
var dotnet = require('electron-dotnet');
//var hello = dotnet.func("./src/GracefulLoad/bin/Debug/GracefulLoad.dll");
var hello = dotnet.func("./src/GracefulLoad/GracefulLoad.cs");
//Make method externaly visible this will be referenced in the renderer.js file
exports.sayHello = arg => {
hello('GracefulLoad', function (error, result) {
if (error) throw error;
if (result) console.log(result);
});
} |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@ag-grid-community/core");
var HorizontalResizeComp = /** @class */ (function (_super) {
__extends(HorizontalResizeComp, _super);
function HorizontalResizeComp() {
return _super.call(this, /* html */ "<div class=\"ag-tool-panel-horizontal-resize\"></div>") || this;
}
HorizontalResizeComp.prototype.setElementToResize = function (elementToResize) {
this.elementToResize = elementToResize;
};
HorizontalResizeComp.prototype.postConstruct = function () {
var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({
eResizeBar: this.getGui(),
dragStartPixels: 1,
onResizeStart: this.onResizeStart.bind(this),
onResizing: this.onResizing.bind(this),
onResizeEnd: this.onResizing.bind(this)
});
this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsWrapper.isEnableRtl());
};
HorizontalResizeComp.prototype.onResizeStart = function () {
this.startingWidth = this.elementToResize.offsetWidth;
};
HorizontalResizeComp.prototype.onResizing = function (delta) {
var direction = this.inverted ? -1 : 1;
var newWidth = Math.max(100, Math.floor(this.startingWidth - (delta * direction)));
this.elementToResize.style.width = newWidth + "px";
};
HorizontalResizeComp.prototype.setInverted = function (inverted) {
this.inverted = inverted;
};
__decorate([
core_1.Autowired('horizontalResizeService')
], HorizontalResizeComp.prototype, "horizontalResizeService", void 0);
__decorate([
core_1.PostConstruct
], HorizontalResizeComp.prototype, "postConstruct", null);
return HorizontalResizeComp;
}(core_1.Component));
exports.HorizontalResizeComp = HorizontalResizeComp;
//# sourceMappingURL=horizontalResizeComp.js.map |
import rp from 'request-promise'
// import cheerio from 'cheerio'
import util from 'util'
import _ from "lodash"
import helpers from "../../helpers"
let steam = {
/**
* get - description
*
* @param {type} id description
* @return {type} description
*/
get: function(id) {
let promise = (resolve, reject) => {
let url = `http://store.steampowered.com/app/${id}`;
let json = {
id: id,
title: null,
media: {
images: [],
videos: []
},
price: {
standard: null,
current: null
},
reviews: {
score: null,
total: null,
summary: null
},
genres: []
};
let settings = {
uri: `http://store.steampowered.com/api/appdetails/?appids=${id}`
}
rp(settings).then((result) => {
result = JSON.parse(result);
json.title = result[id]['data'].name;
json.description = result[id]['data'].description;
json.website = result[id]['data'].website;
json.genres = _.map(result[id]['data']['genres'], function(genre) {
return genre.description;
});
//json.media.videos = json.media.videos.concat(getMediaObjects('movies', result[id]['data']));
json.media.images = json.media.images.concat(
getBanners(id),
getMediaObjects('screenshots', result[id]['data'])
);
resolve(json);
});
};
return new Promise(promise);
}
}
module.exports = Object.create(steam);
/**
* getMediaResolutionFromUrl - description
*
* @param {type} url description
* @return {type} description
*/
function getMediaResolutionFromUrl(url) {
let dimentions = url.split('.')
.reverse()[1]
.split('x');
return helpers
.getResolutionObject(dimentions[0], dimentions[1]);
}
/**
* getMediaObjects - description
*
* @param {type} type description
* @param {type} json description
* @return {type} description
*/
function getMediaObjects(type, json) {
return _.map(json[type], function(media) {
let img = {
type: null,
url: null,
resolution: null
};
img.url = media.path_full;
img.type = 'screenshot';
img.resolution = getMediaResolutionFromUrl(media.path_full);
return img;
});
}
/**
* generateBannerImageObj - description
*
* @param {type} appid description
* @param {type} size description
* @return {type} description
*/
function generateBannerImageObj(appid, size) {
let filename;
if (size == "default") {
filename = '/header.jpg';
} else {
filename = '/capsule_' + size[0] + 'x' + size[1] + '.jpg';
}
let img = {
type: "banner",
url: "http://cdn.akamai.steamstatic.com/steam/apps/" + appid + filename,
resolution: helpers.getResolutionObject(size[0], size[1])
};
return img;
};
/**
* getBanners - description
*
* @param {type} appid description
* @return {type} description
*/
function getBanners(appid) {
let sizes = [
['171', '64'],
['184', '69'],
['231', '87'],
['467', '181'],
['616', '353'],
];
return _.map(sizes, function(size) {
return generateBannerImageObj(appid, size);
});
};
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import PropTypes from 'prop-types';
import { refType } from '@material-ui/utils';
import { unstable_composeClasses as composeClasses } from '@material-ui/unstyled';
import SwitchBase from '../internal/SwitchBase';
import useThemeProps from '../styles/useThemeProps';
import RadioButtonIcon from './RadioButtonIcon';
import { alpha } from '../styles/colorManipulator';
import capitalize from '../utils/capitalize';
import createChainedFunction from '../utils/createChainedFunction';
import useRadioGroup from '../RadioGroup/useRadioGroup';
import radioClasses, { getRadioUtilityClass } from './radioClasses';
import experimentalStyled, { rootShouldForwardProp } from '../styles/experimentalStyled';
import { jsx as _jsx } from "react/jsx-runtime";
var useUtilityClasses = function useUtilityClasses(styleProps) {
var classes = styleProps.classes,
color = styleProps.color;
var slots = {
root: ['root', "color".concat(capitalize(color))]
};
return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
};
var RadioRoot = experimentalStyled(SwitchBase, {
shouldForwardProp: function shouldForwardProp(prop) {
return rootShouldForwardProp(prop) || prop === 'classes';
}
}, {
name: 'MuiRadio',
slot: 'Root',
overridesResolver: function overridesResolver(props, styles) {
var styleProps = props.styleProps;
return _extends({}, styles.root, styles["color".concat(capitalize(styleProps.color))]);
}
})(function (_ref) {
var theme = _ref.theme,
styleProps = _ref.styleProps;
return _extends({
/* Styles applied to the root element. */
color: theme.palette.text.secondary
}, styleProps.color !== 'default' && _defineProperty({}, "&.".concat(radioClasses.checked), {
color: theme.palette[styleProps.color].main,
'&:hover': {
backgroundColor: alpha(theme.palette[styleProps.color].main, theme.palette.action.hoverOpacity),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: 'transparent'
}
}
}), _defineProperty({}, "&.".concat(radioClasses.disabled), {
color: theme.palette.action.disabled
}));
});
var defaultCheckedIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {
checked: true
});
var defaultIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {});
var Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'MuiRadio'
});
var checkedProp = props.checked,
_props$color = props.color,
color = _props$color === void 0 ? 'secondary' : _props$color,
nameProp = props.name,
onChangeProp = props.onChange,
_props$size = props.size,
size = _props$size === void 0 ? 'medium' : _props$size,
other = _objectWithoutProperties(props, ["checked", "color", "name", "onChange", "size"]);
var styleProps = _extends({}, props, {
color: color,
size: size
});
var classes = useUtilityClasses(styleProps);
var radioGroup = useRadioGroup();
var checked = checkedProp;
var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
var name = nameProp;
if (radioGroup) {
if (typeof checked === 'undefined') {
checked = radioGroup.value === props.value;
}
if (typeof name === 'undefined') {
name = radioGroup.name;
}
}
return /*#__PURE__*/_jsx(RadioRoot, _extends({
color: color,
type: "radio",
icon: /*#__PURE__*/React.cloneElement(defaultIcon, {
fontSize: size === 'small' ? 'small' : 'medium'
}),
checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, {
fontSize: size === 'small' ? 'small' : 'medium'
}),
styleProps: styleProps,
classes: classes,
name: name,
checked: checked,
onChange: onChange,
ref: ref
}, other));
});
process.env.NODE_ENV !== "production" ? Radio.propTypes
/* remove-proptypes */
= {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* If `true`, the component is checked.
*/
checked: PropTypes.bool,
/**
* The icon to display when the component is checked.
*/
checkedIcon: PropTypes.node,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'secondary'
*/
color: PropTypes
/* @typescript-to-proptypes-ignore */
.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary']), PropTypes.string]),
/**
* If `true`, the component is disabled.
*/
disabled: PropTypes.bool,
/**
* If `true`, the ripple effect is disabled.
*/
disableRipple: PropTypes.bool,
/**
* The icon to display when the component is unchecked.
*/
icon: PropTypes.node,
/**
* The id of the `input` element.
*/
id: PropTypes.string,
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
*/
inputProps: PropTypes.object,
/**
* Pass a ref to the `input` element.
*/
inputRef: refType,
/**
* Name attribute of the `input` element.
*/
name: PropTypes.string,
/**
* Callback fired when the state is changed.
*
* @param {object} event The event source of the callback.
* You can pull out the new value by accessing `event.target.value` (string).
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
*/
onChange: PropTypes.func,
/**
* If `true`, the `input` element is required.
*/
required: PropTypes.bool,
/**
* The size of the component.
* `small` is equivalent to the dense radio styling.
* @default 'medium'
*/
size: PropTypes
/* @typescript-to-proptypes-ignore */
.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: PropTypes.object,
/**
* The value of the component. The DOM API casts this to a string.
*/
value: PropTypes.any
} : void 0;
export default Radio; |
module.exports={title:'Kickstarter',slug:'kickstarter',svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Kickstarter icon</title><path d="M9.604 8.18l4.4-6.38C14.838.6 15.91 0 17.231 0c1.072 0 2.002.381 2.789 1.144.783.765 1.176 1.675 1.176 2.738 0 .784-.207 1.479-.624 2.079l-3.967 5.769 4.853 6.153c.484.612.727 1.33.727 2.15 0 1.086-.381 2.018-1.145 2.798-.762.779-1.686 1.169-2.771 1.169-1.189 0-2.097-.387-2.721-1.16l-5.943-7.417v4.089c0 1.168-.202 2.074-.607 2.722C8.261 23.411 7.195 24 5.785 24c-1.282 0-2.276-.436-2.979-1.299-.66-.799-.99-1.856-.99-3.172V4.365c0-1.245.336-2.274 1.004-3.083C3.518.428 4.488 0 5.726 0c1.179 0 2.16.428 2.946 1.282.438.475.715.953.831 1.44.07.3.105.858.105 1.68V8.18h-.004z"/></svg>',get path(){return this.svg.match(/<path\s+d="([^"]*)/)[1];},source:'https://www.kickstarter.com/help/brand_assets',hex:'2BDE73'}; |
var jwt = require('express-jwt');
module.exports.authenticate = jwt({
secret: new Buffer(process.env.AUTH0_CLIENT_SECRET, 'base64'),
audience: process.env.AUTH0_CLIENT_ID
});
module.exports.authenticateAdmin = function(req, res, next) {
if (req.user && req.user.is_admin) {
next();
} else {
var err = new Error('Unauthorized to access this resource.');
err.status = 403;
next(err);
}
};
|
import browserTools from 'testcafe-browser-tools';
import { killBrowserProcess } from '../../../../../utils/process';
import BrowserStarter from '../../../utils/browser-starter';
import { buildChromeArgs } from './build-chrome-args';
import remoteChrome from 'chrome-remote-interface';
import Timer from '../../../../../utils/timer';
import delay from '../../../../../utils/delay';
const browserStarter = new BrowserStarter();
const LIST_TABS_TIMEOUT = 10000;
const LIST_TABS_DELAY = 500;
export async function start (pageUrl, { browserName, config, cdpPort, tempProfileDir, inDocker }) {
const chromeInfo = await browserTools.getBrowserInfo(config.path || browserName);
const chromeOpenParameters = Object.assign({}, chromeInfo);
chromeOpenParameters.cmd = buildChromeArgs({ config, cdpPort, platformArgs: chromeOpenParameters.cmd, tempProfileDir, inDocker });
await browserStarter.startBrowser(chromeOpenParameters, pageUrl);
}
async function tryListTabs (cdpPort) {
try {
return { tabs: await remoteChrome.List({ port: cdpPort }) };
}
catch (error) {
return { error };
}
}
export async function startOnDocker (pageUrl, { browserName, config, cdpPort, tempProfileDir, inDocker }) {
await start('', { browserName, config, cdpPort, tempProfileDir, inDocker });
let { tabs, error } = await tryListTabs(cdpPort);
const timer = new Timer(LIST_TABS_TIMEOUT);
//NOTE: We should repeat getting 'List' after a while because we can get an error if the browser isn't ready.
while ((error || !tabs.length) && !timer.expired) {
await delay(LIST_TABS_DELAY);
({ tabs, error } = await tryListTabs(cdpPort));
}
if (error)
throw error;
const target = tabs.filter(t => t.type === 'page')[0];
const { Target } = await remoteChrome({ target, port: cdpPort });
await Target.createTarget({ url: pageUrl });
await remoteChrome.Close({ id: target.id, port: cdpPort });
}
export async function stop ({ browserId }) {
// NOTE: Chrome on Linux closes only after the second SIGTERM signall
if (!await killBrowserProcess(browserId))
await killBrowserProcess(browserId);
}
|
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'image2', 'nl', {
alt: 'Alternatieve tekst',
btnUpload: 'Naar server verzenden',
captioned: 'Afbeelding met onderschrift',
infoTab: 'Informatie afbeelding',
lockRatio: 'Verhouding vergrendelen',
menu: 'Eigenschappen afbeelding',
pathName: 'afbeelding',
pathNameCaption: 'onderschrift',
resetSize: 'Afmetingen resetten',
resizer: 'Klik en sleep om te herschalen',
title: 'Eigenschappen afbeelding',
uploadTab: 'Upload',
urlMissing: 'De URL naar de afbeelding ontbreekt.'
} );
|
'use strict';
import utils from './utils';
import asEnumerable from './asEnumerable';
export default function (source, selector) {
if (this !== undefined && this !== null && arguments.length < 2 && (!source || utils.isFunc(source))) {
selector = source;
source = this;
}
if (!utils.isGenerator(source)) {
source = asEnumerable(source);
}
if (!utils.isFunc(selector)) {
selector = a => a;
}
let next = source.next();
if (next.done) {
throw new Error('sequence is empty');
}
let max = next.value;
while (!next.done) {
let item = selector(next.value);
if (item > selector(max)) {
max = next.value;
}
next = source.next();
}
return max;
}; |
/**
@module ember-metal
*/
var ArrayPrototype = Array.prototype;
// Testing this is not ideal, but we want to use native functions
// if available, but not to use versions created by libraries like Prototype
var isNativeFunc = function(func) {
// This should probably work in all browsers likely to have ES5 array methods
return func && Function.prototype.toString.call(func).indexOf('[native code]') > -1;
};
// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/map
var map = isNativeFunc(ArrayPrototype.map) ? ArrayPrototype.map : function(fun /*, thisp */) {
//"use strict";
if (this === void 0 || this === null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun !== "function") {
throw new TypeError();
}
var res = new Array(len);
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t) {
res[i] = fun.call(thisp, t[i], i, t);
}
}
return res;
};
// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/foreach
var forEach = isNativeFunc(ArrayPrototype.forEach) ? ArrayPrototype.forEach : function(fun /*, thisp */) {
//"use strict";
if (this === void 0 || this === null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun !== "function") {
throw new TypeError();
}
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t) {
fun.call(thisp, t[i], i, t);
}
}
};
var indexOf = isNativeFunc(ArrayPrototype.indexOf) ? ArrayPrototype.indexOf : function (obj, fromIndex) {
if (fromIndex === null || fromIndex === undefined) { fromIndex = 0; }
else if (fromIndex < 0) { fromIndex = Math.max(0, this.length + fromIndex); }
for (var i = fromIndex, j = this.length; i < j; i++) {
if (this[i] === obj) { return i; }
}
return -1;
};
var filter = isNativeFunc(ArrayPrototype.filter) ? ArrayPrototype.filter : function (fn, context) {
var i,
value,
result = [],
length = this.length;
for (i = 0; i < length; i++) {
if (this.hasOwnProperty(i)) {
value = this[i];
if (fn.call(context, value, i, this)) {
result.push(value);
}
}
}
return result;
};
if (Ember.SHIM_ES5) {
if (!ArrayPrototype.map) {
ArrayPrototype.map = map;
}
if (!ArrayPrototype.forEach) {
ArrayPrototype.forEach = forEach;
}
if (!ArrayPrototype.filter) {
ArrayPrototype.filter = filter;
}
if (!ArrayPrototype.indexOf) {
ArrayPrototype.indexOf = indexOf;
}
}
/**
Array polyfills to support ES5 features in older browsers.
@namespace Ember
@property ArrayPolyfills
*/
export {
map,
forEach,
filter,
indexOf
};
|
/**
* Create a new ObjectCallProxy.
*
* @class
*/
function ObjectCallProxy (source) {
this.source = source;
this.attached = {};
this.pending = [];
}
/**
* Restore all of the attached methods.
*
* @private
*/
ObjectCallProxy.prototype._restore = function () {
for (var name in this.attached) {
this.source[name] = this.attached[name];
delete this.attached[name];
}
};
/**
* Release all of the pending callbacks.
*
* @private
* @param {Error} [err] - Error to release all callbacks with (optional).
*/
ObjectCallProxy.prototype._release = function (err) {
var source = this.source;
var pending = this.pending;
this.pending = [];
pending.forEach(function (call) {
var fn = call.fn;
var args = call.args;
var callback = call.callback;
args[args.length - 1] = function () {
var subArgs = err ? [err] : Array.prototype.slice.call(arguments);
callback.apply(null, subArgs);
};
fn.apply(source, args);
});
};
/**
* Attach onto the source object and intercept all calling
* methods with callbacks (where last argument is function).
*
* @param fn [predicateFn] - Predicate to filter methods by (optional).
*/
ObjectCallProxy.prototype.attach = function (predicateFn) {
var source = this.source;
var pending = this.pending;
var attached = this.attached;
if (!predicateFn) {
predicateFn = function () {
return true;
};
}
function _attach (name) {
if (!(name in attached)) {
var originalFn = source[name];
attached[name] = originalFn;
source[name] = function () {
var args = Array.prototype.slice.call(arguments);
var lastArgumentOffset = args.length - 1;
if (args.length && typeof args[lastArgumentOffset] === 'function') {
pending.push({
args: args,
callback: args[lastArgumentOffset],
fn: originalFn
});
} else {
return originalFn.apply(source, args);
}
};
}
}
// Proxy all methods on source object.
for (var name in source) {
var value = source[name];
// If a predicate is provided, then filter accordingly.
if (!predicateFn(name)) {
continue;
}
if (typeof value === 'function') {
_attach(name);
}
}
};
/**
* Detach all attached methods and release any pending calls.
*
* @param {Error} [err] - Error to release all callbacks with (optional).
*/
ObjectCallProxy.prototype.detach = function (err) {
this._restore();
this._release(err);
};
module.exports = ObjectCallProxy;
|
var ClassExpr = class {
m() {
return ClassExpr;
}
}
var TempClass = ClassExpr;
ClassExpr = 42;
expect(42).toBe(new TempClass().m());
expect(TempClass.name).toBe('');
//////////////////////////////////////////////////////////////////////////////
var ClassExpr2 = class ClassExprInner {
m() {
return ClassExprInner;
}
}
TempClass = ClassExpr2;
ClassExpr2 = 42;
expect(TempClass).toBe(new TempClass().m());
expect(TempClass.name).toBe('ClassExprInner');
//////////////////////////////////////////////////////////////////////////////
class ClassDef {
m() {
return ClassDef;
}
}
var TempClass = ClassDef;
ClassDef = 42;
expect(TempClass).toBe(new TempClass().m());
// IE does not have a name property on functions.
expect(TempClass.name === 'ClassDef' || TempClass.name === undefined).toBe(true);
|
"use strict";
if (typeof (JSIL) === "undefined")
throw new Error("JSIL.js must be loaded first");
if (typeof(JSIL.SuppressInterfaceWarnings) === "undefined")
JSIL.SuppressInterfaceWarnings = true;
JSIL.ReadOnlyPropertyWriteWarnings = false;
if (typeof(JSIL.ThrowOnUnimplementedExternals) === "undefined")
JSIL.ThrowOnUnimplementedExternals = false;
if (typeof(JSIL.ThrowOnStaticCctorError) === "undefined")
JSIL.ThrowOnStaticCctorError = false;
JSIL.WarnAboutGenericResolveFailures = false;
JSIL.StructFormatWarnings = false;
JSIL.$NextAssemblyId = 0;
JSIL.PrivateNamespaces = {};
JSIL.AssemblyShortNames = {};
JSIL.ReservedIdentifiers = [
"name", "length", "arity", "constructor",
"caller", "arguments", "call", "apply", "bind"
];
var $private = null;
// FIXME: Why does this slightly deopt global performance vs. Object.create? Object.create should be worse.
JSIL.$CreateCrockfordObject = function (prototype) {
if (!prototype && (prototype !== null))
JSIL.RuntimeError("Prototype not specified");
// FIXME: Generate this with a better name?
function crockfordobject () {
};
crockfordobject.prototype = prototype || null;
return new crockfordobject();
};
JSIL.CreateDictionaryObject = function (prototype) {
if (!prototype && (prototype !== null))
JSIL.RuntimeError("Prototype not specified");
return Object.create(prototype);
};
JSIL.CreateSingletonObject = function (prototype) {
return JSIL.CreateDictionaryObject(prototype);
};
JSIL.CreatePrototypeObject = function (prototype) {
// HACK: Nesting may protect type information
// return JSIL.CreateDictionaryObject(JSIL.CreateDictionaryObject(prototype));
// Not faster though. Probably because of the longer prototype chain.
return JSIL.CreateDictionaryObject(prototype);
};
JSIL.CreateInstanceObject = function (prototype) {
if (!prototype && (prototype !== null))
JSIL.RuntimeError("Prototype not specified");
return Object.create(prototype);
};
JSIL.HasOwnPropertyRecursive = function (target, name) {
while (!target.hasOwnProperty(name)) {
target = Object.getPrototypeOf(target);
if ((typeof (target) === "undefined") || (target === null))
return false;
}
return target.hasOwnProperty(name);
};
JSIL.GetOwnPropertyDescriptorRecursive = function (target, name) {
while (!target.hasOwnProperty(name)) {
target = Object.getPrototypeOf(target);
if ((typeof (target) === "undefined") || (target === null))
return null;
}
return Object.getOwnPropertyDescriptor(target, name);
};
JSIL.SetValueProperty = function (target, key, value, enumerable, readOnly) {
var descriptor = {
configurable: true,
enumerable: !(enumerable === false)
};
if (readOnly === false) {
descriptor.value = value;
descriptor.writable = descriptor.writeable = !readOnly;
} else {
if (JSIL.ReadOnlyPropertyWriteWarnings) {
descriptor.get = function () {
return value;
};
descriptor.set = function () {
JSIL.RuntimeError("Attempt to write to read-only property '" + key + "'!");
};
} else {
descriptor.value = value;
descriptor.writable = descriptor.writeable = false;
}
}
Object.defineProperty(target, key, descriptor);
};
JSIL.DefineLazyDefaultProperty = function (target, key, getDefault) {
var isInitialized = false;
var defaultValue;
var descriptor = {
configurable: true,
enumerable: true
};
var cleanup = function () {
var currentDescriptor = Object.getOwnPropertyDescriptor(target, key);
// Someone could have replaced us with a new property. If so, don't trample
// over them.
if (
currentDescriptor &&
(currentDescriptor.get === descriptor.get) &&
(currentDescriptor.set === descriptor.set)
)
Object.defineProperty(target, key, {
configurable: true,
enumerable: true,
writable: true,
value: target[key]
});
};
var initIfNeeded = function (self) {
if (!isInitialized) {
isInitialized = true;
defaultValue = getDefault.call(self);
cleanup();
}
};
var getter = function LazyDefaultProperty_Get () {
initIfNeeded(this);
// HACK: We could return defaultValue here, but that would ignore cases where the initializer overwrote the default.
// The cctor for a static array field containing values is an example of this (issue #234)
var currentDescriptor = Object.getOwnPropertyDescriptor(target, key);
if (currentDescriptor.value)
return currentDescriptor.value;
else if (currentDescriptor.get !== descriptor.get)
return this[key];
else
return defaultValue;
};
var setter = function LazyDefaultProperty_Set (value) {
var setterDesc = {
configurable: true,
enumerable: true,
writable: true,
value: value
};
initIfNeeded(this);
// Overwrite the defaultValue so that any getter calls
// still return the correct result.
defaultValue = value;
// We *NEED* to update the field after we run the initializer,
// not before! If we update it before the initializer may overwrite
// it, and worse still, the initializer may not be expecting to see
// the write yet.
Object.defineProperty(
this, key, setterDesc
);
return value;
};
descriptor.get = getter;
descriptor.set = setter;
Object.defineProperty(target, key, descriptor);
};
JSIL.SetLazyValueProperty = function (target, key, getValue, onPrototype, readOnly) {
var isInitialized = false;
var descriptor = {
configurable: true,
enumerable: true,
};
if (onPrototype) {
var cleanup = function (value) {
JSIL.SetValueProperty(this, key, value, true, readOnly);
};
var getter = function LazyValueProperty_Get () {
var value = getValue.call(this);
cleanup.call(this, value);
return value;
};
descriptor.get = getter;
} else {
var value;
var cleanup = function () {
var currentDescriptor = Object.getOwnPropertyDescriptor(target, key);
// Someone could have replaced us with a new property. If so, don't trample
// over them.
if (
currentDescriptor &&
(currentDescriptor.get === descriptor.get)
) {
JSIL.SetValueProperty(target, key, value, true, readOnly);
} else {
return;
}
};
var getter = function LazyValueProperty_Get () {
if (!isInitialized) {
value = getValue.call(this);
if (!isInitialized) {
isInitialized = true;
cleanup.call(this);
}
}
return value;
};
descriptor.get = getter;
}
Object.defineProperty(target, key, descriptor);
};
JSIL.$NextTypeId = 0;
JSIL.$NextDispatcherId = 0;
JSIL.$AssignedTypeIds = {};
JSIL.$GenericParameterTypeIds = {};
JSIL.$PublicTypes = {};
JSIL.$PublicTypeAssemblies = {};
JSIL.$PrivateTypeAssemblies = {};
JSIL.$EntryPoints = {};
JSIL.$SpecialTypeObjects = {};
JSIL.$SpecialTypePrototypes = {};
JSIL.$MakeSpecialType = function (name, typeObjectBase, prototypeBase) {
var typeObject = Object.create(typeObjectBase);
JSIL.$SpecialTypeObjects[name] = typeObject;
var prototype = null;
if (prototypeBase)
prototype = JSIL.$MakeSpecialPrototype(name, prototypeBase);
return {
typeObject: typeObject,
prototype: prototype
};
};
JSIL.$MakeSpecialPrototype = function (name, prototypeBase) {
var prototype = Object.create(prototypeBase);
JSIL.$SpecialTypePrototypes[name] = prototype;
return prototype;
};
JSIL.$GetSpecialType = function (name) {
return {
typeObject: JSIL.$SpecialTypeObjects[name] || null,
prototype: JSIL.$SpecialTypePrototypes[name] || null
};
};
( function () {
JSIL.TypeObjectPrototype = Object.create(null);
// FIXME: It's gross that methods are split between this and System.Type externals.
JSIL.TypeObjectPrototype.toString = function () {
return JSIL.GetTypeName(this, true);
};
JSIL.TypeObjectPrototype.get_Assembly = function() {
return this.__Context__.__Assembly__;
};
JSIL.TypeObjectPrototype.get_BaseType = function () {
if (typeof (this.__BaseType__) !== "function")
return this.__BaseType__;
// Workaround for numeric types
return $jsilcore.System.ValueType.__Type__;
};
JSIL.TypeObjectPrototype.get_Namespace = function() {
// FIXME: Probably wrong for nested types.
return JSIL.GetParentName(this.__FullNameWithoutArguments__ || this.__FullName__);
};
JSIL.TypeObjectPrototype.get_Name = function() {
return JSIL.GetLocalName(this.__FullNameWithoutArguments__ || this.__FullName__);
};
JSIL.TypeObjectPrototype.get_FullName = function() {
if (this.get_IsGenericType() && !this.get_IsGenericTypeDefinition()) {
var result = this.__FullNameWithoutArguments__;
result += "[";
var ga = this.__GenericArgumentValues__;
for (var i = 0, l = ga.length; i < l; i++) {
var type = ga[i];
result += "[" + type.get_AssemblyQualifiedName() + "]";
}
result += "]";
return result;
} else {
return this.__FullName__;
}
};
JSIL.TypeObjectPrototype.get_AssemblyQualifiedName = function() {
return this.get_FullName() + ", " + this.get_Assembly().toString();
};
JSIL.TypeObjectPrototype.get_IsEnum = function() {
return this.__IsEnum__;
};
JSIL.TypeObjectPrototype.get_ContainsGenericParameters = function() {
return this.__IsClosed__ === false;
};
JSIL.TypeObjectPrototype.get_IsGenericType = function() {
return (this.__OpenType__ !== undefined || this.__IsClosed__ === false) && !(this instanceof JSIL.GenericParameter);
};
JSIL.TypeObjectPrototype.get_IsGenericTypeDefinition = function() {
return this.__IsClosed__ === false && this.__GenericArgumentValues__ === undefined && !(this instanceof JSIL.GenericParameter);
};
JSIL.TypeObjectPrototype.get_IsValueType = function() {
return this.__IsValueType__;
};
JSIL.TypeObjectPrototype.get_IsArray = function() {
return this.__IsArray__;
};
JSIL.TypeObjectPrototype.get_IsGenericParameter = function() {
return false;
};
JSIL.TypeObjectPrototype.get_IsByRef = function() {
return this.__IsByRef__;
};
JSIL.TypeObjectPrototype.get_IsInterface = function() {
// FIXME: I think Object.DefineProperty might mess with us here. Should probably rename the backing value to __IsInterface__.
return this.IsInterface;
};
var systemObjectPrototype = JSIL.$MakeSpecialPrototype("System.Object", Object.prototype);
var memberInfoPrototype = JSIL.$MakeSpecialPrototype("System.Reflection.MemberInfo", systemObjectPrototype);
var systemTypePrototype = JSIL.$MakeSpecialPrototype("System.Type", memberInfoPrototype);
var typeInfoPrototype = JSIL.$MakeSpecialPrototype("System.Reflection.TypeInfo", systemTypePrototype);
var runtimeTypePrototype = JSIL.$MakeSpecialPrototype("System.RuntimeType", typeInfoPrototype);
var dict = JSIL.$MakeSpecialType("System.RuntimeType", runtimeTypePrototype, null);
var runtimeType = dict.typeObject;
for (var k in JSIL.TypeObjectPrototype)
runtimeType[k] = JSIL.TypeObjectPrototype[k];
JSIL.SetValueProperty(runtimeType, "__IsReferenceType__", true);
runtimeType.IsInterface = false;
runtimeType.__IsEnum__ = false;
runtimeType.__ThisType__ = runtimeType;
runtimeType.__TypeInitialized__ = false;
runtimeType.__LockCount__ = 0;
JSIL.SetValueProperty(runtimeType, "__FullName__", "System.RuntimeType");
JSIL.SetValueProperty(runtimeType, "__ShortName__", "RuntimeType");
var assemblyPrototype = JSIL.$MakeSpecialPrototype("System.Reflection.Assembly", systemObjectPrototype);
dict = JSIL.$MakeSpecialType("System.Reflection.RuntimeAssembly", runtimeTypePrototype, assemblyPrototype);
var runtimeAssembly = dict.typeObject;
JSIL.SetValueProperty(runtimeAssembly, "__IsReferenceType__", true);
runtimeAssembly.IsInterface = false;
runtimeAssembly.__IsEnum__ = false;
runtimeAssembly.__ThisType__ = runtimeType;
runtimeAssembly.__ThisTypeId__ = runtimeType.__TypeId__;
runtimeAssembly.__TypeInitialized__ = false;
runtimeAssembly.__LockCount__ = 0;
JSIL.SetValueProperty(runtimeAssembly, "__FullName__", "System.Reflection.RuntimeAssembly");
JSIL.SetValueProperty(runtimeAssembly, "__ShortName__", "RuntimeAssembly");
} )();
JSIL.SetTypeId = function (typeObject, publicInterface, prototype, value) {
if (!value)
value = prototype;
if (typeof (value) !== "string")
JSIL.RuntimeError("Type IDs must be strings");
JSIL.SetValueProperty(typeObject, "__TypeId__", value);
JSIL.SetValueProperty(publicInterface, "__TypeId__", value);
if (arguments.length === 4)
JSIL.SetValueProperty(prototype, "__ThisTypeId__", value);
}
JSIL.AssignTypeId = function (assembly, typeName) {
if (JSIL.EscapeName)
typeName = JSIL.EscapeName(typeName);
if (typeof (assembly.__AssemblyId__) === "undefined")
JSIL.RuntimeError("Invalid assembly context");
if (typeof (JSIL.$PublicTypeAssemblies[typeName]) !== "undefined") {
assembly = JSIL.$PublicTypeAssemblies[typeName];
} else if (typeof (JSIL.$PrivateTypeAssemblies[typeName]) !== "undefined") {
assembly = JSIL.$PrivateTypeAssemblies[typeName];
}
var key = assembly.__AssemblyId__ + "$" + typeName;
var result = JSIL.$AssignedTypeIds[key];
if (typeof (result) !== "string")
result = JSIL.$AssignedTypeIds[key] = String(++(JSIL.$NextTypeId));
return result;
};
JSIL.DeclareAssembly = function (assemblyName) {
var existing = JSIL.GetAssembly(assemblyName, true);
if ((existing !== null) && (existing.__Declared__))
JSIL.RuntimeError("Assembly '" + assemblyName + "' already declared.");
var result = JSIL.GetAssembly(assemblyName, false);
JSIL.SetValueProperty(result, "__Declared__", true);
$private = result;
return result;
};
JSIL.GetAssembly = function (assemblyName, requireExisting) {
var existing = JSIL.PrivateNamespaces[assemblyName];
if (typeof (existing) !== "undefined")
return existing;
var shortName = assemblyName;
var commaPos = shortName.indexOf(",");
if (commaPos >= 0)
shortName = shortName.substr(0, commaPos);
if (typeof (JSIL.AssemblyShortNames[shortName]) !== "undefined") {
var existingFullName = JSIL.AssemblyShortNames[shortName];
if ((existingFullName !== null) && (commaPos <= 0)) {
existing = JSIL.PrivateNamespaces[existingFullName];
if (typeof (existing) !== "undefined")
return existing;
} else if (commaPos >= 0) {
// Multiple assemblies with the same short name, so disable the mapping.
JSIL.AssemblyShortNames[shortName] = null;
}
} else if (commaPos >= 0) {
JSIL.AssemblyShortNames[shortName] = assemblyName;
}
if (requireExisting)
return null;
var isMscorlib = (shortName === "mscorlib") || (assemblyName.indexOf("mscorlib,") === 0);
var isSystem = (shortName === "System") || (assemblyName.indexOf("System,") === 0);
var isSystemCore = (shortName === "System.Core") || (assemblyName.indexOf("System.Core,") === 0);
var isSystemXml = (shortName === "System.Xml") || (assemblyName.indexOf("System.Xml,") === 0);
var isJsilMeta = (shortName === "JSIL.Meta") || (assemblyName.indexOf("JSIL.Meta,") === 0);
// Create a new private global namespace for the new assembly
var template = {};
// Ensure that BCL private namespaces inherit from the JSIL namespace.
if (isMscorlib || isSystem || isSystemCore || isSystemXml || isJsilMeta)
template = $jsilcore;
var result = JSIL.CreateSingletonObject(template);
var assemblyId;
// Terrible hack to assign the mscorlib and JSIL.Core types the same IDs
if (isMscorlib) {
assemblyId = $jsilcore.__AssemblyId__;
} else {
assemblyId = ++JSIL.$NextAssemblyId;
}
var makeReflectionAssembly = function () {
var proto = JSIL.$GetSpecialType("System.Reflection.RuntimeAssembly").prototype;
var reflectionAssembly = Object.create(proto);
JSIL.SetValueProperty(reflectionAssembly, "__PublicInterface__", result);
JSIL.SetValueProperty(reflectionAssembly, "__FullName__", assemblyName);
return reflectionAssembly;
};
JSIL.SetValueProperty(result, "__Declared__", false);
JSIL.SetLazyValueProperty(result, "__Assembly__", makeReflectionAssembly);
JSIL.SetValueProperty(result, "__AssemblyId__", assemblyId, false);
JSIL.SetValueProperty(result, "TypeRef",
function (name, ga) {
return new JSIL.TypeRef(result, name, ga);
}, false
);
JSIL.SetValueProperty(result, "toString",
function Assembly_ToString () {
return "<" + assemblyName + " Public Interface>";
}
);
JSIL.SetValueProperty(result, "$typesByName", {}, false);
JSIL.PrivateNamespaces[assemblyName] = result;
return result;
};
var $jsilcore = JSIL.DeclareAssembly("JSIL.Core");
(function () {
JSIL.$SpecialTypePrototypes["System.RuntimeType"].__ThisTypeId__ =
JSIL.$SpecialTypeObjects["System.RuntimeType"].__TypeId__ =
JSIL.AssignTypeId($jsilcore, "System.RuntimeType");
})();
// Using these constants instead of 'null' turns some call sites from dimorphic to monomorphic in SpiderMonkey's
// type inference engine.
$jsilcore.ArrayNotInitialized = ["ArrayNotInitialized"];
$jsilcore.ArrayNull = [];
$jsilcore.FunctionNotInitialized = function () { throw new Error("FunctionNotInitialized"); };
$jsilcore.FunctionNull = function () { };
JSIL.Memoize = function Memoize (value) {
if (typeof (value) === "undefined")
JSIL.RuntimeError("Memoized value is undefined");
return function MemoizedValue () {
return value;
};
};
JSIL.PreInitMembrane = function (target, initializer) {
if (typeof (initializer) !== "function")
JSIL.RuntimeError("initializer is not a function");
if (
(typeof (target) !== "object") &&
(typeof (target) !== "function")
)
JSIL.RuntimeError("target must be an object or function");
if (target.__PreInitMembrane__)
JSIL.RuntimeError("object already has a membrane");
this.target = target;
this.target.__PreInitMembrane__ = this;
this.hasRunInitializer = false;
this.hasRunCleanup = false;
this.initializer = initializer;
this.cleanupList = [];
this.aliasesByKey = {};
this.propertiesToRebind = [];
// Function.bind is too slow to rely on in a hot path function like these
var self = this;
var _maybeInit = Object.getPrototypeOf(this).maybeInit;
var _cleanup = Object.getPrototypeOf(this).cleanup;
this.maybeInit = function bound_maybeInit () {
_maybeInit.call(self);
};
this.cleanup = function bound_cleanup () {
return _cleanup.call(self);
};
};
JSIL.PreInitMembrane.prototype.checkForUseAfterCleanup = function () {
if (this.hasRunCleanup)
JSIL.RuntimeError("Membrane in use after cleanup");
};
JSIL.PreInitMembrane.prototype.maybeInit = function () {
if (this.hasRunCleanup && this.hasRunInitializer) {
// HACK for #651
// JSIL.RuntimeError("maybeInit called after init and cleanup");
}
if (!this.hasRunInitializer) {
this.hasRunInitializer = true;
this.initializer();
}
if (!this.hasRunCleanup) {
this.cleanup();
}
};
JSIL.PreInitMembrane.prototype.rebindProperties = function () {
for (var i = 0, l = this.propertiesToRebind.length; i < l; i++) {
var propertyName = this.propertiesToRebind[i];
var descriptor = Object.getOwnPropertyDescriptor(this.target, propertyName);
if (!descriptor)
continue;
var doRebind = false;
if (descriptor.get && descriptor.get.__IsMembrane__) {
descriptor.get = this.target[descriptor.get.__OriginalKey__];
doRebind = true;
}
if (descriptor.set && descriptor.set.__IsMembrane__) {
descriptor.set = this.target[descriptor.set.__OriginalKey__];
doRebind = true;
}
if (doRebind) {
Object.defineProperty(this.target, propertyName, descriptor);
}
};
};
JSIL.PreInitMembrane.prototype.cleanup = function () {
this.hasRunCleanup = true;
for (var i = 0, l = this.cleanupList.length; i < l; i++) {
var cleanupFunction = this.cleanupList[i];
cleanupFunction();
}
this.rebindProperties();
this.initializer = null;
this.cleanupList = null;
this.aliasesByKey = null;
this.target.__PreInitMembrane__ = null;
// this.propertiesToRebind = null;
// this.target = null;
return true;
};
JSIL.PreInitMembrane.prototype.defineField = function (key, getInitialValue) {
this.checkForUseAfterCleanup();
var needToGetFieldValue = true;
var fieldValue;
var target = this.target;
this.cleanupList.push(function PreInitField_Cleanup () {
if (needToGetFieldValue) {
needToGetFieldValue = false;
fieldValue = getInitialValue();
}
Object.defineProperty(target, key, {
configurable: true,
enumerable: true,
writable: true,
value: fieldValue
});
});
var maybeInit = this.maybeInit;
var getter = function PreInitField_Get () {
maybeInit();
if (needToGetFieldValue) {
needToGetFieldValue = false;
fieldValue = getInitialValue();
}
return fieldValue;
}
var setter = function PreInitField_Set (value) {
needToGetFieldValue = false;
fieldValue = value;
return value;
};
Object.defineProperty(
target, key, {
configurable: true,
enumerable: true,
get: getter,
set: setter
}
);
};
JSIL.PreInitMembrane.prototype.defineMethod = function (key, fnGetter) {
this.checkForUseAfterCleanup();
var aliasesByKey = this.aliasesByKey;
var actualFn = $jsilcore.FunctionNotInitialized;
var target = this.target;
var membrane;
this.cleanupList.push(function PreInitMethod_Cleanup () {
if (actualFn === $jsilcore.FunctionNotInitialized)
actualFn = fnGetter();
if (target[key].__IsMembrane__)
JSIL.SetValueProperty(target, key, actualFn);
var aliases = aliasesByKey[key];
if (aliases) {
for (var i = 0, l = aliases.length; i < l; i++) {
var alias = aliases[i];
if (target[alias].__IsMembrane__)
JSIL.SetValueProperty(target, alias, actualFn);
}
}
// delete this.aliasesByKey[key];
});
var maybeInit = this.maybeInit;
membrane = function PreInitMethod_Invoke () {
maybeInit();
if (actualFn === $jsilcore.FunctionNotInitialized)
actualFn = fnGetter();
return actualFn.apply(this, arguments);
};
membrane.__Membrane__ = this;
membrane.__IsMembrane__ = true;
membrane.__OriginalKey__ = key;
membrane.__Unwrap__ = function () {
maybeInit();
if (actualFn === $jsilcore.FunctionNotInitialized)
actualFn = fnGetter();
return actualFn;
};
JSIL.SetValueProperty(target, key, membrane);
};
JSIL.PreInitMembrane.prototype.defineMethodAlias = function (key, alias) {
this.checkForUseAfterCleanup();
var aliases = this.aliasesByKey[key];
if (!aliases)
aliases = this.aliasesByKey[key] = [];
aliases.push(alias);
};
JSIL.PreInitMembrane.prototype.registerPropertyForRebind = function (key) {
this.checkForUseAfterCleanup();
this.propertiesToRebind.push(key);
};
JSIL.DefinePreInitField = function (target, key, getInitialValue, initializer) {
var membrane = target.__PreInitMembrane__;
if (!membrane)
membrane = new JSIL.PreInitMembrane(target, initializer);
membrane.defineField(key, getInitialValue);
};
JSIL.DefinePreInitMethod = function (target, key, fnGetter, initializer) {
var membrane = target.__PreInitMembrane__;
if (!membrane)
membrane = new JSIL.PreInitMembrane(target, initializer);
membrane.defineMethod(key, fnGetter);
};
JSIL.DefinePreInitMethodAlias = function (target, alias, originalMethod) {
if (!originalMethod.__IsMembrane__)
JSIL.RuntimeError("Method is not a membrane");
var membrane = originalMethod.__Membrane__;
membrane.defineMethodAlias(originalMethod.__OriginalKey__, alias);
};
JSIL.RebindPropertyAfterPreInit = function (target, propertyName) {
var membrane = target.__PreInitMembrane__;
if (!membrane)
membrane = new JSIL.PreInitMembrane(target, initializer);
membrane.registerPropertyForRebind(propertyName);
};
$jsilcore.SystemObjectInitialized = false;
$jsilcore.RuntimeTypeInitialized = false;
$jsilcore.TypedArrayToType = {};
JSIL.AssemblyCollection = function (obj) {
var makeGetter = function (assemblyName) {
return function GetAssemblyFromCollection () {
var state = JSIL.GetAssembly(assemblyName, true);
return state;
};
};
for (var k in obj) {
JSIL.SetLazyValueProperty(
this, k, makeGetter(obj[k])
);
}
};
JSIL.Name = function (name, context) {
if (typeof (context) !== "string") {
if (context.__FullName__)
context = context.__FullName__;
else
context = String(context);
}
this.humanReadable = context + "." + String(name);
this.key = JSIL.EscapeName(context) + "$" + JSIL.EscapeName(String(name));
};
JSIL.Name.prototype.get = function (target) {
return target[this.key];
};
JSIL.Name.prototype.set = function (target, value) {
target[this.key] = value;
return value;
};
JSIL.Name.prototype.defineProperty = function (target, decl) {
Object.defineProperty(
target, this.key, decl
);
};
JSIL.Name.prototype.toString = function () {
return this.humanReadable;
};
JSIL.SplitRegex = /[\.]/g;
JSIL.UnderscoreRegex = /[\.\/\+]/g;
JSIL.AngleGroupRegex = /\<([^<>]*)\>/g;
JSIL.EscapedNameCharacterRegex = /[\.\/\+\`\~\:\<\>\(\)\{\}\[\]\@\-\=\?\!\*\ \&\,\|\']/g;
JSIL.EscapeName = function (name) {
if ((!name) || (typeof (name) !== "string"))
throw new Error("EscapeName only accepts a string");
// FIXME: It sucks that this has to manually duplicate the C# escape logic.
name = name.replace(JSIL.AngleGroupRegex, function (match, group1) {
return "$l" + group1.replace(JSIL.UnderscoreRegex, "_") + "$g";
});
// HACK: Using a regex here to try to avoid generating huge rope strings in v8
name = name.replace(JSIL.EscapedNameCharacterRegex, function (match) {
var ch = match[0];
switch (ch) {
case ".":
case "/":
case "+":
return "_";
case "`":
return "$b";
case "~":
return "$t";
case ":":
return "$co";
case "<":
return "$l";
case ">":
return "$g";
case "(":
return "$lp";
case ")":
return "$rp";
case "{":
return "$lc";
case "}":
return "$rc";
case "[":
return "$lb";
case "]":
return "$rb";
case "@":
return "$at";
case "-":
return "$da";
case "=":
return "$eq";
case " ":
return "$sp";
case "?":
return "$qu";
case "!":
return "$ex";
case "*":
return "$as";
case "&":
return "$am";
case ",":
return "$cm";
case "|":
return "$vb";
case "'":
return "$q";
}
var chIndex = ch.charCodeAt(0);
if ((chIndex < 32) || (chIndex >= 127)) {
// FIXME: Padding?
return "$" + ch.toString(16);
}
return ch;
});
return name;
};
JSIL.GetParentName = function (name) {
var parts = JSIL.SplitName(name);
return name.substr(0, name.length - (parts[parts.length - 1].length + 1));
};
JSIL.GetLocalName = function (name) {
var parts = JSIL.SplitName(name);
return parts[parts.length - 1];
};
JSIL.SplitName = function (name) {
if (typeof (name) !== "string")
JSIL.Host.abort(new Error("Not a name: " + name));
var escapedName = name.replace(JSIL.AngleGroupRegex, function (match, group1) {
return "$l" + group1.replace(JSIL.UnderscoreRegex, "_") + "$g";
});
return escapedName.split(JSIL.SplitRegex);
};
JSIL.ResolvedName = function (parent, parentName, key, allowInheritance) {
this.parent = parent;
this.parentName = parentName;
this.key = key;
this.allowInheritance = allowInheritance;
};
JSIL.ResolvedName.prototype.exists = function (allowInheritance) {
if (this.allowInheritance && (allowInheritance !== false))
return (this.key in this.parent);
else
return this.parent.hasOwnProperty(this.key);
};
JSIL.ResolvedName.prototype.get = function () {
return this.parent[this.key];
};
JSIL.ResolvedName.prototype.set = function (value) {
JSIL.SetValueProperty(this.parent, this.key, value);
return value;
};
JSIL.ResolvedName.prototype.setLazy = function (getter) {
JSIL.SetLazyValueProperty(this.parent, this.key, getter);
};
JSIL.ResolvedName.prototype.define = function (declaration) {
var target = this.parent;
var isWindow = (Object.getPrototypeOf(target) === Object.getPrototypeOf(JSIL.GlobalNamespace));
if (isWindow && "configurable" in declaration)
delete declaration["configurable"];
Object.defineProperty(target, this.key, declaration);
var descriptor = Object.getOwnPropertyDescriptor(this.parent, this.key);
if (declaration.value) {
if (descriptor.value != declaration.value)
JSIL.RuntimeError("Failed to define property '" + this.key + "'.");
} else if (declaration.get) {
if (descriptor.get != declaration.get)
JSIL.RuntimeError("Failed to define property '" + this.key + "'.");
}
};
JSIL.ResolveName = function (root, name, allowInheritance, throwOnFail) {
var parts = JSIL.SplitName(name);
var current = root;
if (typeof (root) === "undefined")
JSIL.RuntimeError("Invalid search root");
var makeError = function (_key, _current) {
var namespaceName;
if (_current === JSIL.GlobalNamespace)
namespaceName = "<global>";
else {
try {
namespaceName = _current.toString();
} catch (e) {
namespaceName = "<unknown>";
}
}
return new Error("Could not find the name '" + _key + "' in the namespace '" + namespaceName + "'.");
};
for (var i = 0, l = parts.length - 1; i < l; i++) {
var key = JSIL.EscapeName(parts[i]);
if (!(key in current)) {
if (throwOnFail !== false)
throw makeError(key, current);
else
return null;
}
if (!allowInheritance) {
if (!current.hasOwnProperty(key)) {
if (throwOnFail !== false)
throw makeError(key, current);
else
return null;
}
}
var next = current[key];
current = next;
}
var localName = parts[parts.length - 1];
return new JSIL.ResolvedName(
current, name.substr(0, name.length - (localName.length + 1)),
JSIL.EscapeName(localName), allowInheritance
);
};
// Must not be used to construct type or interact with members. Only to get a reference to the type for access to type information.
JSIL.GetTypeByName = function (name, assembly) {
if (name.indexOf("!!") === 0)
JSIL.RuntimeError("Positional generic method parameter '" + name + "' cannot be resolved by GetTypeByName.");
if (assembly !== undefined) {
var tbn = assembly.$typesByName;
if (typeof (tbn) === "object") {
var typeFunction = tbn[name];
if (typeof (typeFunction) === "function")
return typeFunction(false);
} else {
JSIL.Host.warning("Invalid assembly reference passed to GetTypeByName: " + assembly);
}
}
var key = JSIL.EscapeName(name);
var typeFunction = JSIL.$PublicTypes[key];
if (typeof (typeFunction) !== "function")
JSIL.RuntimeError("Type '" + name + "' has not been defined.");
return typeFunction(false);
};
JSIL.DefineTypeName = function (name, getter, isPublic) {
if (typeof (getter) !== "function")
JSIL.RuntimeError("Definition for type name '" + name + "' is not a function");
if (isPublic) {
var key = JSIL.EscapeName(name);
var existing = JSIL.$PublicTypes[key];
var existingAssembly = JSIL.$PublicTypeAssemblies[key];
if ((typeof (existing) === "function") && (existingAssembly !== $jsilcore)) {
JSIL.$PublicTypes[key] = function AmbiguousPublicTypeReference () {
JSIL.RuntimeError("Type '" + name + "' has multiple public definitions. You must access it through a specific assembly.");
};
if (existingAssembly != undefined) {
JSIL.WarningFormat(
"Public type '{0}' defined twice: {1} and {2}",
[name, existingAssembly.toString(), $private.toString()]
);
delete JSIL.$PublicTypeAssemblies[key];
} else {
JSIL.WarningFormat(
"Public type '{0}' defined more than twice: {1} and several other assemblies",
[name, $private.toString()]
);
}
} else {
JSIL.$PublicTypes[key] = getter;
JSIL.$PublicTypeAssemblies[key] = $private;
}
} else if ($private == $jsilcore) {
var key = JSIL.EscapeName(name);
JSIL.$PrivateTypeAssemblies[key] = $private;
} else {
var key = JSIL.EscapeName(name);
var existing = JSIL.$PrivateTypeAssemblies[key];
if (existing !== undefined){
if (existing != $jsilcore) {
JSIL.WarningFormat(
"Private type '{0}' with external implementation defined more than twice: '{1}'" +
[$private.toString(), existing.toString()]
);
}
JSIL.$PrivateTypeAssemblies[key] = $private;
}
}
var existing = $private.$typesByName[name];
if (typeof (existing) === "function")
JSIL.RuntimeError("Type '" + name + "' has already been defined.");
$private.$typesByName[name] = getter;
};
JSIL.DeclareNamespace = function (name, sealed) {
if (typeof (sealed) === "undefined")
sealed = true;
var toStringImpl = function Namespace_ToString () {
return name;
};
var resolved = JSIL.ResolveName(JSIL.GlobalNamespace, name, true);
if (!resolved.exists())
resolved.define({
enumerable: true,
configurable: !sealed,
value: {
__FullName__: name,
toString: toStringImpl
}
});
var resolved = JSIL.ResolveName($private, name, true);
if (!resolved.exists())
resolved.define({
enumerable: true,
configurable: !sealed,
value: {
__FullName__: name,
toString: toStringImpl
}
});
};
JSIL.DeclareNamespace("System");
JSIL.DeclareNamespace("System.Collections");
JSIL.DeclareNamespace("System.Collections.Generic");
JSIL.DeclareNamespace("System.Text");
JSIL.DeclareNamespace("System.Threading");
JSIL.DeclareNamespace("System.Globalization");
JSIL.DeclareNamespace("System.Runtime");
JSIL.DeclareNamespace("System.Runtime.InteropServices");
JSIL.DeclareNamespace("System.Reflection");
JSIL.DeclareNamespace("JSIL");
JSIL.DeclareNamespace("JSIL.Array");
JSIL.DeclareNamespace("JSIL.Delegate");
JSIL.DeclareNamespace("JSIL.MulticastDelegate");
JSIL.DeclareNamespace("JSIL.Dynamic");
// Hack
JSIL.DeclareNamespace("Property");
// Implemented in JSIL.Host.js
JSIL.DeclareNamespace("JSIL.Host", false);
JSIL.UnmaterializedReference = function (targetExpression) {
JSIL.Host.abort(new Error("A reference to expression '" + targetExpression + "' could not be translated."));
};
JSIL.UntranslatableNode = function (nodeType) {
JSIL.Host.abort(new Error("An ILAst node of type " + nodeType + " could not be translated."));
};
JSIL.UntranslatableFunction = function (functionName) {
return function UntranslatableFunctionInvoked () {
JSIL.Host.abort(new Error("The function '" + functionName + "' could not be translated."));
};
};
JSIL.UntranslatableInstruction = function (instruction, operand) {
if (typeof (operand) !== "undefined")
JSIL.Host.abort(new Error("A MSIL instruction of type " + instruction + " with an operand of type " + operand + " could not be translated."));
else
JSIL.Host.abort(new Error("A MSIL instruction of type " + instruction + " could not be translated."));
};
JSIL.IgnoredType = function (typeName) {
JSIL.Host.abort(new Error("An attempt was made to reference the type '" + typeName + "', but it was explicitly ignored during translation."));
};
JSIL.IgnoredMember = function (memberName) {
JSIL.Host.abort(new Error("An attempt was made to reference the member '" + memberName + "', but it was explicitly ignored during translation."));
};
JSIL.UnknownMember = function (memberName) {
JSIL.Host.abort(new Error("An attempt was made to reference the member '" + memberName + "', but it has no type information."));
};
JSIL.$UnimplementedExternalError = function (err) {
if (typeof err === "string") {
if (arguments.length === 2)
err = JSIL.$FormatStringImpl(err, arguments[1]);
else if (arguments.length > 2)
JSIL.RuntimeError("$UnimplementedExternalError only accepts (errString), (error), or (errString, [value0, value1, ...])");
err = new Error(err);
}
var msg = err.message;
if (typeof (err.stack) !== "undefined") {
if (err.stack.indexOf(err.toString()) === 0)
msg = err.stack;
else
msg += "\n" + err.stack;
}
JSIL.Host.warning(msg);
if (JSIL.ThrowOnUnimplementedExternals) {
JSIL.Host.abort(err);
}
}
JSIL.$ExternalMemberWarningFormat =
"The external method '{0}' of type '{1}' has not been implemented.";
JSIL.$ExternalMemberInheritedWarningFormat =
"The external method '{0}' of type '{1}' has not been implemented; calling inherited method.";
JSIL.MakeExternalMemberStub = function (namespaceName, getMemberName, inheritedMember) {
var state = {
warningCount: 0
};
var result;
if (typeof (inheritedMember) === "function") {
result = function ExternalMemberStub () {
if (state.warningCount < 1) {
JSIL.WarningFormat(
JSIL.$ExternalMemberInheritedWarningFormat,
[getMemberName.call(this), namespaceName]
);
state.warningCount += 1;
}
return Function.prototype.apply.call(inheritedMember, this, arguments);
};
} else {
result = function ExternalMemberStub () {
if (state.warningCount > 3)
return;
var fmtArgs = [getMemberName.call(this), namespaceName];
if (JSIL.ThrowOnUnimplementedExternals)
throw new Error(
JSIL.$FormatStringImpl(
JSIL.$ExternalMemberWarningFormat, fmtArgs
)
);
else
JSIL.WarningFormat(
JSIL.$ExternalMemberWarningFormat, fmtArgs
);
state.warningCount += 1;
};
}
result.__IsPlaceholder__ = true;
return result;
};
JSIL.MemberRecord = function (type, descriptor, data, attributes, overrides) {
this.type = type;
this.descriptor = descriptor;
this.data = data;
this.attributes = attributes;
this.overrides = overrides;
};
JSIL.AttributeRecord = function (context, type, getConstructorArguments, initializer) {
this.context = context;
this.type = type;
this.getConstructorArguments = getConstructorArguments;
this.initializer = initializer;
};
JSIL.OverrideRecord = function (interfaceNameOrReference, interfaceMemberName) {
if (
(
(typeof (interfaceNameOrReference) !== "string") &&
(typeof (interfaceNameOrReference) !== "object")
) || !interfaceNameOrReference
) {
JSIL.RuntimeError("Override must specify interface name or typeref");
}
this.interfaceNameOrReference = interfaceNameOrReference;
this.interfaceMemberName = interfaceMemberName;
};
JSIL.AttributeRecord.prototype.GetType = function () {
if (this.resolvedType)
return this.resolvedType;
var resolvedType = JSIL.ResolveTypeReference(this.type, this.context)[1];
if (!resolvedType)
JSIL.RuntimeError("Failed to resolve attribute type '" + this.type + "'")
return this.resolvedType = resolvedType;
};
JSIL.AttributeRecord.prototype.Construct = function () {
var resolvedType = this.GetType();
var constructorArguments;
if (this.getConstructorArguments)
this.constructorArguments = constructorArguments = this.getConstructorArguments();
else
this.constructorArguments = constructorArguments = [];
var instance = JSIL.CreateInstanceOfType(resolvedType, "_ctor", constructorArguments);
return instance;
};
JSIL.RawMethodRecord = function (name, isStatic) {
this.name = name;
this.isStatic = isStatic;
};
JSIL.ImplementExternals = function (namespaceName, externals) {
if (typeof (namespaceName) !== "string") {
JSIL.Host.abort(new Error("ImplementExternals expected name of namespace"));
return;
}
var trace = false;
var context = $private;
var queue = JSIL.ExternalsQueue[namespaceName];
if (!JSIL.IsArray(queue)) {
JSIL.ExternalsQueue[namespaceName] = queue = [];
}
var obj = JSIL.AllImplementedExternals[namespaceName];
if (typeof (obj) !== "object") {
JSIL.AllImplementedExternals[namespaceName] = obj = {};
}
if (obj.__IsInitialized__) {
JSIL.Host.abort(new Error("Type '" + namespaceName + "' already initialized"));
return;
}
if (typeof (externals) !== "function") {
if (trace)
JSIL.WarningFormat("Old-style ImplementExternals call for '{0}' ignored!", [namespaceName]);
return;
}
// Deferring the execution of externals functions is important in case they reference
// other types or assemblies.
queue.push(function ImplementExternalsImpl () {
var typeId = JSIL.AssignTypeId(context, namespaceName);
var typeObject = {
__Members__: [],
__RawMethods__: [],
__TypeId__: typeId,
__FullName__: namespaceName
};
var publicInterface = {
prototype: {
__TypeId__: typeId
},
__TypeId__: typeId
};
var ib = new JSIL.InterfaceBuilder(context, typeObject, publicInterface);
externals(ib);
var prefix = "instance$";
var m = typeObject.__Members__;
for (var i = 0; i < m.length; i++) {
var member = m[i];
var type = member.type;
var descriptor = member.descriptor;
var data = member.data;
var name = data.mangledName || descriptor.EscapedName;
var target = descriptor.Static ? publicInterface : publicInterface.prototype;
if (typeof (data.constant) !== "undefined") {
obj[descriptor.EscapedName + "$constant"] = data.constant;
} else if (data.mangledName) {
obj[descriptor.Static ? data.mangledName : prefix + data.mangledName] = [member, target[name]];
}
}
var rm = typeObject.__RawMethods__;
for (var i = 0; i < rm.length; i++) {
var rawMethod = rm[i];
var suffix = "$raw";
if (rawMethod.isStatic) {
obj[rawMethod.name + suffix] = [null, publicInterface[rawMethod.name]];
} else {
obj[prefix + rawMethod.name + suffix] = [null, publicInterface.prototype[rawMethod.name]];
}
}
});
};
JSIL.QueueTypeInitializer = function (type, initializer) {
if (type.__TypeInitialized__) {
initializer(type);
} else {
type.__Initializers__.push(initializer);
}
};
JSIL.Initialize = function () {
// Seal all registered names so that their static constructors run on use
var arn = JSIL.AllRegisteredNames;
for (var i = 0, l = arn.length; i < l; i++)
arn[i].sealed = true;
// Necessary because we can't rely on membranes for these types.
JSIL.InitializeType($jsilcore.System.RuntimeType);
JSIL.InitializeType($jsilcore.System.Reflection.RuntimeAssembly);
JSIL.InitializeType($jsilcore.System.Object);
$jsilcore.System.Type.__Type__.__TypeInitialized__ = false;
JSIL.InitializeType($jsilcore.System.Type);
};
JSIL.GenericParameter = function (name, context) {
var key;
this.name = new JSIL.Name(name, context);
this.covariant = false;
this.contravariant = false;
if (typeof (context) === "string") {
key = JSIL.EscapeName(String(context)) + "$" + JSIL.EscapeName(String(name));
} else if (typeof (context.__TypeId__) === "undefined") {
JSIL.RuntimeError("Invalid context for generic parameter");
} else {
key = context.__TypeId__ + "$" + JSIL.EscapeName(String(name));
}
if (typeof (JSIL.$GenericParameterTypeIds[key]) === "undefined") {
var typeId = String(++JSIL.$NextTypeId);
JSIL.$GenericParameterTypeIds[key] = typeId;
JSIL.SetValueProperty(this, "__TypeId__", typeId);
} else {
JSIL.SetValueProperty(this, "__TypeId__", JSIL.$GenericParameterTypeIds[key]);
}
JSIL.SetValueProperty(this, "__ShortName__", name);
JSIL.SetValueProperty(this, "__FullName__", this.name.humanReadable);
};
JSIL.GenericParameter.prototype = Object.create(JSIL.TypeObjectPrototype);
JSIL.GenericParameter.prototype.in = function () {
this.contravariant = true;
return this;
};
JSIL.GenericParameter.prototype.out = function () {
this.covariant = true;
return this;
};
JSIL.GenericParameter.prototype.get = function (context) {
if (!context) {
JSIL.RuntimeError("No context provided when resolving generic parameter '" + this.name + "'");
return JSIL.AnyType;
}
return this.name.get(context);
};
JSIL.GenericParameter.prototype.toString = function () {
var result = "<GP ";
if (this.contravariant)
result += "in ";
if (this.covariant)
result += "out ";
result += this.name.humanReadable + ">";
return result;
};
JSIL.GenericParameter.prototype.get_IsGenericParameter = function () {
return true;
};
JSIL.GenericParameter.prototype.get_Name = function () {
return this.name.humanReadable;
};
JSIL.GenericParameter.prototype.__IsClosed__ = false;
JSIL.PositionalGenericParameter = function (name, context) {
this.index = parseInt(name.substr(2));
JSIL.SetValueProperty(this, "__TypeId__", name);
this.__Context__ = context || $jsilcore;
var fullNameDecl = {
configurable: true,
enumerable: true,
get: this.getFullName
};
Object.defineProperty(this, "__FullName__", fullNameDecl);
Object.defineProperty(this, "__FullNameWithoutArguments__", fullNameDecl);
};
JSIL.PositionalGenericParameter.prototype = Object.create(JSIL.TypeObjectPrototype);
JSIL.PositionalGenericParameter.prototype.getFullName = function () {
return "!!" + this.index;
};
JSIL.PositionalGenericParameter.prototype.get = function (context) {
if ((typeof (context) !== "object") && (typeof (context) !== "function")) {
JSIL.RuntimeError("No context provided when resolving generic method parameter #" + this.index);
return JSIL.AnyType;
}
JSIL.RuntimeError("Not implemented");
};
JSIL.PositionalGenericParameter.prototype.toString = function (context) {
if (
(typeof (context) === "object") && (context !== null) &&
(Object.getPrototypeOf(context) === JSIL.MethodSignature.prototype)
) {
return context.genericArgumentNames[this.index];
}
return "<Generic Method Parameter #" + this.index + ">";
};
JSIL.PositionalGenericParameter.prototype.get_IsGenericParameter = function () {
return true;
};
JSIL.PositionalGenericParameter.prototype.get_Name = function () {
return "!!" + this.index;
};
JSIL.PositionalGenericParameter.prototype.__IsClosed__ = false;
JSIL.NamespaceRef = function (context, namespace) {
if (arguments.length === 1) {
this.context = null;
this.namespace = arguments[0];
} else if (arguments.length === 2) {
this.context = context;
this.namespace = namespace;
} else {
JSIL.RuntimeError("Invalid argument count");
}
this.cachedReference = null;
};
JSIL.NamespaceRef.prototype.toString = function () {
var result = null;
result = "ref namespace " + this.namespace;
return result;
};
JSIL.NamespaceRef.prototype.get = function () {
if (this.cachedReference !== null)
return this.cachedReference;
var result = JSIL.ResolveName(this.context, this.namespace, true);
if (!result.exists())
JSIL.RuntimeError("The name '" + this.namespace + "' does not exist.");
this.cachedReference = result.get();
return this.cachedReference;
};
JSIL.NamespaceRef.prototype.TypeRef = function (name, genericArguments) {
return new JSIL.TypeRef(this, name, genericArguments);
};
JSIL.TypeRef = function (context, name, genericArguments) {
if (arguments.length === 1) {
this.context = null;
this.typeName = null;
this.genericArguments = null;
this.cachedReference = arguments[0];
} else {
if (typeof (name) === "string") {
this.context = context;
this.typeName = name;
this.genericArguments = genericArguments || $jsilcore.ArrayNull;
this.cachedReference = null;
} else {
JSIL.Host.abort(new Error("Invalid type reference: " + name + " in context " + context));
}
}
if (JSIL.IsArray(this.genericArguments)) {
for (var i = 0, l = this.genericArguments.length; i < l; i++) {
var ga = this.genericArguments[i];
if (typeof (ga) === "undefined")
JSIL.RuntimeError("Undefined passed as generic argument #" + i);
else if (ga === null)
JSIL.RuntimeError("Null passed as generic argument #" + i);
}
}
};
JSIL.TypeRef.prototype.getAssembly = function () {
if (
this.context &&
Object.getPrototypeOf(this.context) === JSIL.NamespaceRef.prototype
)
return this.context.context;
else
return this.context;
};
JSIL.TypeRef.prototype.getContext = function () {
if (
this.context &&
Object.getPrototypeOf(this.context) === JSIL.NamespaceRef.prototype
)
return this.context.get();
else
return this.context;
};
JSIL.TypeRef.prototype.getTypeName = function () {
if (
this.context &&
Object.getPrototypeOf(this.context) === JSIL.NamespaceRef.prototype
)
return this.context.namespace + "." + this.typeName;
else
return this.typeName;
};
JSIL.TypeRef.prototype.toString = function () {
var result = null;
if (this.typeName === null)
result = "ref " + JSIL.GetTypeName(this.cachedReference);
else
result = "ref " + this.getTypeName();
if (this.genericArguments && this.genericArguments.length) {
result += "[";
for (var i = 0, l = this.genericArguments.length; i < l; i++) {
result += this.genericArguments[i].toString();
if (i < (l - 1))
result += ", ";
}
result += "]";
}
return result;
};
JSIL.TypeRef.prototype.toName = function () {
var result = null;
if (this.typeName === null)
result = JSIL.GetTypeName(this.cachedReference);
else
result = this.getTypeName();
// HACK: System.Array[T] -> T[]
if (
(this.getTypeName() === "System.Array") &&
this.genericArguments &&
this.genericArguments.length
) {
return JSIL.TypeReferenceToName(this.genericArguments[0]) + "[]";
}
if (this.genericArguments && this.genericArguments.length) {
result += "[";
for (var i = 0, l = this.genericArguments.length; i < l; i++) {
result += JSIL.TypeReferenceToName(this.genericArguments[i]);
if (i < (l - 1))
result += ", ";
}
result += "]";
}
return result;
};
JSIL.TypeRef.prototype.getTypeId = function () {
if (this.cachedReference !== null)
return this.cachedReference.__TypeId__;
else {
var result = JSIL.AssignTypeId(this.getAssembly(), this.getTypeName());
if (this.genericArguments.length > 0) {
result += "[";
result += JSIL.HashTypeArgumentArray(this.genericArguments, this.getAssembly());
result += "]";
// print(result);
}
return result;
}
};
JSIL.TypeRef.prototype.bindGenericArguments = function (unbound) {
if (this.genericArguments.length > 0) {
var ga = this.genericArguments;
for (var i = 0, l = ga.length; i < l; i++) {
var arg = ga[i];
if (typeof (arg) === "string") {
if (arg.indexOf("!!") === 0) {
ga[i] = arg = new JSIL.PositionalGenericParameter(arg, this.getContext());
} else {
ga[i] = arg = new JSIL.TypeRef(this.context, arg);
}
}
if (typeof (arg) === "object" && Object.getPrototypeOf(arg) === JSIL.TypeRef.prototype) {
ga[i] = arg = arg.get(true);
}
}
return unbound.Of$NoInitialize.apply(unbound, ga);
}
return unbound;
};
JSIL.TypeRef.prototype.getNoInitialize = function () {
if (this.cachedReference !== null)
return this.cachedReference;
var result = JSIL.GetTypeByName(this.getTypeName(), this.getAssembly());
result = this.bindGenericArguments(result);
return result;
};
JSIL.TypeRef.prototype.get = function (allowPartiallyConstructed) {
if (this.cachedReference !== null)
return this.cachedReference;
if (allowPartiallyConstructed === true) {
var inFlight = $jsilcore.InFlightObjectConstructions[this.getTypeName()];
if (inFlight)
return inFlight.publicInterface;
}
var result = JSIL.ResolveName(this.getContext(), this.typeName, true);
if (!result.exists())
JSIL.RuntimeError("The name '" + this.typeName + "' does not exist.");
this.cachedReference = result.get();
try {
this.cachedReference = this.bindGenericArguments(this.cachedReference);
} catch (exc) {
var err = new Error("Failed to bind generic arguments for typeRef '" + this.toString() + "': " + String(exc));
err.innerException = exc;
throw err;
}
return this.cachedReference;
};
JSIL.TypeRef.prototype.genericParameter = function (name) {
return new JSIL.GenericParameter(name, this.getTypeName());
};
JSIL.AllRegisteredNames = [];
JSIL.AllImplementedExternals = {};
JSIL.ExternalsQueue = {};
// FIXME: Used to prevent cycles in type cachers from causing problems. Not sure if this is right.
$jsilcore.SuppressRecursiveConstructionErrors = 0;
// HACK: So we can allow a class's base class to include itself as a generic argument. :/
$jsilcore.InFlightObjectConstructions = JSIL.CreateDictionaryObject(null);
JSIL.RegisterName = function (name, privateNamespace, isPublic, creator, initializer) {
var privateName = JSIL.ResolveName(privateNamespace, name, true);
if (isPublic)
var publicName = JSIL.ResolveName(JSIL.GlobalNamespace, name, true);
var localName = JSIL.GetLocalName(name);
var existingInSameAssembly = JSIL.ResolveName(privateNamespace, name, false, false);
if (existingInSameAssembly && existingInSameAssembly.exists(false)) {
JSIL.DuplicateDefinitionWarning(name, false, existingInSameAssembly.get().__CallStack__ || null, privateNamespace);
return;
}
var state = {
creator: creator,
initializer: initializer,
sealed: false,
value: null,
constructing: false,
name: name
};
JSIL.AllRegisteredNames.push(state);
var getter = function RegisterName_getter (unseal) {
var result;
try {
if (state.constructing) {
if (($jsilcore.SuppressRecursiveConstructionErrors > 0) && state.value) {
JSIL.WarningFormat(
"Ignoring recursive construction of type '{0}'.",
[name]
);
return state.value;
} else {
var err = new Error("Recursive construction of type '" + name + "' detected.");
state.value = err;
throw err;
}
}
if (typeof (state.creator) === "function") {
state.constructing = true;
var cf = state.creator;
try {
result = cf();
if ((result === null) || ((typeof (result) !== "object") && (typeof (result) !== "function"))) {
var err = new Error("Invalid result from type creator for type '" + name + "'");
state.value = err;
throw err;
}
state.value = result;
} catch (exc) {
JSIL.Host.abort(exc);
} finally {
state.creator = null;
state.constructing = false;
}
} else {
result = state.value;
if (
(result === null) ||
(
(typeof (result) !== "object") &&
(typeof (result) !== "function")
)
) {
var err = new Error("Type initialization failed for type '" + name + "'");
state.value = err;
throw err;
}
}
if (typeof (state.initializer) === "function") {
var ifn = state.initializer;
state.constructing = true;
var setThisType = null;
try {
setThisType = ifn(result);
if (typeof(setThisType) === "function")
setThisType(result);
} catch (exc) {
JSIL.Host.abort(exc);
} finally {
state.initializer = null;
state.constructing = false;
}
}
if (typeof (unseal) !== "boolean") {
unseal = true;
}
if (state.sealed && unseal) {
state.sealed = false;
JSIL.InitializeType(result);
privateName.define({ value: result });
if (isPublic)
publicName.define({ value: result });
}
} finally {
}
return result;
};
privateName.setLazy(getter);
if (isPublic)
publicName.setLazy(getter);
JSIL.DefineTypeName(name, getter, isPublic);
// V8 closure leaks yaaaaaay
creator = null;
initializer = null;
};
JSIL.FixupPrototype = function (prototype, baseTypeObject, typeObject, typeName, isReferenceType) {
JSIL.SetValueProperty(prototype, "__ThisType__", typeObject);
JSIL.SetValueProperty(prototype, "__ThisTypeId__", typeObject.__TypeId__);
JSIL.SetValueProperty(prototype, "__BaseType__", baseTypeObject);
JSIL.SetValueProperty(prototype, "__ShortName__", JSIL.GetLocalName(typeName));
JSIL.SetValueProperty(prototype, "__FullName__", typeName);
JSIL.SetValueProperty(prototype, "__IsReferenceType__", Boolean(isReferenceType));
};
JSIL.MakeProto = function (baseType, typeObject, typeName, isReferenceType, assembly) {
var _ = JSIL.ResolveTypeReference(baseType, assembly);
var baseTypePublicInterface = _[0];
var baseTypeObject = _[1];
if (baseTypePublicInterface === Object)
baseTypeObject = null;
var prototype = JSIL.$GetSpecialType(typeName).prototype;
if (!prototype)
prototype = JSIL.CreatePrototypeObject(baseTypePublicInterface.prototype);
JSIL.FixupPrototype(prototype, baseTypeObject, typeObject, typeName, isReferenceType);
return prototype;
};
JSIL.MakeNumericType = function (baseType, typeName, isIntegral, typedArrayName) {
var typeArgs = {
BaseType: baseType,
Name: typeName,
GenericArguments: $jsilcore.ArrayNull,
IsReferenceType: false,
IsPublic: true,
ConstructorAcceptsManyArguments: false
};
JSIL.MakeType(typeArgs, function ($) {
$.SetValue("__IsNumeric__", true);
$.SetValue("__IsIntegral__", isIntegral);
$.SetValue("__IsNativeType__", true);
if (typedArrayName) {
var typedArrayCtorExists = false;
var checkFn = new Function("return typeof (" + typedArrayName + ") !== \"undefined\"");
var getFn = new Function("return " + typedArrayName);
try {
typedArrayCtorExists = checkFn();
} catch (exc) {
}
if (typedArrayCtorExists) {
$.SetValue("__TypedArray__", getFn());
var ctor = getFn();
var key = ctor.name || String(ctor);
$jsilcore.TypedArrayToType[key] = typeName;
} else
$.SetValue("__TypedArray__", null);
} else {
$.SetValue("__TypedArray__", null);
}
var castSpecialType;
if (typeName === "System.Char") {
castSpecialType = "char";
} else if (typeName == "System.Boolean") {
castSpecialType = "bool";
} else if (isIntegral) {
castSpecialType = "integer";
} else {
castSpecialType = "number";
}
JSIL.MakeCastMethods(
$.publicInterface, $.typeObject, castSpecialType
);
$.RawMethod(
true, "$OverflowCheck",
function OverflowCheck (value) {
var minValue = $.publicInterface.MinValue;
var maxValue = $.publicInterface.MaxValue;
if ((value < minValue) || (value > maxValue))
throw new System.OverflowException("Arithmetic operation resulted in an overflow.");
if ($.publicInterface.name == "System_Char") {
return String.fromCharCode((value.charCodeAt(0) | 0));
}
return (value | 0);
}
);
});
};
JSIL.MakeIndirectProperty = function (target, key, source) {
var hasValue = false, state;
var getter = function GetIndirectProperty () {
if (hasValue)
return state;
else
return source[key];
};
var setter = function SetIndirectProperty (value) {
hasValue = true;
return state = value;
};
Object.defineProperty(target, key, {
configurable: true,
enumerable: true,
get: getter,
set: setter
});
};
// FIXME: The $...Internal version returns null if no resolution was necessary,
// which isn't quite as convenient. This is still pretty ugly.
JSIL.ResolveGenericTypeReference = function (obj, context) {
var result = JSIL.$ResolveGenericTypeReferenceInternal(obj, context);
if (result === null)
return obj;
return result;
};
JSIL.$ResolveGenericTypeReferenceInternal = function (obj, context) {
if ((typeof (obj) === "function")) {
obj = obj.__Type__;
}
if ((typeof (obj) !== "object") || (obj === null))
return null;
if (Object.getPrototypeOf(obj) === JSIL.GenericParameter.prototype) {
var result = obj.get(context);
if (
(typeof (result) === "undefined") ||
(result === null)
) {
if (JSIL.WarnAboutGenericResolveFailures) {
var errorText = "Failed to resolve generic parameter " + String(obj);
JSIL.Host.warning(errorText);
}
return null;
}
if (result === obj)
throw new System.InvalidOperationException("Cannot pass a generic parameter as its own value");
var result2 = JSIL.$ResolveGenericTypeReferenceInternal(result, context);
if (!result2)
return result;
else
return result2;
} else if (Object.getPrototypeOf(obj) === JSIL.TypeRef.prototype) {
var resolvedGa = [];
var anyChanges = false;
for (var i = 0, l = obj.genericArguments.length; i < l; i++) {
var unresolved = obj.genericArguments[i];
var resolved = JSIL.$ResolveGenericTypeReferenceInternal(unresolved, context);
if (resolved !== null) {
resolvedGa[i] = resolved;
anyChanges = true;
} else
resolvedGa[i] = unresolved;
}
if (anyChanges)
return new JSIL.TypeRef(obj.context, obj.getTypeName(), resolvedGa);
else
return null;
} else if (obj.__IsClosed__ === false) {
if (obj.__IsArray__) {
var elementType = JSIL.$ResolveGenericTypeReferenceInternal(obj.__ElementType__, context);
if (elementType !== null)
return System.Array.Of(elementType);
return null;
}
var ga = obj.__GenericArguments__ || $jsilcore.ArrayNull;
if (ga.length < 1)
return null;
var openType = obj.__OpenType__;
if (typeof (openType) !== "object")
return null;
var openPublicInterface = openType.__PublicInterface__;
var existingParameters = obj.__GenericArgumentValues__ || $jsilcore.ArrayNull;
var closedParameters = new Array(existingParameters.length);
for (var i = 0; i < closedParameters.length; i++) {
closedParameters[i] = JSIL.$ResolveGenericTypeReferenceInternal(
existingParameters[i], context
);
if (!closedParameters[i]) {
if (
(Object.getPrototypeOf(existingParameters[i]) === JSIL.GenericParameter.prototype) ||
(existingParameters[i].__IsClosed__ === false)
) {
if (JSIL.WarnAboutGenericResolveFailures)
JSIL.WarningFormat(
"Failed to resolve generic parameter #{0} of type reference '{1}'.",
[i, obj.toString()]
);
return null;
}
closedParameters[i] = existingParameters[i];
}
}
var result = openPublicInterface.Of.apply(openPublicInterface, closedParameters);
return result.__Type__;
}
return null;
};
JSIL.FoundGenericParameter = function (name, value) {
this.name = name;
this.value = value;
};
JSIL.FindGenericParameters = function (obj, type, resultList) {
// Walk through our base types and identify any unresolved generic parameters.
// This produces a list of parameters that need new values assigned in the target prototype.
if ((typeof (obj) !== "object") && (typeof (obj) !== "function"))
JSIL.RuntimeError("Cannot resolve generic parameters of non-object");
var currentType = type;
while ((typeof(currentType) !== "undefined") && (currentType !== null)) {
var localGa = currentType.__GenericArguments__ || $jsilcore.ArrayNull;
var localFullName = currentType.__FullNameWithoutArguments__ || currentType.__FullName__;
for (var i = 0, l = localGa.length; i < l; i++) {
var key = localGa[i];
var qualifiedName = new JSIL.Name(key, localFullName);
var value = qualifiedName.get(obj);
if ((typeof (value) === "object") && (value !== null)) {
if ((Object.getPrototypeOf(value) === JSIL.GenericParameter.prototype) || (!value.__IsClosed__)) {
resultList.push(new JSIL.FoundGenericParameter(qualifiedName, value));
}
}
}
currentType = currentType.__BaseType__;
if (
(typeof(currentType) === "object") &&
(currentType !== null) &&
(Object.getPrototypeOf(currentType) === JSIL.TypeRef.prototype)
)
currentType = currentType.get().__Type__;
}
};
JSIL.ResolveTypeReference = function (typeReference, context) {
var result = null;
if (
typeof (typeReference) === "undefined"
) {
JSIL.RuntimeError("Undefined type reference");
} else if (
typeof (typeReference) === "string"
) {
if (typeReference.indexOf("!!") === 0) {
result = new JSIL.PositionalGenericParameter(typeReference, context);
} else {
if (
(typeof (context) === "object") && (context !== null) &&
(Object.getPrototypeOf(context) === JSIL.MethodSignature.prototype)
) {
result = JSIL.GetTypeByName(typeReference, context.context);
} else {
result = JSIL.GetTypeByName(typeReference, context);
}
}
} else if (
typeof (typeReference) === "object"
) {
if (typeReference === null)
JSIL.RuntimeError("Null type reference");
if (Object.getPrototypeOf(typeReference) === JSIL.TypeRef.prototype)
result = typeReference.get();
else
result = typeReference;
} else if (
typeof (typeReference) === "function"
) {
result = typeReference;
} else {
result = typeReference;
}
if (typeof (result.__Type__) === "object") {
return [result, result.__Type__];
} else if (
typeof (result.__PublicInterface__) !== "undefined"
) {
return [result.__PublicInterface__, result];
} else {
return [result, result];
}
};
JSIL.ResolveTypeArgument = function (typeArg, context) {
var result = JSIL.ResolveTypeReference(typeArg, context)[1];
if (typeof (result) === "undefined")
JSIL.RuntimeError("Undefined passed as type argument");
else if (result === null)
JSIL.RuntimeError("Null passed as type argument");
return result;
};
JSIL.ResolveTypeArgumentArray = function (typeArgs, context) {
var resolvedArguments = typeArgs;
// Ensure that each argument is the public interface of a type (not the type object or a type reference)
for (var i = 0, l = resolvedArguments.length; i < l; i++)
resolvedArguments[i] = JSIL.ResolveTypeArgument(typeArgs[i], context);
return resolvedArguments;
};
JSIL.$GetTypeIDForHash = function (typeReference, context) {
var trType = typeof (typeReference);
var typeId;
if (trType === "undefined") {
JSIL.RuntimeError("Undefined passed as type argument");
} else if (typeReference === null) {
JSIL.RuntimeError("Null passed as type argument");
} else if (typeId = typeReference.__TypeId__) {
return typeId;
} else if (
trType === "string"
) {
if (typeReference.indexOf("!!") === 0) {
return typeReference;
} else {
if (typeof (context) === "undefined")
JSIL.RuntimeError("Context required");
return JSIL.AssignTypeId(context, typeReference);
}
} else if (
trType === "object"
) {
if (Object.getPrototypeOf(typeReference) === JSIL.TypeRef.prototype)
return typeReference.getTypeId();
}
JSIL.RuntimeError("Type missing type ID");
};
JSIL.HashTypeArgumentArray = function (typeArgs, context) {
if (typeArgs.length <= 0)
return "void";
var cacheKey = null;
for (var i = 0, l = typeArgs.length; i < l; i++) {
var typeId = JSIL.$GetTypeIDForHash(typeArgs[i], context);
if (i === 0)
cacheKey = typeId;
else
cacheKey += "," + typeId;
}
return cacheKey;
};
$jsilcore.$Of$NoInitialize = function () {
// This whole function would be 100x simpler if you could provide a prototype when constructing a function. Javascript sucks so much.
var staticClassObject = this;
var typeObject = this.__Type__;
var ga = typeObject.__GenericArguments__;
if (arguments.length != ga.length)
JSIL.RuntimeError("Invalid number of generic arguments for type '" + JSIL.GetTypeName(this) + "' (got " + arguments.length + ", expected " + ga.length + ")");
var cacheKey = JSIL.HashTypeArgumentArray(arguments, typeObject.__Context__);
var ofCache = typeObject.__OfCache__;
// If we do not return the same exact closed type instance from every call to Of(...), derivation checks will fail
var result = ofCache[cacheKey];
if (result)
return result;
var resolvedArguments = JSIL.ResolveTypeArgumentArray(
Array.prototype.slice.call(arguments)
);
var gaNames = typeObject.__GenericArgumentNames__;
if (!JSIL.IsArray(gaNames)) {
typeObject.__GenericArgumentNames__ = gaNames = [];
for (var i = 0; i < ga.length; i++)
gaNames[i] = new JSIL.Name(ga[i], typeObject.__FullName__);
}
var unresolvedBaseType;
if (typeObject.IsInterface)
// HACK
unresolvedBaseType = $jsilcore.System.Object.__Type__;
else
unresolvedBaseType = typeObject.__BaseType__;
var resolvedBaseType = unresolvedBaseType;
var resolveContext = null;
if (staticClassObject.prototype) {
resolveContext = JSIL.CreatePrototypeObject(staticClassObject.prototype);
} else {
resolveContext = JSIL.CreateSingletonObject(null);
}
for (var i = 0; i < resolvedArguments.length; i++) {
gaNames[i].set(resolveContext, resolvedArguments[i]);
}
// We need to resolve any generic arguments contained in the base type so that the base type of a closed generic type is also closed.
// thus, given Derived<T> : Base<T> and Base<U> : Object, Derived<int>.BaseType must be Base<int>, not Base<U>.
resolvedBaseType = JSIL.$ResolveGenericTypeReferenceInternal(resolvedBaseType, resolveContext);
if (!resolvedBaseType) {
resolvedBaseType = unresolvedBaseType;
}
JSIL.$ResolveGenericTypeReferences(typeObject, resolvedArguments);
var resultTypeObject = JSIL.CreateSingletonObject(typeObject);
// Since .Of() will now be called even for open types, we need to ensure that we flag
// the type as open if it has any unresolved generic parameters.
var isClosed = true;
for (var i = 0, l = arguments.length; i < l; i++) {
if (Object.getPrototypeOf(resolvedArguments[i]) === JSIL.GenericParameter.prototype)
isClosed = false;
else if (resolvedArguments[i].__IsClosed__ === false)
isClosed = false;
}
resultTypeObject.__IsClosed__ = isClosed;
var constructor;
if (typeObject.IsInterface) {
constructor = function Interface__ctor () {
JSIL.RuntimeError("Cannot construct an instance of an interface");
};
} else if (typeObject.__IsNullable__ === true) {
constructor = function Nullable__ctor () {
JSIL.RuntimeError("Cannot construct an instance of Nullable");
};
} else {
constructor = JSIL.MakeTypeConstructor(resultTypeObject, typeObject.__MaxConstructorArguments__);
}
JSIL.SetValueProperty(resultTypeObject, "__PublicInterface__", result = constructor);
resultTypeObject.__OpenType__ = typeObject;
JSIL.SetValueProperty(resultTypeObject, "__BaseType__", resolvedBaseType);
result.__Type__ = resultTypeObject;
resultTypeObject.__RenamedMethods__ = JSIL.CreateDictionaryObject(typeObject.__RenamedMethods__ || null);
// Prevents recursion when Of is called indirectly during initialization of the new closed type
ofCache[cacheKey] = result;
if (staticClassObject.prototype) {
// Given Derived<T> : Base<T> and Base<U> : Object, the prototype of Derived<T> instances must have this chain:
// Derived<T> -> Base<T> -> Object, not:
// Derived<T> -> Derived -> Base<U> -> Object
var basePrototype = resolvedBaseType.__PublicInterface__.prototype;
var resultPrototype = JSIL.CreatePrototypeObject(basePrototype);
result.prototype = resultPrototype;
JSIL.$CopyMembersIndirect(resultPrototype, staticClassObject.prototype, JSIL.$IgnoredPrototypeMembers, false);
var genericParametersToResolve = [];
JSIL.FindGenericParameters(result.prototype, resultTypeObject, genericParametersToResolve);
for (var i = 0; i < genericParametersToResolve.length; i++) {
var qualifiedName = genericParametersToResolve[i].name;
var value = genericParametersToResolve[i].value;
var resolved = JSIL.$ResolveGenericTypeReferenceInternal(value, resolveContext);
if (resolved !== null) {
// console.log(qualifiedName.humanReadable, " ", value, " -> ", resolved);
qualifiedName.defineProperty(
result.prototype, {
value: resolved,
enumerable: true,
configurable: true
}
);
}
}
}
JSIL.$CopyMembersIndirect(result, staticClassObject, JSIL.$IgnoredPublicInterfaceMembers, true);
var fullName = typeObject.__FullName__ + "[";
for (var i = 0; i < resolvedArguments.length; i++) {
if (i > 0)
fullName += ",";
var arg = resolvedArguments[i];
var stringified = arg.__FullName__; // || String(arg);
if (!stringified)
JSIL.RuntimeError("No name for generic argument #" + i + " to closed form of type " + typeObject.__FullName__);
fullName += stringified;
}
fullName += "]";
var typeId = typeObject.__TypeId__ + "[";
for (var i = 0; i < resolvedArguments.length; i++) {
if (i > 0)
typeId += ",";
typeId += resolvedArguments[i].__TypeId__;
}
typeId += "]";
JSIL.SetTypeId(result, resultTypeObject, typeId);
resultTypeObject.__ReflectionCache__ = null;
resultTypeObject.__GenericArgumentValues__ = resolvedArguments;
resultTypeObject.__FullNameWithoutArguments__ = typeObject.__FullName__;
JSIL.SetValueProperty(resultTypeObject, "__FullName__", fullName);
JSIL.SetValueProperty(resultTypeObject, "toString",
function GenericType_ToString () {
return JSIL.GetTypeName(this, true);
}
);
JSIL.SetValueProperty(result, "toString",
function GenericTypePublicInterface_ToString () {
return "<" + this.__Type__.__FullName__ + " Public Interface>";
}
);
result.__Self__ = result;
if (typeof (result.prototype) !== "undefined") {
JSIL.SetValueProperty(result.prototype, "__ThisType__", resultTypeObject);
JSIL.SetValueProperty(result.prototype, "__ThisTypeId__", resultTypeObject.__TypeId__);
JSIL.SetValueProperty(result.prototype, "__FullName__", fullName);
}
// This is important: It's possible for recursion to cause the initializer to run while we're defining properties.
// We prevent this from happening by forcing the initialized state to true.
resultTypeObject.__TypeInitialized__ = true;
// Resolve any generic parameter references in the interfaces this type implements.
var interfaces = resultTypeObject.__Interfaces__ = [];
var sourceInterfaces = typeObject.__Interfaces__;
var writeGenericArgument = function (key, name, resolvedArgument) {
var getter = function GetGenericArgument () {
return name.get(this);
}
var decl = {
configurable: true,
enumerable: true,
value: resolvedArgument
};
var getterDecl = {
configurable: true,
enumerable: true,
get: getter
};
name.defineProperty(result, decl);
if (key)
Object.defineProperty(result, key, getterDecl);
if (result.prototype) {
name.defineProperty(result.prototype, decl);
if (key)
Object.defineProperty(result.prototype, key, getterDecl);
}
};
for (var i = 0, l = sourceInterfaces.length; i < l; i++) {
var unresolvedInterface = sourceInterfaces[i];
var resolvedInterface = JSIL.$ResolveGenericTypeReferenceInternal(unresolvedInterface, resolveContext);
if (resolvedInterface === null)
resolvedInterface = unresolvedInterface;
// It's possible there are duplicates in the interface list.
if (interfaces.indexOf(resolvedInterface) >= 0)
continue;
interfaces.push(resolvedInterface);
if (resolvedInterface !== unresolvedInterface) {
var resolvedInterfaceTypeObj = JSIL.ResolveTypeReference(resolvedInterface)[1];
var names = resolvedInterfaceTypeObj.__OpenType__.__GenericArgumentNames__;
for (var j = 0, l2 = names.length; j < l2; j++) {
var name = names[j];
var value = resolvedInterfaceTypeObj.__GenericArgumentValues__[j];
writeGenericArgument(null, name, value);
}
}
}
for (var i = 0, l = resolvedArguments.length; i < l; i++) {
var key = ga[i];
var escapedKey = JSIL.EscapeName(key);
var name = new JSIL.Name(key, resultTypeObject.__FullNameWithoutArguments__);
writeGenericArgument(escapedKey, name, resolvedArguments[i]);
}
if (typeObject.IsInterface)
JSIL.CopyObjectValues(resolveContext, result.prototype, false);
if (isClosed) {
resultTypeObject.__AssignableFromTypes__ = {};
JSIL.ResolveGenericMemberSignatures(result, resultTypeObject);
JSIL.RenameGenericMethods(result, resultTypeObject);
JSIL.RebindRawMethods(result, resultTypeObject);
JSIL.FixupFieldTypes(result, resultTypeObject);
JSIL.ResolveGenericExternalMethods(result, resultTypeObject);
} else {
resultTypeObject.__OfCache__ = {};
}
JSIL.MakeCastMethods(result, resultTypeObject, typeObject.__CastSpecialType__);
// Force the initialized state back to false
resultTypeObject.__TypeInitialized__ = false;
return result;
};
$jsilcore.$MakeOf$NoInitialize = function (publicInterface) {
var fn = $jsilcore.$Of$NoInitialize;
return function Of$NoInitialize_bound () {
return fn.apply(publicInterface, arguments);
};
};
$jsilcore.$MakeOf = function (publicInterface) {
var typeObject = publicInterface.__Type__;
var typeName = typeObject.__FullName__;
return JSIL.CreateNamedFunction(
typeName + ".Of", [],
"var result = publicInterface.Of$NoInitialize.apply(publicInterface, arguments);\r\n" +
"// If the outer type is initialized, initialize the inner type.\r\n" +
"if (!result.__Type__.__TypeInitialized__ && typeObject.__TypeInitialized__)\r\n" +
" JSIL.InitializeType(result);\r\n" +
"return result;",
{
publicInterface: publicInterface,
typeObject: typeObject
}
);
};
JSIL.StaticClassPrototype = {};
JSIL.StaticClassPrototype.toString = function () {
return JSIL.GetTypeName(JSIL.GetType(this), true);
};
JSIL.$ResolveGenericMethodSignature = function (typeObject, signature, resolveContext) {
var returnType = [signature.returnType];
var argumentTypes = Array.prototype.slice.call(signature.argumentTypes);
var genericArgumentNames = signature.genericArgumentNames;
var changed = JSIL.$ResolveGenericTypeReferences(resolveContext, returnType);
changed = JSIL.$ResolveGenericTypeReferences(resolveContext, argumentTypes) || changed;
if (changed)
return new JSIL.MethodSignature(returnType[0], argumentTypes, genericArgumentNames, typeObject.__Context__, signature);
/*
if (!signature.IsClosed) {
console.log("Resolving failed for open signature", signature, "with context", resolveContext);
}
*/
return null;
};
// Static RawMethods need to be rebound so that their 'this' reference is the publicInterface
// of the type object.
JSIL.RebindRawMethods = function (publicInterface, typeObject) {
var rm = typeObject.__RawMethods__;
var isGeneric = typeObject.__OpenType__;
if (JSIL.IsArray(rm)) {
for (var i = 0; i < rm.length; i++) {
var item = rm[i];
var methodName = item.name;
if (item.isStatic) {
var method = publicInterface[methodName];
// FIXME: Stop using Function.bind here, it's slow
var boundMethod = method.bind(publicInterface);
JSIL.SetValueProperty(publicInterface, methodName, boundMethod);
}
}
}
// Rebind CheckType for delegate types so that it uses the new closed delegate type
if (typeObject.__IsDelegate__) {
JSIL.SetValueProperty(
publicInterface, "CheckType",
$jsilcore.CheckDelegateType.bind(typeObject)
);
}
}
// Any methods with generic parameters as their return type or argument type(s) must be renamed
// after the generic type is closed; otherwise overload resolution will fail to locate them because
// the method signature won't match.
// We also need to copy any methods without generic parameters over from the open version of the type's prototype.
JSIL.RenameGenericMethods = function (publicInterface, typeObject) {
var members = typeObject.__Members__;
if (!JSIL.IsArray(members))
return;
members = typeObject.__Members__ = Array.prototype.slice.call(members);
var resolveContext = typeObject.__IsStatic__ ? publicInterface : publicInterface.prototype;
var rm = typeObject.__RenamedMethods__;
var trace = false;
var throwOnFail = false;
var isInterface = typeObject.IsInterface;
_loop:
for (var i = 0, l = members.length; i < l; i++) {
var member = members[i];
switch (member.type) {
case "MethodInfo":
case "ConstructorInfo":
break;
default:
continue _loop;
}
var descriptor = member.descriptor;
var data = member.data;
var signature = data.signature;
var genericSignature = data.genericSignature;
var unqualifiedName = descriptor.EscapedName;
var oldName = data.mangledName;
var target = descriptor.Static ? publicInterface : publicInterface.prototype;
if (isInterface) {
var oldObject = publicInterface[unqualifiedName];
if (!oldObject)
JSIL.RuntimeError("Failed to find unrenamed generic interface method");
if (!signature.IsClosed) {
genericSignature = signature;
signature = JSIL.$ResolveGenericMethodSignature(
typeObject, genericSignature, resolveContext
);
if (!signature) {
if (throwOnFail) {
JSIL.RuntimeError("Failed to resolve generic signature", genericSignature);
} else {
signature = genericSignature;
}
}
}
var newObject = oldObject.Rebind(typeObject, signature);
JSIL.SetValueProperty(publicInterface, unqualifiedName, newObject);
if (trace)
console.log(typeObject.__FullName__ + ": " + unqualifiedName + " rebound");
} else {
// If the method is already renamed, don't bother trying to rename it again.
// Renaming it again would clobber the rename target with null.
if (typeof (rm[oldName]) !== "undefined") {
if (trace)
console.log(typeObject.__FullName__ + ": " + oldName + " not found");
continue;
}
if ((genericSignature !== null) && (genericSignature.get_Hash() != signature.get_Hash())) {
var newName = signature.GetNamedKey(descriptor.EscapedName, true);
var methodReference = JSIL.$FindMethodBodyInTypeChain(typeObject, descriptor.Static, oldName, false);
if (!methodReference)
JSIL.RuntimeError("Failed to find unrenamed generic method");
typeObject.__RenamedMethods__[oldName] = newName;
delete target[oldName];
JSIL.SetValueProperty(target, newName, methodReference);
if (trace)
console.log(typeObject.__FullName__ + ": " + oldName + " -> " + newName);
}
}
}
};
JSIL.FixupFieldTypes = function (publicInterface, typeObject) {
var members = typeObject.__Members__;
if (!JSIL.IsArray(members))
return;
var members = typeObject.__Members__ = Array.prototype.slice.call(members);
var resolveContext = publicInterface.prototype;
var rm = typeObject.__RenamedMethods__;
var trace = false;
var resolvedFieldTypeRef, resolvedFieldType;
_loop:
for (var i = 0, l = members.length; i < l; i++) {
var member = members[i];
if (member.type !== "FieldInfo")
continue _loop;
var descriptor = member.descriptor;
var data = member.data;
var fieldType = data.fieldType;
resolvedFieldTypeRef = JSIL.$ResolveGenericTypeReferenceInternal(fieldType, resolveContext);
if (resolvedFieldTypeRef !== null)
resolvedFieldType = JSIL.ResolveTypeReference(resolvedFieldTypeRef, typeObject.__Context__)[1];
else
resolvedFieldType = fieldType;
var newData = JSIL.CreateDictionaryObject(data);
newData.fieldType = resolvedFieldType;
members[i] = new JSIL.MemberRecord(member.type, member.descriptor, newData, member.attributes, member.overrides);
}
};
JSIL.InstantiateProperties = function (publicInterface, typeObject) {
var originalTypeObject = typeObject;
var recursed = false;
while ((typeof (typeObject) !== "undefined") && (typeObject !== null)) {
var currentPublicInterface = typeObject.__PublicInterface__;
var ps = typeObject.__Properties__;
if (JSIL.IsArray(ps)) {
var typeShortName = typeObject.__ShortName__;
for (var i = 0, l = ps.length; i < l; i++) {
var property = ps[i];
var isStatic = property[0];
var name = property[1];
var isVirtual = property[2];
var methodSource = publicInterface;
if (isStatic)
JSIL.InterfaceBuilder.MakeProperty(typeShortName, name, publicInterface, methodSource, recursed);
else
JSIL.InterfaceBuilder.MakeProperty(typeShortName, name, publicInterface.prototype, methodSource.prototype, recursed);
}
}
typeObject = typeObject.__BaseType__;
recursed = true;
}
};
$jsilcore.CanFixUpEnumInterfaces = false;
JSIL.FixupInterfaces = function (publicInterface, typeObject) {
var trace = false;
if (typeObject.__FullName__ === "System.Enum") {
if (!$jsilcore.CanFixUpEnumInterfaces)
return;
else
/* trace = true */;
}
// FIXME: Is this right? I think it might be. We don't actually use the types,
// just use their type objects as tokens for comparisons.
if (typeObject.__IsFixingUpInterfaces__)
return;
if (typeObject.IsInterface)
return;
// This is the table of interfaces that is used by .Overrides' numeric indices.
var indexedInterfaceTable = JSIL.GetInterfacesImplementedByType(typeObject, false, false);
// This is the table of every interface we actually implement (exhaustively).
var interfaces = JSIL.GetInterfacesImplementedByType(typeObject, true, false);
if (!interfaces.length)
return;
typeObject.__IsFixingUpInterfaces__ = true;
var context = typeObject.__Context__;
var typeName = typeObject.__FullName__;
var missingMembers = [];
var ambiguousMembers = [];
var typeMembers = JSIL.GetMembersInternal(typeObject, $jsilcore.BindingFlags.$Flags("Instance", "NonPublic", "Public"));
var resolveContext = typeObject.__IsStatic__ ? publicInterface : publicInterface.prototype;
__interfaces__:
for (var i = 0, l = interfaces.length; i < l; i++) {
var iface = interfaces[i];
if (typeof (iface) === "undefined") {
JSIL.WarningFormat(
"Type '{0}' implements an undefined interface.",
[typeName]
);
continue __interfaces__;
} else if (typeof (iface) === "string") {
var resolved = JSIL.ResolveName(
context, iface, true
);
if (resolved.exists())
iface = resolved.get();
else {
JSIL.WarningFormat(
"Type '{0}' implements an undefined interface named '{1}'.",
[typeName, iface]
);
interfaces[i] = null;
continue __interfaces__;
}
} else if ((typeof (iface) === "object") && (typeof (iface.get) === "function")) {
var resolvedGenericInterface = JSIL.$ResolveGenericTypeReferenceInternal(iface, resolveContext);
try {
if (resolvedGenericInterface)
iface = resolvedGenericInterface.get();
else
iface = iface.get();
} catch (exc) {
JSIL.WarningFormat(
"Type '{0}' implements an interface named '{1}' that could not be resolved: {2}",
[typeName, String(iface.getTypeName() || iface), exc]
);
interfaces[i] = null;
continue __interfaces__;
}
}
if (typeof (iface.__Type__) === "object")
iface = iface.__Type__;
interfaces[i] = iface;
var ifaceName = iface.__FullNameWithoutArguments__ || iface.__FullName__;
var ifaceLocalName = JSIL.GetLocalName(ifaceName);
if (iface.IsInterface !== true) {
JSIL.Host.warning("Type " + ifaceName + " is not an interface.");
continue __interfaces__;
}
// In cases where an interface method (IInterface_MethodName) is implemented by a regular method
// (MethodName), we make a copy of the regular method with the name of the interface method, so
// that attempts to directly invoke the interface method will still work.
var members = JSIL.GetMembersInternal(
iface,
$jsilcore.BindingFlags.$Flags("DeclaredOnly", "Instance", "NonPublic", "Public")
);
var proto = publicInterface.prototype;
var escapedLocalName = JSIL.EscapeName(ifaceLocalName);
var hasOwn = function (name) {
return Object.prototype.hasOwnProperty.call(proto, name);
};
var hasNonPlaceholder = function (obj, name) {
var value = obj[name];
if ((typeof (value) === "undefined") ||
(value === null))
return false;
if (value.__IsPlaceholder__)
return false;
return true;
}
__members__:
for (var j = 0; j < members.length; j++) {
var member = members[j];
var qualifiedName = JSIL.$GetSignaturePrefixForType(iface) + member._descriptor.EscapedName;
var originalName = member._descriptor.OriginalName;
var signature = member._data.signature || null;
var signatureQualifiedName = null;
if (signature) {
signatureQualifiedName = signature.GetNamedKey(qualifiedName, true);
}
if (signature
&& hasNonPlaceholder(proto, signatureQualifiedName)
&& hasOwn(signatureQualifiedName)
)
continue;
if (
hasNonPlaceholder(proto, qualifiedName)
&& hasOwn(qualifiedName)
)
continue;
var isMissing = false, isAmbiguous = false;
switch (member.__MemberType__) {
case "MethodInfo":
case "ConstructorInfo":
// FIXME: Match signatures
var parameterTypes = $jsilcore.$MethodGetParameterTypes(member);
var returnType = $jsilcore.$MethodGetReturnType(member);
var expectedInstanceName = $jsilcore.$MemberInfoGetName(member);
var matchingMethods = typeObject.$GetMatchingInstanceMethods(
expectedInstanceName, parameterTypes, returnType
);
// HACK: If this interface method was renamed at compile time,
// look for unqualified instance methods using the old name.
if ((originalName !== null) && (matchingMethods.length === 0)) {
if (trace)
console.log("Search for " + expectedInstanceName + " failed, looking for " + originalName);
matchingMethods = typeObject.$GetMatchingInstanceMethods(
originalName, parameterTypes, returnType
);
}
if (matchingMethods.length === 0) {
isMissing = true;
} else if (matchingMethods.length > 1) {
isAmbiguous = true;
} else {
var implementation = matchingMethods[0];
var sourceQualifiedName = implementation._data.signature.GetNamedKey(
implementation._descriptor.EscapedName, true
);
if (trace)
console.log(typeName + "::" + signatureQualifiedName + " (" + iface + ") = " + sourceQualifiedName);
JSIL.SetLazyValueProperty(
proto, signatureQualifiedName,
JSIL.MakeInterfaceMemberGetter(proto, sourceQualifiedName)
);
}
break;
default:
// FIXME: Not implemented
break;
}
if (isMissing)
missingMembers.push(signatureQualifiedName || qualifiedName);
else if (isAmbiguous)
ambiguousMembers.push(signatureQualifiedName || qualifiedName);
}
if (interfaces.indexOf(iface) < 0)
interfaces.push(iface);
}
// Now walk all the members defined in the typeObject itself, and see if any of them explicitly override
// an interface member (.overrides in IL, .Overrides() in JS)
for (var i = 0; i < typeMembers.length; i++) {
var member = typeMembers[i];
var overrides = member.__Overrides__;
if (!overrides || !overrides.length)
continue;
if (member._data.isExternal) {
if (trace)
console.log("Skipping external method '" + member._descriptor.EscapedName + "'");
continue;
}
for (var j = 0; j < overrides.length; j++) {
var override = overrides[j];
var iface = null;
switch (typeof (override.interfaceNameOrReference)) {
case "object":
iface = JSIL.ResolveTypeReference(override.interfaceNameOrReference)[1];
break;
case "string":
// Search for interfaces that have an exact name match.
// Doing this first ensures that "IFoo" does not match "IFoo`1" if "IFoo" is also in the list..
var matchingInterfaces = interfaces.filter(function (iface) {
return iface.__FullName__ === override.interfaceNameOrReference;
});
// If we didn't find any exact matches, search for a prefix match.
// This ensures that we can write something like 'IList`1' to match 'System.Collections.Generic.IList`1' if we are super lazy and terrible.
if (matchingInterfaces.length === 0)
matchingInterfaces = interfaces.filter(function (iface) {
return iface.__FullName__.indexOf(override.interfaceNameOrReference) >= 0;
});
if (matchingInterfaces.length > 1) {
// TODO: Enable this warning?
/*
JSIL.RuntimeError(
"Member '" + member._descriptor.EscapedName +
"' overrides interface '" + override.interfaceNameOrReference +
"' but " + matchingInterfaces.length + " interfaces match that name: \r\n" +
"\r\n".join(matchingInterfaces)
);
*/
iface = matchingInterfaces[0];
} else if (matchingInterfaces.length === 0) {
iface = null;
} else {
iface = matchingInterfaces[0];
}
break;
}
if (!iface)
JSIL.RuntimeErrorFormat(
"Member '{0}::{1}' overrides nonexistent interface member '{2}::{3}'",
[
typeObject.__FullName__, member._descriptor.EscapedName,
override.interfaceNameOrReference, override.interfaceMemberName
]
);
var interfaceQualifiedName = JSIL.$GetSignaturePrefixForType(iface) + JSIL.EscapeName(override.interfaceMemberName);
var key = member._data.signature.GetNamedKey(interfaceQualifiedName, true);
var missingIndex = missingMembers.indexOf(key);
if (missingIndex >= 0)
missingMembers.splice(missingIndex, 1);
if (trace) {
console.log("Overrides set " + typeName + "::" + key + " (#" + override.interfaceNameOrReference + "=" + iface + ") = " + member._descriptor.EscapedName);
}
// Important: This may overwrite an existing member with this key, from an automatic interface fixup
// like 'Foo.GetEnumerator' -> 'Foo.Ixx$GetEnumerator'.
// This is desirable because an explicit override (via .Overrides) should always trump automatic
// overrides via name/signature matching.
JSIL.SetLazyValueProperty(proto, key, JSIL.MakeInterfaceMemberGetter(proto, member._descriptor.EscapedName));
}
}
if (missingMembers.length > 0) {
if ((JSIL.SuppressInterfaceWarnings !== true) || trace)
JSIL.Host.warning("Type '" + typeObject.__FullName__ + "' is missing implementation of interface member(s): " + missingMembers.join(", "));
}
if (ambiguousMembers.length > 0) {
if ((JSIL.SuppressInterfaceWarnings !== true) || trace)
JSIL.Host.warning("Type '" + typeObject.__FullName__ + "' has ambiguous implementation of interface member(s): " + ambiguousMembers.join(", "));
}
typeObject.__IsFixingUpInterfaces__ = false;
};
$jsilcore.BuildingFieldList = new Array();
JSIL.GetFieldList = function (typeObject) {
var fl = typeObject.__FieldList__;
if (fl === $jsilcore.ArrayNotInitialized) {
fl = $jsilcore.BuildingFieldList;
fl = JSIL.$BuildFieldList(typeObject);
} else if (fl === $jsilcore.BuildingFieldList) {
JSIL.RuntimeError("Recursive invocation of GetFieldList on type " + typeObject.__FullName__);
}
if ((fl === $jsilcore.ArrayNull) || (!JSIL.IsArray(fl)))
return $jsilcore.ArrayNull;
return fl;
};
JSIL.EscapeJSIdentifier = function (identifier) {
var nameRe = /[^A-Za-z_0-9\$]/g;
return JSIL.EscapeName(identifier).replace(nameRe, "_");
};
JSIL.GetObjectKeys = function (obj) {
// This is a .NET object, so return the names of any public fields/properties.
if (obj && obj.GetType) {
var typeObject = obj.GetType();
var bindingFlags = $jsilcore.BindingFlags.$Flags("Instance", "Public");
var fields = JSIL.GetMembersInternal(typeObject, bindingFlags, "FieldInfo");
var properties = JSIL.GetMembersInternal(typeObject, bindingFlags, "PropertyInfo");
var result = [];
for (var i = 0, l = fields.length; i < l; i++)
result.push(fields[i].get_Name());
for (var i = 0, l = properties.length; i < l; i++)
result.push(properties[i].get_Name());
return result;
} else {
return Object.keys(obj);
}
};
JSIL.CreateNamedFunction = function (name, argumentNames, body, closure) {
var result = null, keys = null, closureArgumentList = null;
if (closure) {
keys = JSIL.GetObjectKeys(closure);
closureArgumentList = new Array(keys.length);
for (var i = 0, l = keys.length; i < l; i++)
closureArgumentList[i] = closure[keys[i]];
}
var constructor = JSIL.CreateRebindableNamedFunction(name, argumentNames, body, closure);
result = constructor.apply(null, closureArgumentList);
return result;
};
JSIL.CreateRebindableNamedFunction = function (name, argumentNames, body, closure) {
var uriRe = /[\<\>\+\/\\\.]/g;
var strictPrefix = "\"use strict\";\r\n";
var uriPrefix = "", escapedFunctionIdentifier = "";
if (name) {
uriPrefix = "//# sourceURL=jsil://closure/" + name + "\r\n";
escapedFunctionIdentifier = JSIL.EscapeJSIdentifier(name);
} else {
escapedFunctionIdentifier = "unnamed";
}
var rawFunctionText = "function " + escapedFunctionIdentifier + "(" +
argumentNames.join(", ") +
") {\r\n" +
body +
"\r\n};\r\n";
var lineBreakRE = /\r(\n?)/g;
rawFunctionText =
uriPrefix + strictPrefix +
rawFunctionText.replace(lineBreakRE, "\r\n ") +
" return " + escapedFunctionIdentifier + ";\r\n";
var result = null, keys = null;
if (closure) {
keys = JSIL.GetObjectKeys(closure).concat([rawFunctionText]);
} else {
keys = [rawFunctionText];
}
result = Function.apply(Function, keys);
return result;
};
JSIL.FormatMemberAccess = function (targetExpression, memberName) {
// Can't reuse a global instance because .test mutates the RegExp. JavaScript is stupid.
var shortMemberRegex = /^[_a-zA-Z][a-zA-Z_0-9]*$/g;
if (typeof (memberName) !== "string")
JSIL.RuntimeError("Member name must be a string");
if (shortMemberRegex.test(memberName)) {
return targetExpression + "." + memberName;
} else {
return targetExpression + "['" + memberName + "']";
}
};
JSIL.MakeFieldInitializer = function (typeObject, returnNamedFunction) {
var fl = JSIL.GetFieldList(typeObject);
if ((fl.length < 1) && returnNamedFunction)
return $jsilcore.FunctionNull;
var prototype = typeObject.__PublicInterface__.prototype;
var body = [];
var targetArgName = returnNamedFunction ? "target" : "this";
var initializerClosure = null;
if (typeObject.__IsUnion__) {
var sizeBytes = typeObject.__NativeSize__;
body.push(JSIL.FormatMemberAccess(targetArgName, "$backingStore") + " = new Uint8Array(" + sizeBytes + ");");
// HACK: Generate accessors for the (now missing) fields that hit our backing store
JSIL.$GenerateUnionAccessors(typeObject, fl, body, targetArgName);
} else {
var types = {};
var defaults = {};
for (var i = 0, l = fl.length; i < l; i++) {
var field = fl[i];
if ((field.type === typeObject) && (field.isStruct)) {
JSIL.Host.warning("Ignoring self-typed struct field " + field.name);
continue;
}
var key = "f" + i.toString();
if (field.isStruct) {
if (field.type.__IsNullable__) {
body.push(JSIL.FormatMemberAccess(targetArgName, field.name) + " = null;");
} else {
body.push(JSIL.FormatMemberAccess(targetArgName, field.name) + " = new types." + key + "();");
types[key] = field.type.__PublicInterface__;
}
} else if (field.type.__IsNativeType__ && field.type.__IsNumeric__) {
// This is necessary because JS engines are incredibly dumb about figuring out the actual type(s)
// an object's field slots should be.
var defaultValueString;
if (field.type.__FullName__ === "System.Boolean") {
defaultValueString = "(false)";
} else if (field.type.__FullName__ === "System.Char") {
defaultValueString = "('\\0')";
} else if (field.type.__IsIntegral__) {
defaultValueString = "(0 | 0)";
} else {
defaultValueString = "(+0.0)";
}
body.push(JSIL.FormatMemberAccess(targetArgName, field.name) + " = " + defaultValueString + ";");
} else {
body.push(JSIL.FormatMemberAccess(targetArgName, field.name) + " = defaults." + key + ";");
if (typeof (field.defaultValueExpression) === "function") {
// FIXME: This wants a this-reference?
defaults[key] = field.defaultValueExpression();
} else if (field.defaultValueExpression) {
defaults[key] = field.defaultValueExpression;
} else {
defaults[key] = JSIL.DefaultValue(field.type);
}
}
}
initializerClosure = {
types: types,
defaults: defaults
};
}
if (returnNamedFunction) {
var boundFunction = JSIL.CreateNamedFunction(
typeObject.__FullName__ + ".InitializeFields",
["target"],
body.join("\r\n"),
initializerClosure
);
boundFunction.__ThisType__ = typeObject;
JSIL.SetValueProperty(boundFunction, "__ThisTypeId__", typeObject.__TypeId__);
return boundFunction;
} else {
return [body, initializerClosure];
}
};
JSIL.GetFieldInitializer = function (typeObject) {
var fi = typeObject.__FieldInitializer__;
if (fi === $jsilcore.FunctionNotInitialized)
typeObject.__FieldInitializer__ = fi = JSIL.MakeFieldInitializer(typeObject, true);
return fi;
};
JSIL.InitializeInstanceFields = function (instance, typeObject) {
var fi = JSIL.GetFieldInitializer(typeObject);
if (fi === $jsilcore.FunctionNull)
return;
fi(instance);
};
JSIL.CopyObjectValues = function (source, target, allowOverwrite) {
for (var k in source) {
if (!Object.prototype.hasOwnProperty.call(source, k))
continue;
if (allowOverwrite === false) {
if (k in target)
continue;
}
target[k] = source[k];
}
};
JSIL.CopyMembers = function (source, target) {
var thisType = source.__ThisType__;
var copier = thisType.__MemberCopier__;
if (copier === $jsilcore.FunctionNotInitialized)
copier = thisType.__MemberCopier__ = JSIL.$MakeMemberCopier(thisType, thisType.__PublicInterface__);
copier(source, target);
};
JSIL.$MakeComparerCore = function (typeObject, context, body) {
var fields = JSIL.GetFieldList(typeObject);
if (context.prototype.__CompareMembers__) {
context.comparer = context.prototype.__CompareMembers__;
body.push(" return context.comparer(lhs, rhs);");
} else {
for (var i = 0; i < fields.length; i++) {
var field = fields[i];
var fieldType = field.type;
if (fieldType.__IsNumeric__ || fieldType.__IsEnum__) {
body.push(" if (" + JSIL.FormatMemberAccess("lhs", field.name) + " !== " + JSIL.FormatMemberAccess("rhs", field.name) + ")");
} else {
body.push(" if (!JSIL.ObjectEquals(" + JSIL.FormatMemberAccess("lhs", field.name) + ", " + JSIL.FormatMemberAccess("rhs", field.name) + "))");
}
body.push(" return false;");
}
body.push(" return true;");
}
}
JSIL.$MakeStructComparer = function (typeObject, publicInterface) {
var prototype = publicInterface.prototype;
var context = {
prototype: prototype
};
var body = [];
JSIL.$MakeComparerCore(typeObject, context, body);
return JSIL.CreateNamedFunction(
typeObject.__FullName__ + ".StructComparer",
["lhs", "rhs"],
body.join("\r\n")
);
};
JSIL.$MakeCopierCore = function (typeObject, context, body, resultVar) {
var fields = JSIL.GetFieldList(typeObject);
if (typeObject.__IsUnion__) {
var nativeSize = typeObject.__NativeSize__;
body.push(" " + resultVar + ".$backingStore = new Uint8Array(" + nativeSize + ");");
JSIL.$EmitMemcpyIntrinsic(body, resultVar + ".$backingStore", "source.$backingStore", 0, 0, nativeSize);
} else if (context.prototype.__CopyMembers__) {
context.copier = context.prototype.__CopyMembers__;
body.push(" context.copier(source, " + resultVar + ");");
} else {
for (var i = 0; i < fields.length; i++) {
// FIXME
var field = fields[i];
var isStruct = field.isStruct;
// Type-hint the assignments
var isChar = field.type.__FullName__ === "System.Char";
var isBool = field.type.__FullName__ === "System.Boolean";
var isInteger = field.type.__IsNumeric__ && field.type.__IsIntegral__ && !isChar && !isBool;
var isFloat = field.type.__IsNumeric__ && !field.type.__IsIntegral__ && !isChar && !isBool;
var line = " " + JSIL.FormatMemberAccess(resultVar, field.name) + " = ";
if (isFloat)
line += "+(";
line += JSIL.FormatMemberAccess("source", field.name);
if (isStruct)
line += ".MemberwiseClone();"
else if (isInteger)
line += " | 0;";
else if (isFloat)
line += ");";
else
line += ";"
body.push(line);
}
}
};
JSIL.$MakeMemberCopier = function (typeObject, publicInterface) {
var prototype = publicInterface.prototype;
var context = {
prototype: prototype
};
var body = [];
JSIL.$MakeCopierCore(typeObject, context, body, "result");
return JSIL.CreateNamedFunction(
typeObject.__FullName__ + ".MemberCopier",
["source", "result"],
body.join("\r\n")
);
};
JSIL.$MakeMemberwiseCloner = function (typeObject, publicInterface) {
var prototype = publicInterface.prototype;
var context = {
prototype: prototype
};
var body = ["// Copy constructor"];
JSIL.$MakeCopierCore(typeObject, context, body, "this");
var subtypeRe = /[\+\/]/g;
var nameRe = /[^A-Za-z_0-9]/g;
var uri = typeObject.__FullName__.replace(subtypeRe, ".");
var constructor = JSIL.CreateNamedFunction(
typeObject.__FullName__ + ".CopyConstructor",
["source"],
body.join("\r\n"),
{
context: context
}
);
constructor.prototype = prototype;
var memberwiseCloner = JSIL.CreateNamedFunction(
typeObject.__FullName__ + ".MemberwiseClone",
[],
"return new clone(this);",
{
clone: constructor
}
);
return memberwiseCloner;
};
JSIL.$BuildFieldList = function (typeObject) {
if (typeObject.__IsClosed__ === false)
return;
var isUnion = false;
var bindingFlags = $jsilcore.BindingFlags.$Flags("Instance", "NonPublic", "Public");
var fields = JSIL.GetMembersInternal(
typeObject, bindingFlags, "FieldInfo"
);
var fl = typeObject.__FieldList__ = [];
var fieldOffset = 0;
var customPacking = typeObject.__CustomPacking__ | 0;
$fieldloop:
for (var i = 0; i < fields.length; i++) {
var field = fields[i];
var fieldType = field._data.fieldType;
var didGenericResolve = false;
while (fieldType && (Object.getPrototypeOf(fieldType) === JSIL.GenericParameter.prototype)) {
didGenericResolve = true;
var fieldTypeRef = fieldType;
fieldType = JSIL.$ResolveGenericTypeReferenceInternal(fieldType, typeObject.__PublicInterface__.prototype);
if (!fieldType) {
JSIL.Host.warning(
"Could not resolve open generic parameter '" + fieldTypeRef.name +
"' when building field list for type '" + typeObject.__FullName__ + "'"
);
continue $fieldloop;
}
}
if (!didGenericResolve) {
fieldType = JSIL.ResolveTypeReference(fieldType, typeObject.__Context__)[1];
}
if ((typeof (fieldType) === "undefined") || (fieldType === null))
JSIL.RuntimeError("Invalid field type");
// Native types may derive from System.ValueType but we can't treat them as structs.
var isStruct = (fieldType.__IsStruct__ || false) && (!fieldType.__IsNativeType__);
var fieldSize = JSIL.GetNativeSizeOf(fieldType, true);
var fieldAlignment = JSIL.GetNativeAlignmentOf(fieldType, true);
// StructLayout.Pack seems to only be able to eliminate extra space between fields,
// not add extra space as one might also expect.
if (customPacking) {
var newFieldAlignment = Math.min(fieldAlignment, customPacking);
if (JSIL.StructFormatWarnings) {
if (newFieldAlignment !== customPacking)
JSIL.WarningFormat("Custom packing for field {0}.{1} is non-native for JavaScript", [typeObject.__FullName__, field._descriptor.Name]);
}
fieldAlignment = newFieldAlignment;
}
var actualFieldOffset = fieldOffset;
if (typeof (field._data.offset) === "number") {
if (typeObject.__ExplicitLayout__)
actualFieldOffset = field._data.offset;
else if (JSIL.StructFormatWarnings)
JSIL.WarningFormat("Ignoring offset for field {0}.{1} because {0} does not have explicit layout", [typeObject.__FullName__, field.descriptor.Name]);
} else if (fieldAlignment > 0) {
actualFieldOffset = (((fieldOffset + (fieldAlignment - 1)) / fieldAlignment) | 0) * fieldAlignment;
}
var fieldRecord = {
name: field._descriptor.Name,
type: fieldType,
isStruct: isStruct,
defaultValueExpression: field._data.defaultValueExpression,
offsetBytes: actualFieldOffset,
sizeBytes: fieldSize,
alignmentBytes: fieldAlignment
};
if (fieldSize > 0) {
// Scan through preceding fields to see if we overlap any of them.
for (var j = 0; j < fl.length; j++) {
var priorRecord = fl[j];
var start = priorRecord.offsetBytes;
var end = start + priorRecord.sizeBytes;
var myInclusiveEnd = actualFieldOffset + fieldSize - 1;
if (
(
(actualFieldOffset < end) &&
(actualFieldOffset >= start)
) ||
(
(myInclusiveEnd < end) &&
(myInclusiveEnd >= start)
)
) {
if (JSIL.StructFormatWarnings)
JSIL.WarningFormat("Field {0}.{1} overlaps field {0}.{2}.", [typeObject.__FullName__, fieldRecord.name, priorRecord.name]);
fieldRecord.overlapsOtherFields = true;
isUnion = true;
}
}
}
if (!field.IsStatic)
fl.push(fieldRecord);
if (fieldSize >= 0)
fieldOffset = actualFieldOffset + fieldSize;
}
// Sort fields by name so that we get a predictable initialization order.
fl.sort(function (lhs, rhs) {
return JSIL.CompareValues(lhs.name, rhs.name);
})
if (isUnion && !typeObject.__ExplicitLayout__)
JSIL.RuntimeError("Non-explicit-layout structure appears to be a union: " + typeObject.__FullName__);
Object.defineProperty(typeObject, "__IsUnion_BackingStore__", {
value: isUnion,
configurable: true,
enumerable: false
});
return fl;
};
JSIL.$ResolveGenericTypeReferences = function (context, types) {
var result = false;
for (var i = 0; i < types.length; i++) {
var resolved = JSIL.$ResolveGenericTypeReferenceInternal(types[i], context);
if (resolved !== null) {
// console.log("ga[" + i + "] " + types[i] + " -> " + resolved);
types[i] = resolved;
result = true;
}
}
return result;
};
JSIL.$MakeAnonymousMethod = function (target, body) {
if (typeof (body) !== "function")
JSIL.RuntimeError("body must be a function");
var key = "$$" + (++JSIL.$NextDispatcherId).toString(16);
Object.defineProperty(
target, key, {
value: body,
writable: false,
configurable: true,
enumerable: false
}
);
if (body.__IsMembrane__)
JSIL.DefinePreInitMethodAlias(target, key, body);
return key;
};
JSIL.MethodSetByGenericArgumentCount = function () {
this.dict = {};
this.count = 0;
};
JSIL.MethodSetByGenericArgumentCount.prototype.get = function (argumentCount) {
var result = this.dict[argumentCount];
if (!result)
result = this.dict[argumentCount] = new JSIL.MethodSetByArgumentCount(this, argumentCount);
return result;
};
JSIL.MethodSetByArgumentCount = function (genericSet, genericCount) {
this.genericSet = genericSet;
this.genericCount = genericCount;
this.dict = {};
this.count = 0;
};
JSIL.MethodSetByArgumentCount.prototype.get = function (argumentCount) {
var result = this.dict[argumentCount];
if (!result) {
result = this.dict[argumentCount] = new JSIL.MethodSet(this, argumentCount);
}
return result;
};
JSIL.MethodSet = function (argumentSet, argumentCount) {
this.argumentSet = argumentSet;
this.argumentCount = argumentCount;
this.list = [];
this.count = 0;
};
JSIL.MethodSet.prototype.add = function (signature) {
this.list.push(signature);
this.count += 1;
this.argumentSet.count += 1;
this.argumentSet.genericSet.count += 1;
};
JSIL.$MakeMethodGroup = function (typeObject, isStatic, target, renamedMethods, methodName, methodEscapedName, overloadSignatures) {
var typeName = typeObject.__FullName__;
var methodFullName = typeName + "." + methodName;
var makeDispatcher, makeGenericArgumentGroup;
var makeMethodMissingError = function (signature) {
return "Method not found: " + signature.toString(methodFullName);
};
var makeNoMatchFoundError = function (group) {
var text = group.count + " candidate(s) for method invocation:";
for (var i = 0; i < group.count; i++) {
text += "\n" + group.list[i].toString(methodFullName);
}
return new Error(text);
};
// If the method group contains only a single method, we call this to fetch the method implementation
// and then use that as the method group.
var makeSingleMethodGroup = function (id, group, offset) {
var singleMethod = group.list[0];
var key = singleMethod.GetNamedKey(methodEscapedName, true);
var unrenamedKey = key;
if (typeof (renamedMethods[key]) === "string")
key = renamedMethods[key];
var method = JSIL.$FindMethodBodyInTypeChain(typeObject, isStatic, key, false);
if (typeof (method) !== "function") {
JSIL.Host.warning(makeMethodMissingError(singleMethod));
var stub = function MissingMethodInvoked () {
JSIL.RuntimeError(makeMethodMissingError(singleMethod));
};
return JSIL.$MakeAnonymousMethod(target, stub);
} else {
// We need to manufacture an anonymous name for the method
// So that overload dispatch can invoke it using 'this.x' syntax instead
// of using thisType['x']
// return key;
return JSIL.$MakeAnonymousMethod(target, method);
}
};
// For methods with generic arguments we figure out whether there are multiple options for the generic
// argument dispatcher, and bind the appropriate generic method dispatcher.
makeGenericArgumentGroup = function (id, group, offset) {
var groupDispatcher = makeDispatcher(id, group, offset);
var genericArgumentCount = offset;
var stub = JSIL.$MakeGenericMethodBinder(groupDispatcher, methodFullName, genericArgumentCount, group.dict);
return JSIL.$MakeAnonymousMethod(target, stub);
};
// For methods with multiple candidate signatures that all have the same number of arguments, we do
// dynamic dispatch at runtime on each invocation by comparing the types of the actual argument
// values against the expected type objects for each signature, in order to select the right
// method to call.
var makeMultipleMethodGroup = function (id, group, offset) {
// [resolvedSignatures, differentReturnTypeError]
var isResolved = false;
var resolvedGroup = null;
// Take the method signature(s) in this group and resolve all their type references.
// We do this once and cache it since type reference resolution takes time.
var getResolvedGroup = function GetResolvedGroup () {
if (isResolved)
return resolvedGroup;
var result = [];
for (var i = 0; i < group.count; i++) {
var groupEntry = group.list[i];
// FIXME: Do we still need generic logic here?
var typeObject = JSIL.GetType(target);
var resolveContext = target;
var resolvedGeneric = JSIL.$ResolveGenericMethodSignature(typeObject, groupEntry, resolveContext);
if (resolvedGeneric != null)
result[i] = resolvedGeneric.Resolve(methodEscapedName);
else
result[i] = groupEntry.Resolve(methodEscapedName);
}
isResolved = true;
return (resolvedGroup = result);
};
var stub = function OverloadedMethod_InvokeDynamic () {
var argc = arguments.length;
var resolvedGroup = getResolvedGroup();
// If resolving the group fails, it will return null.
if (resolvedGroup === null)
throw makeNoMatchFoundError(group);
var genericDispatcherKey = null;
scan_methods:
for (var i = 0, l = resolvedGroup.length; i < l; i++) {
var resolvedMethod = resolvedGroup[i];
// We've got a generic dispatcher for a generic method with N generic arguments.
// Store it to use as a fallback if none of the normal overloads match.
if (typeof (resolvedMethod) === "string") {
genericDispatcherKey = resolvedMethod;
continue;
}
var argTypes = resolvedMethod.argumentTypes;
var numGenericArguments = argc - argTypes.length;
var resolvedGenericMethod = resolvedMethod;
// If the method signature has any generic arguments, resolve any positional generic parameters
// referenced in the method signature. If we don't do this those types will just be "!!0" etc
if (numGenericArguments > 0) {
var genericArguments = Array.prototype.slice.call(arguments, 0, numGenericArguments);
resolvedGenericMethod = resolvedMethod.ResolvePositionalGenericParameters(genericArguments);
argTypes = resolvedGenericMethod.argumentTypes;
}
// Check the types of the passed in argument values against the types expected for
// this particular signature. Note that we use the resolved generic version so that
// any positional generic parameters are used for type matching.
for (var j = 0; j < argc; j++) {
var expectedType = argTypes[j];
var arg = arguments[j + offset];
if ((typeof (expectedType) === "undefined") || (expectedType === null)) {
// Specific types, like generic parameters, resolve to null or undefined.
} else if (expectedType.__IsReferenceType__ && (arg === null)) {
// Null is a valid value for any reference type.
} else if (!expectedType.$Is(arg)) {
continue scan_methods;
}
}
// Find the method implementation. Note that we don't use the key generated from the
// resolved generic version, because the actual method key contains !!0 etc.
var foundOverload = target[resolvedMethod.key];
if (typeof (foundOverload) !== "function") {
JSIL.RuntimeError(makeMethodMissingError(resolvedMethod));
} else {
return foundOverload.apply(this, arguments);
}
}
// None of the normal overloads matched, but if we found a generic dispatcher, call that.
// This isn't quite right, but the alternative (check to see if the arg is System.Type) is
// worse since it would break for methods that actually take Type instances as arguments.
if (genericDispatcherKey !== null) {
return this[genericDispatcherKey].apply(this, arguments);
}
throw makeNoMatchFoundError(group);
};
return JSIL.$MakeAnonymousMethod(target, stub);
};
makeDispatcher = function (id, g, offset) {
var body = [];
var maxArgumentCount = 0;
body.push(" var argc = arguments.length | 0;");
var methodKey = null;
var gProto = Object.getPrototypeOf(g);
var cases = [];
for (var k in g.dict) {
if (!g.dict.hasOwnProperty(k))
continue;
var argumentCount = parseInt(k) + offset;
if (isNaN(argumentCount))
throw new Error();
maxArgumentCount = Math.max(maxArgumentCount, argumentCount);
var caseDesc = {
key: argumentCount
};
var group = g.dict[k];
if (gProto === JSIL.MethodSetByGenericArgumentCount.prototype) {
methodKey = makeGenericArgumentGroup(id + "`" + k, group, group.genericCount + offset);
} else if (gProto === JSIL.MethodSetByArgumentCount.prototype) {
if (group.count > 1) {
methodKey = makeMultipleMethodGroup(id, group, offset);
} else {
methodKey = makeSingleMethodGroup(id, group, offset);
}
}
var invocation = " return this." + methodKey + "(";
for (var ai = 0; ai < argumentCount; ai++) {
if (ai !== 0)
invocation += ", ";
invocation += "arg" + ai.toString();
}
invocation += ");";
caseDesc.code = invocation;
cases.push(caseDesc);
}
JSIL.$MakeOptimizedNumericSwitch(
body, "argc", cases,
" JSIL.RuntimeError('No overload of ' + name + ' can accept ' + (argc - offset) + ' argument(s).')"
);
var bodyText = body.join("\r\n");
var formalArgumentNames = [];
for (var ai = 0; ai < maxArgumentCount; ai++)
formalArgumentNames.push("arg" + ai.toString());
var boundDispatcher = JSIL.CreateNamedFunction(
id, formalArgumentNames,
bodyText,
{
name: methodName,
offset: offset
}
);
return JSIL.$MakeAnonymousMethod(target, boundDispatcher);
};
var methodSet = new JSIL.MethodSetByGenericArgumentCount();
for (var i = 0, l = overloadSignatures.length; i < l; i++) {
var signature = overloadSignatures[i];
var argumentCount = signature.argumentTypes.length;
var gaCount = signature.genericArgumentNames.length;
var genargcSet = methodSet.get(gaCount);
var argcSet = genargcSet.get(argumentCount);
argcSet.add(signature);
}
var gaKeys = Object.keys(methodSet.dict);
// For method groups with no generic arguments, skip creating a generic argument dispatcher.
if ((gaKeys.length === 1) && (gaKeys[0] == 0)) {
// If there's only one method definition, don't generate a dispatcher at all.
// This ensures that if our implementation uses JS varargs, it works.
if (methodSet.count === 1) {
var theSet = methodSet.dict[0];
var theMethodList = theSet.dict[Object.keys(theSet.dict)[0]];
return makeSingleMethodGroup(methodFullName, theMethodList, 0);
} else {
return makeDispatcher(methodFullName, methodSet.dict[0], 0);
}
} else {
return makeDispatcher(methodFullName, methodSet, 0);
}
};
JSIL.$ApplyMemberHiding = function (typeObject, memberList, resolveContext) {
if (memberList.length < 1)
return;
// This is called during type system initialization, so we can't rely on any of MemberInfo's
// properties or methods - we need to access the data members directly.
var comparer = function (lhs, rhs) {
var lhsCount = lhs._data.signature.argumentTypes.length;
var rhsCount = rhs._data.signature.argumentTypes.length;
// Group by argument count.
var result = JSIL.CompareValues(lhsCount, rhsCount);
// Sub-cluster by hash (the hash encodes argument types, etc.)
if (result === 0) {
var lhsHash = lhs._data.signature.get_Hash();
var rhsHash = rhs._data.signature.get_Hash();
result = JSIL.CompareValues(lhsHash, rhsHash);
}
// Non-placeholders override placeholders.
if (result === 0)
result = JSIL.CompareValues(
lhs._data.isPlaceholder ? 1 : 0,
rhs._data.isPlaceholder ? 1 : 0
);
// Non-externals override externals.
if (result === 0)
result = JSIL.CompareValues(
lhs._data.isExternal ? 1 : 0,
rhs._data.isExternal ? 1 : 0
);
// A derived type's methods override inherited methods.
if (result === 0)
result = -JSIL.CompareValues(
lhs._typeObject.__InheritanceDepth__,
rhs._typeObject.__InheritanceDepth__
);
return result;
};
// Sort the member list by method signature hash, then by whether they are external
// placeholders, then by inheritance depth.
// This produces a list of 'signature groups' (methods with the same signature), and
// the first method in each signature group is the most-derived (hides the rest).
// This also ensures that external placeholders will not overwrite non-placeholder
// methods unless they are all that remains (in which case the most-derived one will
// win).
memberList.sort(comparer);
var originalCount = memberList.length;
var currentSignatureHash = null;
var currentArgumentCount = null;
var currentGroupStart;
var groupUpdate = function (i, memberSignature) {
var argumentCount = memberSignature.argumentTypes.length;
var memberSignatureHash = memberSignature.get_Hash();
if (
(currentArgumentCount === null) ||
(currentSignatureHash === null) ||
(currentArgumentCount != argumentCount) ||
(
(currentSignatureHash != memberSignatureHash) &&
// *Every* method with zero arguments is a part of a group, no matter what.
// They will automatically sort into one group because they all start with '$void='
(currentArgumentCount !== 0)
)
) {
// New group
currentArgumentCount = argumentCount;
currentSignatureHash = memberSignatureHash;
currentGroupStart = i;
return false;
} else {
return true;
}
};
var trace = false;
var traceOut = function () {
if ((typeof(console) !== "undefined") && console.log)
console.log.apply(console, arguments);
else
print.apply(null, arguments);
};
var memberName = memberList[0]._descriptor.Name;
// Sweep through the member list and replace any hidden members with null.
for (var i = 0, l = memberList.length; i < l; i++) {
var member = memberList[i];
var memberSignature = member._data.signature;
var isHidden = groupUpdate(i, memberSignature);
if (isHidden) {
var hidingMember = memberList[currentGroupStart];
if (trace) {
var localMemberName =
member._typeObject.__FullName__ +
"." + member._descriptor.Name;
var hidingMemberName =
hidingMember._typeObject.__FullName__ +
"." + hidingMember._descriptor.Name;
var memberSuffix = "", hidingMemberSuffix = "";
if (member._data.isPlaceholder)
memberSuffix = " (placeholder)";
else if (member._data.isExternal)
memberSuffix = " (external)";
if (hidingMember._data.isPlaceholder)
hidingMemberSuffix = " (placeholder)";
else if (hidingMember._data.isExternal)
hidingMemberSuffix = " (external)";
traceOut(
memberName + ": Purged " +
localMemberName + memberSuffix +
" because it is hidden by " +
hidingMemberName + hidingMemberSuffix
);
}
memberList[i] = null;
}
}
// Perform a second pass through the member list and shrink it to eliminate the nulls.
for (var i = originalCount - 1; i >= 0; i--) {
var member = memberList[i];
if (member === null)
memberList.splice(i, 1);
}
if ((trace) && (originalCount != memberList.length)) {
traceOut("Shrank method group from " + originalCount + " item(s) to " + memberList.length);
}
};
JSIL.$CreateMethodMembranes = function (typeObject, publicInterface) {
var maybeRunCctors = function MaybeRunStaticConstructors () {
JSIL.RunStaticConstructors(publicInterface, typeObject);
};
var makeReturner = function (value) {
return function () { return value; };
};
var bindingFlags = $jsilcore.BindingFlags.$Flags("NonPublic", "Public");
var methods = JSIL.GetMembersInternal(
typeObject, bindingFlags, "$MethodOrConstructor"
);
// We need to ensure that all the mangled method names have membranes applied.
// This can't be done before now due to generic types.
for (var i = 0, l = methods.length; i < l; i++) {
var method = methods[i];
var isStatic = method._descriptor.Static;
// FIXME: I'm not sure this is right for open generic methods.
// I think it might be looking up the old open form of the method signature
// instead of the closed form.
var key = method._data.signature.GetNamedKey(method._descriptor.EscapedName, true);
var useMembrane = isStatic &&
($jsilcore.cctorKeys.indexOf(method._descriptor.Name) < 0) &&
($jsilcore.cctorKeys.indexOf(method._descriptor.EscapedName) < 0);
if (useMembrane) {
var originalFunction = publicInterface[key];
if (typeof (originalFunction) !== "function") {
// throw new Error("No function with key '" + key + "' found");
continue;
}
JSIL.DefinePreInitMethod(
publicInterface, key, makeReturner(originalFunction), maybeRunCctors
);
}
}
};
JSIL.$GroupMethodsByName = function (methods) {
var methodsByName = {};
for (var i = 0, l = methods.length; i < l; i++) {
var method = methods[i];
var key = (method._descriptor.Static ? "static" : "instance") + "$" + method._descriptor.EscapedName;
var methodList = methodsByName[key];
if (!JSIL.IsArray(methodList))
methodList = methodsByName[key] = [];
// Don't add duplicate copies of the same method to the method list.
if (methodList.indexOf(method) < 0)
methodList.push(method);
}
return methodsByName;
};
JSIL.$BuildMethodGroups = function (typeObject, publicInterface, forceLazyMethodGroups) {
// This is called during type system initialization, so we can't rely on any of MemberInfo's
// properties or methods - we need to access the data members directly.
var instanceMethods = JSIL.GetMembersInternal(
typeObject, $jsilcore.BindingFlags.$Flags("Instance", "Public", "NonPublic"), "MethodInfo"
);
var constructors = JSIL.GetMembersInternal(
typeObject, $jsilcore.BindingFlags.$Flags("DeclaredOnly", "Instance", "Public", "NonPublic"), "ConstructorInfo"
);
var staticMethods = JSIL.GetMembersInternal(
typeObject, $jsilcore.BindingFlags.$Flags("DeclaredOnly", "Static", "Public", "NonPublic"), "$AllMethods"
);
var methods = staticMethods.concat(instanceMethods).concat(constructors);
var renamedMethods = typeObject.__RenamedMethods__ || {};
var trace = false;
var active = true;
// Set to true to enable lazy method group construction. This increases
// javascript heap size but improves startup performance.
var lazyMethodGroups = true || (forceLazyMethodGroups === true);
var printedTypeName = false;
var resolveContext = publicInterface.prototype;
// Group up all the methods by name in preparation for building the method groups
var methodsByName = JSIL.$GroupMethodsByName(methods);
for (var key in methodsByName) {
var methodList = methodsByName[key];
JSIL.$ApplyMemberHiding(typeObject, methodList, resolveContext);
}
var record = function (distance, signature) {
this.distance = distance;
this.signature = signature;
};
var typesHiearchy = JSIL.GetTypeAndBases(typeObject);
for (var key in methodsByName) {
var methodList = methodsByName[key];
var methodName = methodList[0]._descriptor.Name;
var methodEscapedName = methodList[0]._descriptor.EscapedName;
var isStatic = methodList[0]._descriptor.Static;
var signature = methodList[0]._data.signature;
var entriesToSort = [];
for (var i = 0, l = methodList.length; i < l; i++) {
var method = methodList[i];
entriesToSort.push(new record(typesHiearchy.indexOf(method._typeObject), method._data.signature));
}
entriesToSort.sort(function (lhs, rhs) {
return JSIL.CompareValues(lhs.distance, rhs.distance);
});
var entries = [];
var numZeroArgEntries = 0;
for (var i = 0, l = entriesToSort.length; i < l; i++) {
var method = entriesToSort[i];
entries.push(method.signature);
if (method.signature.argumentTypes.length === 0) {
numZeroArgEntries += 1;
}
}
if (numZeroArgEntries > 1) {
throw new Error(
"Method '" + methodName + "' has more than one zero-argument overload"
);
}
var target = isStatic ? publicInterface : publicInterface.prototype;
if (
target.hasOwnProperty(methodEscapedName) &&
(typeof (target[methodEscapedName]) === "function") &&
(target[methodEscapedName].__IsPlaceholder__ !== true)
) {
if (trace) {
console.log("Not overwriting " + typeObject.__FullName__ + "." + methodEscapedName);
}
continue;
}
// We defer construction of the actual method group dispatcher(s) until the first
// time the method is used. This reduces the up-front cost of BuildMethodGroups
// and reduces the amount of memory used for methods that are never invoked via
// dynamic dispatch.
var makeMethodGroupGetter = function (
target, isStatic, renamedMethods, methodName, methodEscapedName, entries
) {
var key = null;
return function GetMethodGroup () {
if (key === null) {
key = JSIL.$MakeMethodGroup(
typeObject, isStatic, target, renamedMethods, methodName, methodEscapedName, entries
);
}
var methodGroupTarget = target[key];
if (methodGroupTarget.__IsMembrane__)
JSIL.DefinePreInitMethodAlias(target, methodEscapedName, methodGroupTarget);
return methodGroupTarget;
};
};
if (trace) {
console.log(typeObject.__FullName__ + "[" + methodEscapedName + "] = ", getter);
}
if (active) {
var getter = makeMethodGroupGetter(
target, isStatic, renamedMethods, methodName, methodEscapedName, entries
);
if (lazyMethodGroups) {
JSIL.SetLazyValueProperty(
target, methodEscapedName, getter
);
} else {
JSIL.SetValueProperty(
target, methodEscapedName, getter()
);
}
}
}
};
JSIL.BuildTypeList = function (type, publicInterface) {
var myTypeId = type.__TypeId__;
var typeList = type.__AssignableTypes__ = {};
var context = type.__Context__;
var toVisit = [];
var current = type;
while ((typeof (current) === "object") && (current !== null)) {
toVisit.push(current);
current = current.__BaseType__;
}
while (toVisit.length > 0) {
current = toVisit.shift();
var id = current.__TypeId__;
typeList[id] = true;
if (typeof(current.__AssignableFromTypes__) !== "undefined")
current.__AssignableFromTypes__[myTypeId] = true;
var interfaces = current.__Interfaces__;
if (JSIL.IsArray(interfaces)) {
for (var i = 0; i < interfaces.length; i++) {
var ifaceRef = interfaces[i];
// This should have already generated a warning in FixupInterfaces.
if (ifaceRef === null)
continue;
var iface = JSIL.ResolveTypeReference(ifaceRef, context)[1];
toVisit.push(iface);
}
}
}
};
$jsilcore.cctorKeys = ["_cctor", "_cctor2", "_cctor3", "_cctor4", "_cctor5"];
JSIL.InitializeType = function (type) {
var classObject = type, typeObject = type;
if (typeof (type) === "undefined")
JSIL.RuntimeError("Type is null");
else if (typeof (type.__PublicInterface__) !== "undefined")
classObject = type.__PublicInterface__;
else if (typeof (type.__Type__) === "object")
typeObject = type.__Type__;
else
return;
if (typeObject.__TypeInitialized__ || false)
return;
// Not entirely correct, but prevents recursive type initialization
typeObject.__TypeInitialized__ = true;
if (typeObject.__IsClosed__) {
var forceLazyMethodGroups = false;
// We need to ensure that method groups for BCL classes are always lazy
// because otherwise, initializing the method groups may rely on the classes themselves
if (typeObject.__FullName__.indexOf("System.") === 0)
forceLazyMethodGroups = true;
if (typeObject.IsInterface !== true) {
JSIL.$CreateMethodMembranes(typeObject, classObject);
JSIL.$BuildMethodGroups(typeObject, classObject, forceLazyMethodGroups);
}
JSIL.InitializeFields(classObject, typeObject);
JSIL.InstantiateProperties(classObject, typeObject);
if (typeObject.IsInterface !== true) {
JSIL.QueueTypeInitializer(typeObject, function () {
JSIL.FixupInterfaces(classObject, typeObject);
});
JSIL.RebindRawMethods(classObject, typeObject);
}
if (!typeObject.__IsStatic__) {
JSIL.BuildTypeList(typeObject, classObject);
}
if (
classObject.prototype &&
(typeof (classObject.prototype) === "object") &&
// HACK: We need to use a special implementation for System.Object.MemberwiseClone,
// since when called explicitly it acts 'virtually' (conforms to the instance type)
// (issue #146)
(typeObject.__FullName__ !== "System.Object")
) {
JSIL.SetLazyValueProperty(
classObject.prototype, "MemberwiseClone", function () {
return JSIL.$MakeMemberwiseCloner(typeObject, classObject);
}
);
}
if (classObject.__PreInitMembrane__)
classObject.__PreInitMembrane__.maybeInit();
if (classObject.prototype && classObject.prototype.__PreInitMembrane__)
classObject.prototype.__PreInitMembrane__.maybeInit();
} else {
// console.log("Type '" + typeObject.__FullName__ + "' is open so not initializing");
}
// Any closed forms of the type, if it's an open type, should be initialized too.
if (typeof (typeObject.__OfCache__) !== "undefined") {
var oc = typeObject.__OfCache__;
for (var k in oc) {
if (!oc.hasOwnProperty(k))
continue;
JSIL.InitializeType(oc[k]);
}
}
if (
(typeof (type.__BaseType__) !== "undefined") &&
(type.__BaseType__ !== null)
) {
JSIL.InitializeType(type.__BaseType__);
}
};
JSIL.$InvokeStaticConstructor = function (staticConstructor, typeObject, classObject) {
if (JSIL.ThrowOnStaticCctorError) {
staticConstructor.call(classObject);
} else {
try {
staticConstructor.call(classObject);
} catch (e) {
typeObject.__StaticConstructorError__ = e;
JSIL.Host.warning("Unhandled exception in static constructor for type " + JSIL.GetTypeName(typeObject) + ":");
JSIL.Host.warning(e);
}
}
}
JSIL.RunStaticConstructors = function (classObject, typeObject) {
var base = typeObject.__BaseType__;
if (base && base.__PublicInterface__)
JSIL.RunStaticConstructors(base.__PublicInterface__, base);
JSIL.InitializeType(typeObject);
if (typeObject.__RanCctors__)
return;
typeObject.__RanCctors__ = true;
// Run any queued initializers for the type
var ti = typeObject.__Initializers__ || $jsilcore.ArrayNull;
while (ti.length > 0) {
var initializer = ti.unshift();
if (typeof (initializer) === "function")
initializer(classObject);
};
// If the type is closed, invoke its static constructor(s)
for (var i = 0; i < $jsilcore.cctorKeys.length; i++) {
var key = $jsilcore.cctorKeys[i];
var cctor = classObject[key];
if (typeof (cctor) === "function")
JSIL.$InvokeStaticConstructor(cctor, typeObject, classObject);
}
};
JSIL.InitializeFields = function (classObject, typeObject) {
var typeObjects = [];
var to = typeObject;
while (to) {
typeObjects.push(to);
to = to.__BaseType__;
}
// Run the initializers in reverse order, so we start with the base class
// and work our way up, just in case derived initializers overwrite stuff
// that was put in place by base initializers.
for (var i = typeObjects.length - 1; i >= 0; i--) {
var to = typeObjects[i];
var fi = to.__FieldInitializers__;
if (fi) {
for (var j = 0, l = fi.length; j < l; j++)
fi[j](classObject, to.__PublicInterface__, typeObject, to);
}
}
}
JSIL.ShadowedTypeWarning = function (fullName) {
JSIL.Host.abort(new Error("Type " + fullName + " is shadowed by another type of the same name."));
};
JSIL.DuplicateDefinitionWarning = function (fullName, isPublic, definedWhere, inAssembly) {
var message = (isPublic ? "Public" : "Private") + " type '" + fullName + "' is already defined";
if (inAssembly)
message += " in assembly '" + inAssembly + "'";
if (definedWhere && (definedWhere !== null)) {
message += ".\r\nPreviously defined at:\r\n ";
message += definedWhere.join("\r\n ");
}
JSIL.Host.abort(new Error(message));
};
JSIL.GetFunctionName = function (fn) {
return fn.name || fn.__name__ || "unknown";
};
JSIL.ApplyExternals = function (publicInterface, typeObject, fullName) {
var queue = JSIL.ExternalsQueue[fullName];
if (JSIL.IsArray(queue)) {
while (queue.length > 0) {
var fn = queue.shift();
fn();
}
}
var externals = JSIL.AllImplementedExternals[fullName];
var instancePrefix = "instance$";
var rawSuffix = "$raw";
var constantSuffix = "$constant";
var hasPrototype = typeof (publicInterface.prototype) === "object";
var prototype = hasPrototype ? publicInterface.prototype : null;
for (var k in externals) {
if (!externals.hasOwnProperty(k))
continue;
if (k === "__IsInitialized__")
continue;
var target = publicInterface;
var key = k;
var isRaw = false, isStatic;
if (key.indexOf(instancePrefix) === 0) {
isStatic = false;
if (hasPrototype) {
key = key.replace(instancePrefix, "");
target = prototype;
} else {
JSIL.Host.warning("Type '" + fullName + "' has no prototype to apply instance externals to.");
continue;
}
} else {
isStatic = true;
}
if (key.indexOf(rawSuffix) > 0) {
key = key.replace(rawSuffix, "");
isRaw = true;
}
if (key.indexOf(constantSuffix) > 0) {
JSIL.SetValueProperty(target, key.replace(constantSuffix, ""), externals[k]);
continue;
}
var external = externals[k];
if (!Array.isArray(external))
continue;
var member = external[0];
var value = external[1];
if (member !== null) {
if (Object.getPrototypeOf(member) !== JSIL.MemberRecord.prototype)
JSIL.RuntimeError("Invalid prototype");
typeObject.__Members__.push(member);
}
if (isRaw) {
var rawRecord = new JSIL.RawMethodRecord(key, isStatic);
typeObject.__RawMethods__.push(rawRecord);
}
JSIL.SetValueProperty(target, key, value);
}
if (externals) {
externals.__IsInitialized__ = true;
} else {
JSIL.AllImplementedExternals[fullName] = {
__IsInitialized__: true
};
}
};
JSIL.MakeExternalType = function (fullName, isPublic) {
if (typeof (isPublic) === "undefined")
JSIL.Host.abort(new Error("Must specify isPublic"));
var assembly = $private;
var state = {
hasValue: false
};
var getter = function GetExternalType () {
if (state.hasValue)
return state.value;
else
JSIL.Host.abort(new Error("The external type '" + fullName + "' has not been implemented."));
};
var setter = function SetExternalType (newValue) {
state.value = newValue;
state.hasValue = true;
};
var definition = {
get: getter, set: setter,
configurable: true, enumerable: true
};
var privateName = JSIL.ResolveName(assembly, fullName, false);
if (!privateName.exists())
privateName.define(definition);
if (isPublic) {
var publicName = JSIL.ResolveName(JSIL.GlobalNamespace, fullName, true);
if (!publicName.exists())
publicName.define(definition);
}
};
JSIL.GetCorlib = function () {
return JSIL.GetAssembly("mscorlib", true) || $jsilcore;
};
$jsilcore.$GetRuntimeType = function () {
// Initializing System.Object forms a cyclical dependency through RuntimeType.
return JSIL.$GetSpecialType("System.RuntimeType").typeObject;
};
JSIL.$MakeTypeObject = function (fullName) {
var runtimeType = $jsilcore.$GetRuntimeType();
var result = Object.create(runtimeType.__PublicInterface__.prototype);
return result;
};
JSIL.MakeStaticClass = function (fullName, isPublic, genericArguments, initializer) {
if (typeof (isPublic) === "undefined")
JSIL.Host.abort(new Error("Must specify isPublic"));
var assembly = $private;
var localName = JSIL.GetLocalName(fullName);
var callStack = null;
if (typeof (printStackTrace) === "function")
callStack = printStackTrace();
var memberBuilder = new JSIL.MemberBuilder($private);
var attributes = memberBuilder.attributes;
var typeObject, staticClassObject;
var creator = function CreateStaticClassObject () {
typeObject = JSIL.$MakeTypeObject(fullName);
JSIL.SetValueProperty(typeObject, "__Context__", assembly);
JSIL.SetValueProperty(typeObject, "__FullName__", fullName);
JSIL.SetValueProperty(typeObject, "__ShortName__", localName);
JSIL.SetValueProperty(typeObject, "__BaseType__", null);
typeObject.__ReflectionCache__ = null;
typeObject.__CallStack__ = callStack;
typeObject.__InheritanceDepth__ = 1;
typeObject.__IsStatic__ = true;
typeObject.__Properties__ = [];
typeObject.__Initializers__ = [];
typeObject.__Interfaces__ = [];
typeObject.__Members__ = [];
typeObject.__ExternalMethods__ = [];
typeObject.__RenamedMethods__ = {};
typeObject.__RawMethods__ = [];
typeObject.__TypeInitialized__ = false;
JSIL.FillTypeObjectGenericArguments(typeObject, genericArguments);
typeObject.__Attributes__ = attributes;
typeObject.IsInterface = false;
staticClassObject = JSIL.CreateSingletonObject(JSIL.StaticClassPrototype);
staticClassObject.__Type__ = typeObject;
var typeId = JSIL.AssignTypeId(assembly, fullName);
JSIL.SetTypeId(typeObject, staticClassObject, typeId);
JSIL.SetValueProperty(typeObject, "__PublicInterface__", staticClassObject);
if (typeObject.__GenericArguments__.length > 0) {
staticClassObject.Of$NoInitialize = $jsilcore.$MakeOf$NoInitialize(staticClassObject);
staticClassObject.Of = $jsilcore.$MakeOf(staticClassObject);
typeObject.__IsClosed__ = false;
typeObject.__OfCache__ = {};
} else {
typeObject.__IsClosed__ = true;
}
for (var i = 0, l = typeObject.__GenericArguments__.length; i < l; i++) {
var ga = typeObject.__GenericArguments__[i];
var name = new JSIL.Name(ga, fullName);
JSIL.SetValueProperty(staticClassObject, ga, name);
}
JSIL.ApplyExternals(staticClassObject, typeObject, fullName);
JSIL.SetValueProperty(staticClassObject, "toString", function StaticClass_toString () {
return "<" + fullName + " Public Interface>";
});
return staticClassObject;
};
var wrappedInitializer = null;
if (initializer) {
wrappedInitializer = function (to) {
var interfaceBuilder = new JSIL.InterfaceBuilder(assembly, to.__Type__, to);
return initializer(interfaceBuilder);
};
}
JSIL.RegisterName(fullName, assembly, isPublic, creator, wrappedInitializer);
return memberBuilder;
};
JSIL.$ActuallyMakeCastMethods = function (publicInterface, typeObject, specialType) {
if (!typeObject)
JSIL.RuntimeError("Null type object");
if (!publicInterface)
JSIL.RuntimeError("Null public interface");
JSIL.InitializeType(publicInterface);
var castFunction, asFunction, isFunction;
var customCheckOnly = false;
var checkMethod = publicInterface.CheckType || null;
var typeId = typeObject.__TypeId__;
var assignableFromTypes = typeObject.__AssignableFromTypes__ || {};
typeObject.__CastSpecialType__ = specialType;
var typeName = JSIL.GetTypeName(typeObject);
var throwCastError = function (value) {
throw new System.InvalidCastException("Unable to cast object of type '" + JSIL.GetTypeName(JSIL.GetType(value)) + "' to type '" + typeName + "'.");
};
var throwInvalidAsError = function (value) {
throw new System.InvalidCastException("It is invalid to use 'as' to cast values to this type.");
};
var isIEnumerable = typeName.indexOf(".IEnumerable") >= 0;
var isICollection = typeName.indexOf(".ICollection") >= 0;
var isIList = typeName.indexOf(".IList") >= 0;
var isPointer = typeName.indexOf("JSIL.Pointer") === 0;
var isInterface = typeObject.IsInterface || false;
// HACK: Handle casting arrays to IEnumerable by creating an overlay.
if (isIEnumerable || isICollection || isIList) {
checkMethod = function Check_ArrayInterface (value) {
// FIXME: IEnumerable<int>.Is(float[]) will return true.
if (JSIL.IsArray(value))
return true;
// Fallback to default check logic
return false;
};
} else if (isPointer) {
var expectedElementTypeId = typeObject.__GenericArgumentValues__[0].__TypeId__;
checkMethod = function Check_IsPointer (value) {
var isPointer = value.__IsPointer__ || false;
if (isPointer) {
var matches = value.elementType.__TypeId__ === expectedElementTypeId;
return matches;
} else {
return false;
}
};
}
if (checkMethod) {
isFunction = JSIL.CreateNamedFunction(
typeName + ".$Is",
["expression", "bypassCustomCheckMethod"],
"if (!bypassCustomCheckMethod && checkMethod(expression))\r\n" +
" return true;\r\n" +
"if (expression) {\r\n" +
" var expressionTypeId = expression.__ThisTypeId__;\r\n" +
" return (expressionTypeId === typeId) || (!!assignableFromTypes[expressionTypeId]);\r\n" +
"} else\r\n" +
" return false;\r\n",
{
typeId: typeId,
assignableFromTypes: assignableFromTypes,
checkMethod: checkMethod
}
);
} else {
isFunction = JSIL.CreateNamedFunction(
typeName + ".$Is",
["expression"],
"if (expression) {\r\n" +
" var expressionTypeId = expression.__ThisTypeId__;\r\n" +
" return (expressionTypeId === typeId) || (!!assignableFromTypes[expressionTypeId]);\r\n" +
"} else\r\n" +
" return false;\r\n",
{
typeId: typeId,
assignableFromTypes: assignableFromTypes,
}
);
}
if (checkMethod) {
asFunction = JSIL.CreateNamedFunction(
typeName + ".$As",
["expression"],
"if (checkMethod(expression))\r\n" +
" return expression;\r\n" +
"else if (expression) {\r\n" +
" var expressionTypeId = expression.__ThisTypeId__;\r\n" +
" if ((expressionTypeId === typeId) || (!!assignableFromTypes[expressionTypeId]))\r\n" +
" return expression;\r\n" +
"}\r\n\r\n" +
"return null;\r\n",
{
typeId: typeId,
assignableFromTypes: assignableFromTypes,
checkMethod: checkMethod
}
);
} else {
asFunction = JSIL.CreateNamedFunction(
typeName + ".$As",
["expression"],
"if (expression) {\r\n" +
" var expressionTypeId = expression.__ThisTypeId__;\r\n" +
" if ((expressionTypeId === typeId) || (!!assignableFromTypes[expressionTypeId]))\r\n" +
" return expression;\r\n" +
"}\r\n\r\n" +
"return null;\r\n",
{
typeId: typeId,
assignableFromTypes: assignableFromTypes,
}
);
}
castFunction = function Cast (expression) {
if (isFunction(expression))
return expression;
else if (expression === null)
return null;
else
throwCastError(expression);
};
var integerCastFunction = function Cast_Integer (expression) {
if (typeof (expression) === "number") {
var max = publicInterface.MaxValue | 0;
var result = (expression | 0) & max;
return result;
} else if (expression === false) {
return 0;
} else if (expression === true) {
return 1;
} else if (
expression.__ThisType__ &&
expression.__ThisType__.__IsEnum__
) {
return expression.value;
} else
throwCastError(expression);
};
var numericCastFunction = function Cast_Number (expression) {
if (typeof (expression) === "number") {
return expression;
} else if (expression === false) {
return 0;
} else if (expression === true) {
return 1;
} else
throwCastError(expression);
};
var int64CastFunction = function Cast_Int64_Impl (expression) {
if (expression === false)
return System.Int64.Zero;
else if (expression === true)
return System.Int64.One;
else if (typeof (expression) === "number")
return System.Int64.FromNumber(expression);
else if (checkMethod(expression))
return expression;
else
throwCastError(expression);
};
switch (specialType) {
case "enum":
customCheckOnly = true;
asFunction = throwInvalidAsError;
var castCache = [];
var valueToName = typeObject.__ValueToName__;
var populateCastCache = function (value) {
value |= 0;
var name = valueToName[value] || null;
if (name !== null)
return publicInterface[name];
return publicInterface.$MakeValue(value, null);
};
castFunction = function Cast_Enum (value) {
value |= 0;
var result = castCache[value] || null;
if (result === null)
result = castCache[value] = populateCastCache(value);
return result;
};
break;
case "delegate":
var _isFunction = isFunction;
isFunction = function Is_Delegate (expression) {
return _isFunction(expression) || (typeof (expression) === "function");
};
var _asFunction = asFunction;
asFunction = function As_Delegate (expression) {
var result = _asFunction(expression);
if ((result === null) && (typeof (expression) === "function"))
result = expression;
return result;
};
break;
case "array":
// Allow casting array interface overlays back to appropriate array types
var _isFunction = isFunction;
isFunction = function Is_Array (expression) {
return _isFunction(expression) || (
expression &&
expression.$overlayToArray &&
expression.$overlayToArray(typeObject)
);
};
var _asFunction = asFunction;
asFunction = function As_Array (expression) {
var result = _asFunction(expression);
if ((result === null) && (expression && expression.$overlayToArray))
result = expression.$overlayToArray(typeObject);
return result;
};
castFunction = function CastArray (expression) {
if (_isFunction(expression))
return expression;
if (expression && expression.$overlayToArray) {
var overlayArray = expression.$overlayToArray(typeObject);
if (overlayArray)
return overlayArray;
}
throwCastError(expression);
};
break;
case "char":
customCheckOnly = true;
asFunction = throwInvalidAsError;
break;
case "integer":
customCheckOnly = true;
asFunction = throwInvalidAsError;
castFunction = integerCastFunction;
break;
case "number":
customCheckOnly = true;
asFunction = throwCastError;
castFunction = numericCastFunction;
break;
case "int64":
customCheckOnly = true;
asFunction = throwCastError;
castFunction = function Cast_Int64 (expression) {
return int64CastFunction(expression);
};
break;
}
if (checkMethod && customCheckOnly) {
isFunction = checkMethod;
asFunction = function As_Checked (expression) {
if (checkMethod(expression))
return expression;
else
return null;
};
}
if (isIEnumerable || isICollection || isIList) {
var innerAsFunction = asFunction;
var innerCastFunction = castFunction;
var createOverlay = function Overlay_ArrayInterface (value) {
if (JSIL.IsArray(value)) {
var tElement = $jsilcore.System.Object.__Type__;
if (typeObject.__GenericArguments__.length === 1)
tElement = typeObject.__GenericArgumentValues__[0];
var tOverlay = JSIL.ArrayInterfaceOverlay.Of(tElement);
return new tOverlay(value);
}
return value;
};
asFunction = function As_ArrayInterface (value) {
// FIXME: I think the order of these function calls should be reversed.
return createOverlay(innerAsFunction(value));
};
castFunction = function Cast_ArrayInterface (value) {
// FIXME: I think the order of these function calls should be reversed.
return createOverlay(innerCastFunction(value));
};
}
if (isInterface) {
var wrappedFunctions = JSIL.WrapCastMethodsForInterfaceVariance(typeObject, isFunction, asFunction);
isFunction = wrappedFunctions.is;
asFunction = wrappedFunctions.as;
}
return {
Cast: castFunction,
As: asFunction,
Is: isFunction
}
};
JSIL.MakeCastMethods = function (publicInterface, typeObject, specialType) {
var state = null;
var doLazyInitialize = function () {
if (state === null)
state = JSIL.$ActuallyMakeCastMethods(publicInterface, typeObject, specialType);
};
var getIsMethod = function () {
doLazyInitialize();
return state.Is;
}
var getAsMethod = function () {
doLazyInitialize();
return state.As;
}
var getCastMethod = function () {
doLazyInitialize();
return state.Cast;
}
JSIL.SetLazyValueProperty(publicInterface, "$Is", getIsMethod);
JSIL.SetLazyValueProperty(typeObject, "$Is", getIsMethod);
JSIL.SetLazyValueProperty(publicInterface, "$As", getAsMethod);
JSIL.SetLazyValueProperty(typeObject, "$As", getAsMethod);
JSIL.SetLazyValueProperty(publicInterface, "$Cast", getCastMethod);
JSIL.SetLazyValueProperty(typeObject, "$Cast", getCastMethod);
};
JSIL.MakeTypeAlias = function (sourceAssembly, fullName) {
var context = $private;
var tbn = sourceAssembly.$typesByName;
Object.defineProperty(
context.$typesByName, fullName, {
configurable: false,
enumerable: true,
get: function () {
return tbn[fullName];
}
}
);
if (sourceAssembly.__AssemblyId__ === context.__AssemblyId__) {
// HACK: This is a recursive type alias, so don't define the name alias.
// We still want to leave the typesByName logic above intact since the two aliases have separate assembly
// objects, and thus separate typesByName lists, despite sharing an assembly id.
return;
}
var privateName = JSIL.ResolveName(context, fullName, true);
var sourcePrivateName = null;
var getter = function TypeAlias_getter () {
if (!sourcePrivateName)
sourcePrivateName = JSIL.ResolveName(sourceAssembly, fullName, true);
var result = sourcePrivateName.get();
if (!result)
JSIL.RuntimeError("Type alias for '" + fullName + "' points to a nonexistent type");
return result;
};
privateName.setLazy(getter);
};
JSIL.$MakeOptimizedNumericSwitch = function (output, variableName, cases, defaultCase) {
// TODO: For large numbers of cases, do a divide-and-conquer search to reduce number of comparisons, like:
// if (x > b) {
// if (x === c) casec else if (x === d) cased else casedefault
// } else {
// if (x === a) casea else if (x === b) caseb else casedefault
// }
// switch statements appear to generate better code in JS runtimes now. Neat!
var useIfStatements = false;
if (useIfStatements) {
for (var i = 0, l = cases.length; i < l; i++) {
var caseDesc = cases[i];
if (i === 0)
output.push("if (" + variableName + " === " + caseDesc.key + ") {");
else
output.push("} else if (" + variableName + " === " + caseDesc.key + ") {");
output.push(" " + caseDesc.code);
}
if (defaultCase) {
output.push("} else {");
output.push(" " + defaultCase);
}
output.push("}");
} else {
output.push("switch (" + variableName + ") {");
for (var i = 0, l = cases.length; i < l; i++) {
var caseDesc = cases[i];
output.push(" case " + caseDesc.key + ":");
output.push(" " + caseDesc.code);
output.push(" break;");
}
if (defaultCase) {
output.push(" default:");
output.push(" " + defaultCase);
output.push(" break;");
}
output.push("}");
}
};
JSIL.MakeTypeConstructor = function (typeObject, maxConstructorArguments) {
if (typeObject.__IsClosed__ === false) {
return function () {
JSIL.RuntimeError("Cannot create an instance of an open type");
};
}
var ctorClosure = {
typeObject: typeObject,
fieldInitializer: $jsilcore.FunctionNotInitialized,
isTypeInitialized: false
};
var ctorBody = [];
var argumentNames = [];
ctorBody.push("if (!isTypeInitialized) {");
ctorBody.push(" JSIL.RunStaticConstructors(typeObject.__PublicInterface__, typeObject);");
ctorBody.push(" fieldInitializer = JSIL.GetFieldInitializer(typeObject);");
ctorBody.push(" isTypeInitialized = true;");
ctorBody.push("}");
ctorBody.push("");
ctorBody.push("fieldInitializer(this);");
ctorBody.push("");
// Only generate specialized dispatch if we know the number of arguments.
if (typeof (maxConstructorArguments) === "number") {
var numPositionalArguments = maxConstructorArguments | 0;
ctorBody.push("var argc = arguments.length | 0;");
var cases = [
{ key: 0, code: (typeObject.__IsStruct__ ? "return;" : "return this._ctor();") }
];
for (var i = 1; i < (numPositionalArguments + 1); i++)
argumentNames.push("arg" + (i - 1));
for (var i = 1; i < (numPositionalArguments + 1); i++) {
var line = "return this._ctor(";
for (var j = 0, jMax = Math.min(argumentNames.length, i); j < jMax; j++) {
line += argumentNames[j];
if (j == jMax - 1)
line += ");";
else
line += ", ";
}
cases.push({ key: i, code: line });
}
JSIL.$MakeOptimizedNumericSwitch(
ctorBody, "argc", cases,
"JSIL.RuntimeError('Too many arguments passed to constructor; expected 0 - " + maxConstructorArguments + ", got ' + arguments.length);"
);
} else if (typeObject.__IsStruct__) {
ctorBody.push("if (arguments.length === 0)");
ctorBody.push(" return;");
ctorBody.push("else");
ctorBody.push(" return this._ctor.apply(this, arguments);");
} else {
ctorBody.push("return this._ctor.apply(this, arguments);");
}
var result = JSIL.CreateNamedFunction(
typeObject.__FullName__, argumentNames,
ctorBody.join("\r\n"),
ctorClosure
);
return result;
};
JSIL.MakeType = function (typeArgs, initializer) {
var baseType = typeArgs.BaseType || null;
var fullName = typeArgs.Name || null;
var isReferenceType = Boolean(typeArgs.IsReferenceType);
var isPublic = Boolean(typeArgs.IsPublic);
var genericArguments = typeArgs.GenericParameters || $jsilcore.ArrayNull;
var maxConstructorArguments = typeArgs.MaximumConstructorArguments;
if (typeof (isPublic) === "undefined")
JSIL.Host.abort(new Error("Must specify isPublic"));
var assembly = $private;
var localName = JSIL.GetLocalName(fullName);
var memberBuilder = new JSIL.MemberBuilder($private);
var attributes = memberBuilder.attributes;
var stack = null;
if (typeof (printStackTrace) === "function")
stack = printStackTrace();
var typeObject, staticClassObject;
var createTypeObject = function CreateTypeObject () {
var runtimeType;
runtimeType = $jsilcore.$GetRuntimeType(assembly, fullName);
// We need to make the type object we're constructing available early on, in order for
// recursive generic base classes to work.
typeObject = JSIL.$GetSpecialType(fullName).typeObject;
if (!typeObject)
typeObject = JSIL.CreateSingletonObject(runtimeType);
// Needed for basic bookkeeping to function correctly.
typeObject.__Context__ = assembly;
JSIL.SetValueProperty(typeObject, "__FullName__", fullName);
JSIL.SetValueProperty(typeObject, "__ShortName__", localName);
typeObject.__ReflectionCache__ = null;
// Without this, the generated constructor won't behave correctly for 0-argument construction
typeObject.__IsStruct__ = !isReferenceType;
var ctorFunction = null;
if (genericArguments && genericArguments.length) {
ctorFunction = function OpenType () {
JSIL.RuntimeError("Cannot create an instance of open generic type '" + fullName + "'");
};
} else {
ctorFunction = JSIL.MakeTypeConstructor(typeObject, maxConstructorArguments);
}
staticClassObject = ctorFunction;
JSIL.SetValueProperty(typeObject, "__PublicInterface__", staticClassObject);
JSIL.SetValueProperty(staticClassObject, "__Type__", typeObject);
typeObject.__MaxConstructorArguments__ = maxConstructorArguments;
var typeId = JSIL.AssignTypeId(assembly, fullName);
JSIL.SetTypeId(typeObject, staticClassObject, typeId);
// FIXME: This should probably be a per-assembly dictionary to work right in the case of name collisions.
$jsilcore.InFlightObjectConstructions[fullName] = {
fullName: fullName,
typeObject: typeObject,
publicInterface: staticClassObject
};
if (fullName !== "System.Object") {
JSIL.SetValueProperty(typeObject, "__BaseType__", JSIL.ResolveTypeReference(baseType, assembly)[1]);
var baseTypeName = typeObject.__BaseType__.__FullName__ || baseType.toString();
var baseTypeInterfaces = typeObject.__BaseType__.__Interfaces__ || $jsilcore.ArrayNull;
// HACK: We can't do this check before creating the constructor, because recursion. UGH.
typeObject.__IsStruct__ = typeObject.__IsStruct__ && (baseTypeName === "System.ValueType");
typeObject.__InheritanceDepth__ = (typeObject.__BaseType__.__InheritanceDepth__ || 0) + 1;
typeObject.__Interfaces__ = Array.prototype.slice.call(baseTypeInterfaces);
typeObject.__ExternalMethods__ = Array.prototype.slice.call(typeObject.__BaseType__.__ExternalMethods__ || $jsilcore.ArrayNull);
typeObject.__RenamedMethods__ = JSIL.CreateDictionaryObject(typeObject.__BaseType__.__RenamedMethods__ || null);
} else {
JSIL.SetValueProperty(typeObject, "__BaseType__", null);
typeObject.__IsStruct__ = false;
typeObject.__InheritanceDepth__ = 0;
typeObject.__Interfaces__ = [];
typeObject.__ExternalMethods__ = [];
typeObject.__RenamedMethods__ = JSIL.CreateDictionaryObject(null);
}
typeObject.__IsArray__ = false;
typeObject.__IsNullable__ = fullName.indexOf("System.Nullable`1") === 0;
typeObject.__FieldList__ = $jsilcore.ArrayNotInitialized;
typeObject.__FieldInitializer__ = $jsilcore.FunctionNotInitialized;
typeObject.__MemberCopier__ = $jsilcore.FunctionNotInitialized;
typeObject.__Comparer__ = $jsilcore.FunctionNotInitialized;
typeObject.__Marshaller__ = $jsilcore.FunctionNotInitialized;
typeObject.__Unmarshaller__ = $jsilcore.FunctionNotInitialized;
typeObject.__UnmarshalConstructor__ = $jsilcore.FunctionNotInitialized;
typeObject.__ElementProxyConstructor__ = $jsilcore.FunctionNotInitialized;
typeObject.__Properties__ = [];
typeObject.__Initializers__ = [];
typeObject.__TypeInitialized__ = false;
typeObject.__IsNativeType__ = false;
typeObject.__AssignableTypes__ = null;
typeObject.__AssignableFromTypes__ = {};
JSIL.SetValueProperty(typeObject, "__IsReferenceType__", isReferenceType);
typeObject.__LockCount__ = 0;
typeObject.__Members__ = [];
// FIXME: I'm not sure this is right. See InheritedExternalStubError.cs
typeObject.__Attributes__ = attributes;
typeObject.__RanCctors__ = false;
typeObject.__RawMethods__ = [];
JSIL.FillTypeObjectGenericArguments(typeObject, genericArguments);
typeObject.IsInterface = false;
typeObject.__IsValueType__ = !isReferenceType;
typeObject.__IsByRef__ = false;
typeObject.__CustomPacking__ = typeArgs.Pack;
// Packings of 16 or more are silently ignored by the windows .NET runtime.
if (typeObject.__CustomPacking__ >= 16)
typeObject.__CustomPacking__ = 0;
typeObject.__CustomSize__ = typeArgs.SizeBytes;
typeObject.__ExplicitLayout__ = typeArgs.ExplicitLayout;
typeObject.__SequentialLayout__ = typeArgs.SequentialLayout;
// Lazily initialize struct's native size and alignment properties
if (typeObject.__IsStruct__) {
JSIL.SetLazyValueProperty(
typeObject, "__NativeAlignment__",
JSIL.ComputeNativeAlignmentOfStruct.bind(null, typeObject)
);
JSIL.SetLazyValueProperty(
typeObject, "__NativeSize__",
JSIL.ComputeNativeSizeOfStruct.bind(null, typeObject)
);
JSIL.SetLazyValueProperty(
typeObject, "__IsUnion__",
function () {
JSIL.GetFieldList(typeObject);
return typeObject.__IsUnion_BackingStore__;
}
);
}
if (stack !== null)
typeObject.__CallStack__ = stack;
var inited = false;
JSIL.SetValueProperty(staticClassObject, "toString", function TypePublicInterface_ToString () {
return "<" + fullName + " Public Interface>";
});
JSIL.SetValueProperty(typeObject, "toString", function Type_ToString () {
return JSIL.GetTypeName(this, true);
});
staticClassObject.prototype = JSIL.MakeProto(baseType, typeObject, fullName, false, assembly);
if (typeObject.__GenericArguments__.length > 0) {
staticClassObject.Of$NoInitialize = $jsilcore.$MakeOf$NoInitialize(staticClassObject);
staticClassObject.Of = $jsilcore.$MakeOf(staticClassObject);
typeObject.__IsClosed__ = false;
typeObject.__OfCache__ = {};
} else {
typeObject.__IsClosed__ = (baseType.__IsClosed__ !== false);
}
if (fullName === "System.Object") {
typeObject._IsAssignableFrom = function (typeOfValue) {
return true;
};
} else {
typeObject._IsAssignableFrom = function (typeOfValue) {
return typeOfValue.__AssignableTypes__[this.__TypeId__] === true;
};
}
for (var i = 0, l = typeObject.__GenericArguments__.length; i < l; i++) {
var ga = typeObject.__GenericArguments__[i];
var name = new JSIL.Name(ga, fullName);
var escapedKey = JSIL.EscapeName(ga);
JSIL.SetValueProperty(staticClassObject, escapedKey, name);
}
JSIL.ApplyExternals(staticClassObject, typeObject, fullName);
JSIL.MakeCastMethods(staticClassObject, typeObject, null);
delete $jsilcore.InFlightObjectConstructions[fullName];
return staticClassObject;
};
var state = null;
var getTypeObject = function GetTypeObject () {
if (state === null) {
state = createTypeObject();
}
return state;
};
var wrappedInitializer = null;
if (initializer) {
var makeWrappedInitializer = function (i, a) {
return function (to) {
var interfaceBuilder = new JSIL.InterfaceBuilder(a, to.__Type__, to);
return i(interfaceBuilder);
};
};
wrappedInitializer = makeWrappedInitializer(initializer, assembly);
}
JSIL.RegisterName(fullName, assembly, isPublic, getTypeObject, wrappedInitializer);
// Goddamn V8 closure leaks UGH JESUS
initializer = null;
wrappedInitializer = null;
return memberBuilder;
};
JSIL.MakeClass = function (baseType, fullName, isPublic, genericArguments, initializer) {
var typeArgs = {
BaseType: baseType,
Name: fullName,
GenericParameters: genericArguments,
IsReferenceType: true,
IsPublic: isPublic,
ConstructorAcceptsManyArguments: true
};
return JSIL.MakeType(typeArgs, initializer);
};
JSIL.MakeStruct = function (baseType, fullName, isPublic, genericArguments, initializer) {
var typeArgs = {
BaseType: baseType,
Name: fullName,
GenericParameters: genericArguments,
IsReferenceType: false,
IsPublic: isPublic,
ConstructorAcceptsManyArguments: true
};
return JSIL.MakeType(typeArgs, initializer);
};
JSIL.MakeInterface = function (fullName, isPublic, genericArguments, initializer, interfaces) {
var assembly = $private;
var localName = JSIL.GetLocalName(fullName);
if (typeof (initializer) !== "function") {
JSIL.RuntimeError("Non-function initializer passed to MakeInterface");
}
var callStack = null;
if (typeof (printStackTrace) === "function")
callStack = printStackTrace();
var memberBuilder = new JSIL.MemberBuilder(fullName);
var attributes = memberBuilder.attributes;
var creator = function CreateInterface () {
var publicInterface = new Object();
JSIL.SetValueProperty(publicInterface, "toString", function InterfacePublicInterface_ToString () {
return "<" + fullName + " Public Interface>";
});
var typeObject = JSIL.$MakeTypeObject(fullName);
publicInterface.prototype = null;
publicInterface.__Type__ = typeObject;
JSIL.SetValueProperty(typeObject, "__PublicInterface__", publicInterface);
JSIL.SetValueProperty(typeObject, "__BaseType__", null);
typeObject.__CallStack__ = callStack;
JSIL.SetTypeId(typeObject, publicInterface, JSIL.AssignTypeId(assembly, fullName));
typeObject.__Members__ = [];
typeObject.__RenamedMethods__ = {};
JSIL.SetValueProperty(typeObject, "__ShortName__", localName);
typeObject.__Context__ = $private;
JSIL.SetValueProperty(typeObject, "__FullName__", fullName);
typeObject.__TypeInitialized__ = false;
if (interfaces && interfaces.length) {
// FIXME: This seems wrong.
// JSIL.$CopyInterfaceMethods(interfaces, publicInterface);
}
JSIL.FillTypeObjectGenericArguments(typeObject, genericArguments);
JSIL.SetValueProperty(typeObject, "__IsReferenceType__", true);
typeObject.__AssignableTypes__ = null;
typeObject.IsInterface = true;
typeObject.__Attributes__ = attributes;
typeObject.__Interfaces__ = interfaces || [];
var interfaceBuilder = new JSIL.InterfaceBuilder(assembly, typeObject, publicInterface, "interface");
initializer(interfaceBuilder);
if (typeObject.__GenericArguments__.length > 0) {
publicInterface.Of$NoInitialize = $jsilcore.$MakeOf$NoInitialize(publicInterface);
publicInterface.Of = $jsilcore.$MakeOf(publicInterface);
typeObject.__IsClosed__ = false;
typeObject.__OfCache__ = {};
} else {
typeObject.__IsClosed__ = true;
typeObject.__AssignableFromTypes__ = {};
}
typeObject._IsAssignableFrom = function (typeOfValue) {
return typeOfValue.__AssignableTypes__[this.__TypeId__] === true;
};
JSIL.MakeCastMethods(publicInterface, typeObject, "interface");
return publicInterface;
};
JSIL.RegisterName(fullName, $private, isPublic, creator);
return memberBuilder;
};
JSIL.EnumValue = function (m) {
JSIL.RuntimeError("Cannot create an abstract instance of an enum");
};
JSIL.EnumValue.prototype = JSIL.CreatePrototypeObject(null);
JSIL.EnumValue.prototype.GetType = function () {
return this.__ThisType__;
};
JSIL.EnumValue.prototype.GetHashCode = function () {
return this.value;
};
JSIL.EnumValue.prototype.toString = function () {
if (!this.stringified) {
if (this.isFlags) {
var enumType = this.__ThisType__;
var publicInterface = enumType.__PublicInterface__;
var names = enumType.__Names__;
var result = [];
for (var i = 0, l = names.length; i < l; i++) {
var name = names[i];
var nameValue = publicInterface[name].value;
if (nameValue === this.value) {
result.push(name);
} else if (nameValue) {
if ((this.value & nameValue) === nameValue)
result.push(name);
}
}
if (result.length === 0)
this.stringified = this.value.toString();
else
this.stringified = result.join(", ");
} else {
this.stringified = this.value.toString();
}
}
return this.stringified;
};
JSIL.EnumValue.prototype.valueOf = function () {
return this.value;
}
/* old arglist: fullName, isPublic, members, isFlagsEnum */
JSIL.MakeEnum = function (_descriptor, _members) {
var descriptor, members;
if (arguments.length !== 2) {
descriptor = {
FullName: arguments[0],
IsPublic: arguments[1],
IsFlags: arguments[3] || false,
BaseType: $jsilcore.TypeRef("System.Int32")
};
members = arguments[2];
} else {
descriptor = _descriptor;
members = _members;
}
if (!descriptor || !members)
JSIL.RuntimeError("Invalid arguments");
var localName = JSIL.GetLocalName(descriptor.FullName);
var callStack = null;
if (typeof (printStackTrace) === "function")
callStack = printStackTrace();
var context = $private;
var typeObject, publicInterface;
var creator = function CreateEnum () {
publicInterface = function Enum__ctor () {
JSIL.RuntimeError("Cannot construct an instance of an enum");
};
typeObject = JSIL.$MakeTypeObject(descriptor.FullName);
publicInterface.prototype = JSIL.CreatePrototypeObject($jsilcore.System.Enum.prototype);
publicInterface.__Type__ = typeObject;
JSIL.SetValueProperty(typeObject, "__PublicInterface__", publicInterface);
JSIL.SetValueProperty(typeObject, "__BaseType__", $jsilcore.System.Enum.__Type__);
typeObject.__Context__ = context;
typeObject.__CallStack__ = callStack;
JSIL.SetValueProperty(typeObject, "__FullName__", descriptor.FullName);
typeObject.__IsArray__ = false;
typeObject.__IsEnum__ = true;
typeObject.__IsByRef__ = false;
typeObject.__IsValueType__ = true;
JSIL.SetValueProperty(typeObject, "__IsReferenceType__", false);
typeObject.__IsClosed__ = true;
typeObject.__TypeInitialized__ = false;
if (descriptor.BaseType) {
typeObject.__StorageType__ = JSIL.ResolveTypeReference(descriptor.BaseType)[1];
} else {
typeObject.__StorageType__ = $jsilcore.System.Int32.__Type__;
}
var typeId = JSIL.AssignTypeId(context, descriptor.FullName);
JSIL.SetValueProperty(typeObject, "__TypeId__", typeId);
JSIL.SetValueProperty(publicInterface, "__TypeId__", typeId);
typeObject.__IsFlagsEnum__ = descriptor.IsFlags;
// HACK to ensure that enum types implement the interfaces System.Enum does.
typeObject.__Interfaces__ = typeObject.__BaseType__.__Interfaces__;
var enumTypeId = JSIL.AssignTypeId($jsilcore, "System.Enum");
typeObject.__AssignableTypes__ = {};
typeObject.__AssignableTypes__[typeObject.__TypeId__] = true;
typeObject.__AssignableTypes__[enumTypeId] = true;
typeObject.__AssignableFromTypes__ = {};
typeObject.__AssignableFromTypes__[typeObject.__TypeId__] = true;
typeObject.__ValueToName__ = [];
typeObject.__Names__ = [];
JSIL.SetValueProperty(typeObject, "toString", function Type_ToString () {
return JSIL.GetTypeName(this, true);
});
JSIL.SetValueProperty(publicInterface, "toString", function Type_ToString () {
return "<" + descriptor.FullName + " Public Interface>";
});
typeObject.Of$NoInitialize = function () {
return typeObject;
};
typeObject.Of = function () {
return typeObject;
};
if (descriptor.IsFlags) {
publicInterface.$Flags = function FlagsEnum_Flags () {
var argc = arguments.length;
var resultValue = 0;
for (var i = 0; i < argc; i++) {
var flagName = arguments[i];
resultValue = resultValue | publicInterface[flagName].value;
}
return publicInterface.$MakeValue(resultValue, null);
};
} else {
publicInterface.$Flags = function Enum_Flags () {
JSIL.RuntimeError("Enumeration is not a flags enumeration.");
};
}
typeObject.CheckType = function Enum_CheckType (v) {
if (v.__ThisType__ === typeObject)
return true;
return false;
};
var valueType = publicInterface.$Value = JSIL.CreateNamedFunction(
descriptor.FullName,
["value", "name"],
"this.value = value;\r\n" +
"this.stringified = this.name = name;\r\n"
);
var valueProto = valueType.prototype = publicInterface.prototype;
// Copy members from EnumValue.prototype since we have to derive from System.Enum
for (var k in JSIL.EnumValue.prototype) {
JSIL.MakeIndirectProperty(valueProto, k, JSIL.EnumValue.prototype);
}
JSIL.SetValueProperty(
valueProto, "isFlags", descriptor.IsFlags
);
JSIL.SetValueProperty(
valueProto, "__ThisType__", typeObject
);
JSIL.SetValueProperty(
valueProto, "__ThisTypeId__", typeObject.__TypeId__
);
// Because there's no way to change the behavior of ==,
// we need to ensure that all calls to $MakeValue for a given value
// return the same instance.
// FIXME: Memory leak! Weak references would help here, but TC39 apparently thinks
// hiding GC behavior from developers is more important than letting them control
// memory usage.
var valueCache = JSIL.CreateDictionaryObject(null);
var fixedUpEnumInterfaces = false;
var maybeFixUpInterfaces = function () {
// HACK: Letting System.Enum's interfaces get fixed up normally causes a cycle.
if (!fixedUpEnumInterfaces) {
fixedUpEnumInterfaces = true;
if (!$jsilcore.CanFixUpEnumInterfaces) {
$jsilcore.CanFixUpEnumInterfaces = true;
JSIL.FixupInterfaces($jsilcore.System.Enum, $jsilcore.System.Enum.__Type__);
JSIL.RunStaticConstructors(publicInterface, typeObject);
JSIL.FixupInterfaces(publicInterface, typeObject);
}
}
};
publicInterface.$MakeValue = function (value, name) {
maybeFixUpInterfaces();
var result = valueCache[value];
if (!result)
result = valueCache[value] = new valueType(value, name);
return result;
};
return publicInterface;
};
var initializer = function ($) {
var asm = JSIL.GetAssembly("mscorlib", true) || $jsilcore;
if (!asm)
JSIL.RuntimeError("mscorlib not found!");
var enumType = JSIL.GetTypeFromAssembly(asm, "System.Enum");
var prototype = JSIL.CreatePrototypeObject(enumType.__PublicInterface__.prototype);
JSIL.SetValueProperty(prototype, "__BaseType__", enumType);
JSIL.SetValueProperty(prototype, "__ShortName__", localName);
JSIL.SetValueProperty(prototype, "__FullName__", descriptor.FullName);
JSIL.SetValueProperty($, "__BaseType__", enumType);
$.prototype = prototype;
var ib = new JSIL.InterfaceBuilder(context, typeObject, publicInterface);
for (var key in members) {
if (!members.hasOwnProperty(key))
continue;
var value = members[key];
if (typeof (value) === "function")
continue;
var escapedKey = key;
if (JSIL.ReservedIdentifiers.indexOf(key) >= 0)
escapedKey = "$" + key;
value = Math.floor(value);
$.__Type__.__Names__.push(key);
$.__Type__.__ValueToName__[value] = key;
var makeGetter = function (key, value) {
return function () {
return $.$MakeValue(value, key);
}
};
JSIL.SetLazyValueProperty($, escapedKey, makeGetter(key, value));
var memberDescriptor = ib.ParseDescriptor({Public: true, Static: true}, key);
var mb = new JSIL.MemberBuilder(context);
var data = {
fieldType: $.__Type__,
constant: value
};
ib.PushMember("FieldInfo", memberDescriptor, data, mb);
}
// FIXME: This is doing FixupInterfaces on Enum every time instead of on the specific enum type.
// Should be harmless, but...?
// JSIL.FixupInterfaces(enumType.__PublicInterface__, enumType);
JSIL.MakeCastMethods($, $.__Type__, "enum");
};
JSIL.RegisterName(descriptor.FullName, $private, descriptor.IsPublic, creator, initializer);
};
JSIL.MakeInterfaceMemberGetter = function (thisReference, name) {
return function GetInterfaceMember () {
return thisReference[name];
};
};
JSIL.CheckDerivation = function (haystack, needle) {
var proto = haystack;
while (proto !== null) {
if (proto === needle)
return true;
if (typeof (proto) !== "object")
return false;
proto = Object.getPrototypeOf(proto);
}
return false;
};
JSIL.IsArray = function (value) {
if (value === null)
return false;
else if (Array.isArray(value))
return true;
if (JSIL.IsTypedArray(value))
return true;
return false;
};
JSIL.AreTypedArraysSupported = function () {
return (typeof (ArrayBuffer) !== "undefined");
}
JSIL.IsTypedArray = function (value) {
if ((typeof (value) === "object") && value && value.buffer) {
if (typeof (ArrayBuffer) !== "undefined") {
if (Object.getPrototypeOf(value.buffer) === ArrayBuffer.prototype)
return true;
}
}
return false;
}
JSIL.IsSystemArray = function (value) {
if (JSIL.IsArray(value))
return true;
if (!value)
return false;
var valueType = value.__ThisType__;
if (valueType)
return valueType.__IsArray__;
else
return JSIL.GetType(value).__IsArray__;
};
JSIL.GetBaseType = function (typeObject) {
var result = typeObject.__BaseType__;
if (typeof (result) === "string")
result = JSIL.ResolveName(typeObject.__Context__, result, true);
if ((typeof (result) !== "undefined") && (typeof (result.get) === "function"))
result = result.get();
if ((typeof (result) !== "undefined") && (typeof (result.__Type__) === "object"))
result = result.__Type__;
return result;
};
JSIL.GetType = function (value) {
var type = typeof (value);
if (value === null)
return null;
else if (type === "undefined")
return null;
if ((type === "object") || (type === "function")) {
var tt;
if (tt = value.__ThisType__)
return tt;
else if (value.GetType)
return value.GetType();
else if (JSIL.IsTypedArray(value))
return JSIL.$GetTypeForTypedArray(value);
else if (JSIL.IsArray(value))
return System.Array.__Type__;
else
return System.Object.__Type__;
} else if (type === "string") {
return System.String.__Type__;
} else if (type === "number") {
if (value === (value | 0))
return System.Int32.__Type__;
else
return System.Double.__Type__;
} else if (type === "boolean") {
return System.Boolean.__Type__;
} else {
return System.Object.__Type__;
}
};
JSIL.$GetTypeForTypedArray = function (value) {
var proto = Object.getPrototypeOf(value);
var typeName = proto.constructor.name || String(proto.constructor);
var typeKey = $jsilcore.TypedArrayToType[typeName];
if (typeKey) {
// HACK: Construct an array type given the element type we know about for this typed array constructor.
var parsedTypeName = JSIL.ParseTypeName(typeKey);
var elementType = JSIL.GetTypeInternal(parsedTypeName, $jsilcore, true);
var arrayType = System.Array.Of(elementType).__Type__;
return arrayType;
}
// Who knows what happened, just return System.Array.
return System.Array.__Type__;
};
// type may be a a type object, a type public interface, or an instance of a type.
JSIL.GetTypeName = function (type, dotNetTypeToString) {
if (type === null)
return "System.Object";
if (typeof (type) === "string")
return "System.String";
var typeObject = null;
if (type.__PublicInterface__)
typeObject = type;
else if (type.__Type__)
typeObject = type.__Type__;
else if (type.__ThisType__)
typeObject = type.__ThisType__;
if (typeObject) {
var result = typeObject.__FullName__;
// Emulate the exact behavior of Type.ToString in .NET
if (dotNetTypeToString && !typeObject.__IsClosed__) {
result = typeObject.__FullNameWithoutArguments__ || typeObject.__FullName__;
result += "[";
var ga = typeObject.__GenericArguments__;
var gav = typeObject.__GenericArgumentValues__;
for (var i = 0, l = ga.length; i < l; i++) {
if (gav && gav[i]) {
result += gav[i].__ShortName__;
} else {
result += ga[i];
}
if (i < (l - 1))
result += ",";
}
result += "]";
}
return result;
}
var result;
if (typeof (type.prototype) !== "undefined")
result = type.prototype.__FullName__;
if (typeof (result) === "undefined")
result = typeof (type);
if (typeof (result) !== "string")
result = "unknown type";
return result;
};
JSIL.Coalesce = function (lhs, rhs) {
if (lhs == null)
return rhs;
else
return lhs;
};
JSIL.Dynamic.Cast = function (value, expectedType) {
return value;
};
JSIL.$MakeGenericMethodBinder = function (groupDispatcher, methodFullName, genericArgumentCount, argumentCounts) {
var body = [];
var maxArgumentCount = 0;
var normalArgumentNames = [];
var normalArgumentList = "";
var binderArgumentNames = [];
var binderArgumentList = "";
var closure = {
dispatcherKey: groupDispatcher,
methodFullName: methodFullName
};
for (var i = 0; i < genericArgumentCount; i++) {
binderArgumentNames.push("genericArg" + i);
binderArgumentList += binderArgumentNames[i];
if (i !== (genericArgumentCount - 1))
binderArgumentList += ", ";
}
for (var k in argumentCounts)
maxArgumentCount = Math.max(maxArgumentCount, k | 0);
for (var i = 0; i < maxArgumentCount; i++) {
normalArgumentNames.push("arg" + i);
normalArgumentList += normalArgumentNames[i];
if (i !== (maxArgumentCount - 1))
normalArgumentList += ", ";
}
/*
result.call = function BoundGenericMethod_Call (thisReference) {
// concat doesn't work on the raw 'arguments' value :(
var invokeArguments = genericArguments.concat(
Array.prototype.slice.call(arguments, 1)
);
return body.apply(thisReference, invokeArguments);
};
result.apply = function BoundGenericMethod_Apply (thisReference, invokeArguments) {
// This value might be an Arguments object instead of an array.
invokeArguments = genericArguments.concat(
Array.prototype.slice.call(invokeArguments)
);
return body.apply(thisReference, invokeArguments);
};
return result;
*/
// The user might pass in a public interface instead of a type object, so map that to the type object.
for (var i = 0; i < genericArgumentCount; i++) {
var varName = binderArgumentNames[i];
body.push("if (" + varName + " && " + varName + ".__Type__)");
body.push(" " + varName + " = " + varName + ".__Type__");
}
var innerDispatchCode = [" switch (argc) {"];
for (var k in argumentCounts) {
var localArgCount = k | 0;
innerDispatchCode.push(" case " + localArgCount + ":");
innerDispatchCode.push(" return dispatcher.call(");
innerDispatchCode.push(" thisReference,");
innerDispatchCode.push(" " + binderArgumentList + (
(localArgCount !== 0)
? ", "
: ""
)
);
for (var i = 0; i < localArgCount; i++) {
innerDispatchCode.push(
" " + normalArgumentNames[i] + (
(i === localArgCount - 1)
? ""
: ", "
)
);
}
innerDispatchCode.push(" );");
}
innerDispatchCode.push(" default:");
innerDispatchCode.push(" JSIL.RuntimeError('Unexpected argument count');");
innerDispatchCode.push(" }");
body.push("");
body.push("var boundThis = this;");
body.push("var dispatcher = this[dispatcherKey];");
body.push("");
body.push("var result = function BoundGenericMethod_Invoke (");
body.push(" " + normalArgumentList);
body.push(") {");
body.push(" var thisReference = this;");
// HACK: Strict-mode functions get an undefined 'this' in cases where none is provided.
// In non-strict mode, 'this' will be the global object, which would break this.
// Thanks to strict mode, we don't need custom .call or .apply methods!
body.push(" if (typeof (thisReference) === 'undefined')");
body.push(" thisReference = boundThis;");
body.push(" var argc = arguments.length | 0;");
body.push(" ");
body.push.apply(body, innerDispatchCode);
body.push("};");
body.push("");
body.push("return result;");
var result = JSIL.CreateNamedFunction(
methodFullName + "`" + genericArgumentCount + ".BindGenericArguments[" + maxArgumentCount + "]",
binderArgumentNames,
body.join("\r\n"),
closure
);
return result;
};
JSIL.MemberBuilder = function (context) {
this.context = context;
this.attributes = [];
this.overrides = [];
this.parameterInfo = {};
};
JSIL.MemberBuilder.prototype.Attribute = function (attributeType, getConstructorArguments, initializer) {
var record = new JSIL.AttributeRecord(this.context, attributeType, getConstructorArguments, initializer);
this.attributes.push(record);
// Allows call chaining for multiple attributes
return this;
};
JSIL.MemberBuilder.prototype.Overrides = function (interfaceNameOrReference, interfaceMemberName) {
var record = new JSIL.OverrideRecord(interfaceNameOrReference, interfaceMemberName);
this.overrides.push(record);
return this;
};
JSIL.MemberBuilder.prototype.Parameter = function (index, name, attributes) {
this.parameterInfo[index] = {
name: name,
attributes: attributes || null
};
return this;
};
JSIL.InterfaceBuilder = function (context, typeObject, publicInterface, builderMode) {
this.context = context;
this.typeObject = typeObject;
this.publicInterface = publicInterface;
if (Object.getPrototypeOf(typeObject) === Object.prototype) {
// HACK: Handle the fact that ImplementExternals doesn't pass us a real type object.
this.namespace = this.typeObject.__FullName__;
} else {
this.namespace = JSIL.GetTypeName(typeObject);
}
this.externals = JSIL.AllImplementedExternals[this.namespace];
if (typeof (this.externals) !== "object")
this.externals = JSIL.AllImplementedExternals[this.namespace] = {};
this.builderMode = builderMode || "class";
this._genericParameterCache = {};
var selfRef = typeObject;
var gaNames = typeObject.__GenericArguments__;
if (gaNames && gaNames.length > 0) {
var genericArgs = [];
for (var i = 0, l = gaNames.length; i < l; i++) {
var gpName = gaNames[i];
var gp = new JSIL.GenericParameter(gpName, this.namespace);
genericArgs.push(gp);
this._genericParameterCache[gpName] = gp;
}
selfRef = new JSIL.TypeRef(context, this.namespace, genericArgs);
}
Object.defineProperty(this, "Type", {
configurable: false,
enumerable: true,
value: selfRef
});
Object.defineProperty(this, "prototype", {
configurable: false,
enumerable: false,
get: function () {
JSIL.RuntimeError("Old-style use of $.prototype");
}
});
this.DefineTypeAliases(
JSIL.GetCorlib, [
"System.Byte", "System.UInt16", "System.UInt32", "System.UInt64",
"System.SByte", "System.Int16", "System.Int32", "System.Int64",
"System.Single", "System.Double", "System.String", "System.Object",
"System.Boolean", "System.Char", "System.IntPtr", "System.UIntPtr"
]
);
this.memberDescriptorPrototype = {
Static: false,
Public: false,
SpecialName: false,
Name: null,
toString: function () {
return "<" + this.Name + " Descriptor>";
}
};
this.anonymousMemberCount = 0;
};
JSIL.InterfaceBuilder.prototype.DefineTypeAliases = function (getAssembly, names) {
var asm = null;
var makeGetter = function (name) {
return function GetTypeAlias () {
if (asm === null)
asm = getAssembly();
return asm.TypeRef(name);
};
};
for (var i = 0; i < names.length; i++) {
var name = names[i];
var key = JSIL.GetLocalName(name);
JSIL.SetLazyValueProperty(
this, key, makeGetter(name)
);
}
};
JSIL.InterfaceBuilder.prototype.toString = function () {
return "<Interface Builder for " + this.namespace + ">";
};
JSIL.InterfaceBuilder.prototype.GenericParameter = function (name) {
var result = this._genericParameterCache[name];
if (!result)
result = this._genericParameterCache[name] = new JSIL.GenericParameter(name, this.namespace);
return result;
};
JSIL.InterfaceBuilder.prototype.SetValue = function (key, value) {
var descriptor = {
configurable: true,
enumerable: true,
value: value
};
Object.defineProperty(this.publicInterface, key, descriptor);
Object.defineProperty(this.typeObject, key, descriptor);
if (typeof (this.publicInterface.prototype) !== "undefined")
Object.defineProperty(this.publicInterface.prototype, key, descriptor);
};
JSIL.InterfaceBuilder.prototype.ParseDescriptor = function (descriptor, name, signature) {
if (name === null) {
name = "anonymous$" + this.anonymousMemberCount;
this.anonymousMemberCount += 1;
}
var result = JSIL.CreateDictionaryObject(this.memberDescriptorPrototype);
var escapedName = JSIL.EscapeName(name);
result.Static = descriptor.Static || false;
result.Public = descriptor.Public || false;
result.Virtual = descriptor.Virtual || false;
result.ReadOnly = descriptor.ReadOnly || false;
if (this.builderMode === "interface") {
// HACK: Interfaces have different default visibility than classes, so enforce that.
result.Public = descriptor.Public = true;
result.Static = descriptor.Static = false;
}
if (typeof (descriptor.OriginalName) === "string")
result.OriginalName = descriptor.OriginalName;
else
result.OriginalName = null;
result.Name = name;
result.EscapedName = escapedName;
if (
signature &&
signature.genericArgumentNames &&
signature.genericArgumentNames.length
) {
result.EscapedName += "$b" + signature.genericArgumentNames.length;
}
result.SpecialName = (name == ".ctor") || (name == "_ctor") ||
(name.indexOf(".cctor") === 0) ||
(name.indexOf("_cctor") === 0) ||
(name.indexOf("op_") === 0);
JSIL.SetValueProperty(
result, "Target",
(result.Static || this.typeObject.IsInterface) ? this.publicInterface : this.publicInterface.prototype,
false
);
return result;
};
JSIL.InterfaceBuilder.prototype.PushMember = function (type, descriptor, data, memberBuilder, forExternal) {
var members = this.typeObject.__Members__;
if (!JSIL.IsArray(members))
this.typeObject.__Members__ = members = [];
// Simplify usage of member records by not requiring a null check on data
if (!data)
data = JSIL.CreateDictionaryObject(null);
// Throw if two members with identical signatures and names are added
if (data.signature) {
var includeReturnType =
descriptor.SpecialName;
var existingMembersWithSameNameAndSignature = members.filter(function (m) {
if (!m.data.signature)
return false;
var sig1 = m.data.signature.GetNamedKey(m.descriptor.EscapedName, includeReturnType);
var sig2 = data.signature.GetNamedKey(descriptor.EscapedName, includeReturnType);
return (sig1 == sig2);
});
if (existingMembersWithSameNameAndSignature.length > 0) {
if (forExternal) {
// No need to push this, the external is already implemented. Cool!
} else {
// This means that we accidentally implemented the same method twice, or something equally terrible.
var msgPrefix = includeReturnType ?
"A member with the signature '" :
"A member with the name and argument list '";
JSIL.RuntimeError(
msgPrefix + data.signature.toString(descriptor.EscapedName, includeReturnType) +
"' has already been declared in the type '" +
this.typeObject.__FullName__ + "'."
);
}
}
}
var record = new JSIL.MemberRecord(type, descriptor, data, memberBuilder.attributes, memberBuilder.overrides);
Array.prototype.push.call(members, record);
return members.length - 1;
};
JSIL.$PlacePInvokeMember = function (
target, memberName, signature, methodName, pInvokeInfo
) {
var newValue = null;
var existingValue = target[memberName];
if (existingValue) {
// JSIL.RuntimeError("PInvoke member " + memberName + " obstructed");
// Most likely explanation is that an external method took our place.
return;
}
var dllName = pInvokeInfo.Module;
var importedName = pInvokeInfo.EntryPoint || methodName;
var lookupThunk = function PInvokeLookupThunk () {
var module = JSIL.PInvoke.GetModule(dllName, false);
if (!module)
return (function MissingPInvokeModule () {
throw new System.DllNotFoundException("Unable to load DLL '" + dllName + "': The specified module could not be found.");
});
var methodImpl = JSIL.PInvoke.FindNativeMethod(module, importedName);
if (!methodImpl)
return (function MissingPInvokeEntryPoint () {
throw new System.EntryPointNotFoundException("Unable to find an entry point named '" + importedName + "' in DLL '" + dllName + "'.");
});
var wrapper = JSIL.PInvoke.CreateManagedToNativeWrapper(
module, methodImpl, memberName, signature, pInvokeInfo, null
);
return wrapper;
};
JSIL.SetLazyValueProperty(target, memberName, lookupThunk);
};
JSIL.InterfaceBuilder.prototype.PInvokeMethod = function (_descriptor, methodName, signature, pInvokeInfo) {
var descriptor = this.ParseDescriptor(_descriptor, methodName, signature);
var mangledName = signature.GetNamedKey(descriptor.EscapedName, true);
var prefix = "";
var fullName = this.namespace + "." + methodName;
if (!descriptor.Static)
JSIL.RuntimeError("PInvoke methods must be static: " + fullName);
if (!pInvokeInfo)
JSIL.RuntimeError("PInvoke methods must have PInvoke info");
if (!pInvokeInfo.Module)
JSIL.RuntimeError("PInvoke methods must have a module name");
JSIL.$PlacePInvokeMember(
descriptor.Target, mangledName, signature, methodName, pInvokeInfo
);
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("MethodInfo", descriptor, {
signature: signature,
genericSignature: null,
mangledName: mangledName,
isExternal: true,
isPInvoke: true,
isPlaceholder: false,
isConstructor: false,
parameterInfo: memberBuilder.parameterInfo,
pInvokeInfo: pInvokeInfo
}, memberBuilder, true);
return memberBuilder;
};
JSIL.$PlaceExternalMember = function (
target, implementationSource, implementationPrefix,
memberName, namespace, getDisplayName
) {
var newValue = null;
var existingValue = target[memberName];
if (implementationSource.hasOwnProperty(implementationPrefix + memberName)) {
newValue = implementationSource[implementationPrefix + memberName][1];
} else if (!target.hasOwnProperty(memberName)) {
if (!getDisplayName)
getDisplayName = function () { return memberName; };
newValue = JSIL.MakeExternalMemberStub(namespace, getDisplayName, existingValue);
newValue.__PlaceholderFor__ = memberName;
}
if (newValue === null)
return;
if (existingValue === newValue)
return;
if (existingValue) {
// console.log("replacing '" + memberName + "':", existingValue, "\r\n with:", newValue);
}
JSIL.SetValueProperty(target, memberName, newValue);
};
JSIL.InterfaceBuilder.prototype.ExternalMembers = function (isInstance /*, ...names */) {
var impl = this.externals;
var prefix = isInstance ? "instance$" : "";
var target = this.publicInterface;
if (isInstance)
target = target.prototype;
for (var i = 1, l = arguments.length; i < l; i++) {
var memberName = arguments[i];
JSIL.$PlaceExternalMember(
target, impl, prefix, memberName, this.namespace, null
);
}
};
JSIL.InterfaceBuilder.prototype.Constant = function (_descriptor, name, value) {
var descriptor = this.ParseDescriptor(_descriptor, name);
var data = {
constant: value
};
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("FieldInfo", descriptor, data, memberBuilder);
JSIL.SetValueProperty(this.publicInterface, descriptor.EscapedName, value);
return memberBuilder;
};
JSIL.InterfaceBuilder.MakeProperty = function (typeShortName, name, target, methodSource, recursed) {
var prop = {
configurable: true,
enumerable: true
};
var interfacePrefix = JSIL.GetParentName(name);
if (interfacePrefix.length)
interfacePrefix += ".";
var localName = JSIL.GetLocalName(name);
var getterName = JSIL.EscapeName(interfacePrefix + "get_" + localName);
var setterName = JSIL.EscapeName(interfacePrefix + "set_" + localName);
var getter = methodSource[getterName];
var setter = methodSource[setterName];
if (typeof (getter) === "function") {
prop["get"] = getter;
} else {
prop["get"] = function () {
JSIL.RuntimeError("Property is not readable");
};
}
if (typeof (setter) === "function") {
prop["set"] = setter;
} else {
prop["set"] = function () {
JSIL.RuntimeError("Property is not writable");
};
}
if (!prop.get && !prop.set) {
prop["get"] = prop["set"] = function () {
JSIL.RuntimeError("Property has no getter or setter: " + name + "\r\n looked for: " + getterName + " & " + setterName);
};
}
var escapedName = JSIL.EscapeName(name);
Object.defineProperty(target, escapedName, prop);
// HACK: Ensure that we do not override BaseType$Foo with a derived implementation of $Foo.
if (!recursed) {
var typeQualifiedName = JSIL.EscapeName(typeShortName + "$" + interfacePrefix + localName);
Object.defineProperty(target, typeQualifiedName, prop);
}
if ((getter && getter.__IsMembrane__) || (setter && setter.__IsMembrane__)) {
JSIL.RebindPropertyAfterPreInit(target, escapedName);
if (!recursed)
JSIL.RebindPropertyAfterPreInit(target, typeQualifiedName);
}
};
JSIL.InterfaceBuilder.prototype.Property = function (_descriptor, name, propertyType) {
var descriptor = this.ParseDescriptor(_descriptor, name);
if (this.typeObject.IsInterface) {
} else {
var props = this.typeObject.__Properties__;
props.push([descriptor.Static, name, descriptor.Virtual, propertyType]);
}
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("PropertyInfo", descriptor, null, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.GenericProperty = function (_descriptor, name, propertyType) {
var descriptor = this.ParseDescriptor(_descriptor, name);
var props = this.typeObject.__Properties__;
props.push([descriptor.Static, name, descriptor.Virtual, propertyType]);
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("PropertyInfo", descriptor, null, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.Event = function (_descriptor, name, eventType) {
var descriptor = this.ParseDescriptor(_descriptor, name);
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("EventInfo", descriptor, null, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.GenericEvent = function (_descriptor, name, eventType) {
var descriptor = this.ParseDescriptor(_descriptor, name);
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember("EventInfo", descriptor, null, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.Field = function (_descriptor, fieldName, fieldType, defaultValueExpression) {
var descriptor = this.ParseDescriptor(_descriptor, fieldName);
var data = {
fieldType: fieldType,
defaultValueExpression: defaultValueExpression
};
if (typeof (_descriptor.Offset) === "number")
data.offset = _descriptor.Offset | 0;
var memberBuilder = new JSIL.MemberBuilder(this.context);
var fieldIndex = this.PushMember("FieldInfo", descriptor, data, memberBuilder);
// Instance fields have no special logic applied to the prototype or public interface.
// This is important because having default values or other magic on the prototype
// can impair the creation of dense memory layouts and consistent hidden classes/shapes.
if (!descriptor.Static) {
return memberBuilder;
}
var maybeRunCctors = this.maybeRunCctors;
var context = this.context;
var fieldCreator = function InitField (
fullyDerivedClassObject, classObject,
fullyDerivedTypeObject, typeObject
) {
var actualTarget = descriptor.Static ? classObject : fullyDerivedClassObject.prototype;
var maybeRunCctors = function MaybeRunStaticConstructors () {
JSIL.RunStaticConstructors(fullyDerivedClassObject, fullyDerivedTypeObject);
};
// If the field has already been initialized, don't overwrite it.
if (Object.getOwnPropertyDescriptor(actualTarget, descriptor.EscapedName))
return;
if (typeof (defaultValueExpression) === "function") {
JSIL.DefineLazyDefaultProperty(
actualTarget, descriptor.EscapedName,
function InitFieldDefaultExpression () {
if (descriptor.Static)
maybeRunCctors();
return data.defaultValue = defaultValueExpression(this);
}
);
} else if (typeof (defaultValueExpression) !== "undefined") {
if (descriptor.Static) {
JSIL.DefineLazyDefaultProperty(
actualTarget, descriptor.EscapedName,
function InitFieldDefaultExpression () {
if (descriptor.Static)
maybeRunCctors();
return data.defaultValue = defaultValueExpression;
}
);
} else {
actualTarget[descriptor.EscapedName] = data.defaultValue = defaultValueExpression;
}
} else {
var members = typeObject.__Members__;
var initFieldDefault = function InitFieldDefault () {
var actualFieldInfo = members[fieldIndex];
var actualFieldType = actualFieldInfo.data.fieldType;
var fieldTypeResolved;
if (actualFieldType.getNoInitialize) {
// FIXME: We can't use ResolveTypeReference here because it would initialize the field type, which can form a cycle.
// This means that when we create a default value for a struct type, we may create an instance of an uninitalized type
// or form a cycle anyway. :/
fieldTypeResolved = actualFieldType.getNoInitialize();
} else {
fieldTypeResolved = actualFieldType;
}
if (!fieldTypeResolved)
return;
else if (Object.getPrototypeOf(fieldTypeResolved) === JSIL.GenericParameter.prototype)
return;
return data.defaultValue = JSIL.DefaultValue(fieldTypeResolved);
};
if (
descriptor.Static
) {
JSIL.DefinePreInitField(
actualTarget, descriptor.EscapedName,
initFieldDefault, maybeRunCctors
);
} else {
JSIL.DefineLazyDefaultProperty(
actualTarget, descriptor.EscapedName,
initFieldDefault
);
}
}
};
var fi = this.typeObject.__FieldInitializers__;
if (!fi)
fi = this.typeObject.__FieldInitializers__ = [];
fi.push(fieldCreator);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.ExternalMethod = function (_descriptor, methodName, signature) {
var descriptor = this.ParseDescriptor(_descriptor, methodName, signature);
var mangledName = signature.GetNamedKey(descriptor.EscapedName, true);
var impl = this.externals;
var prefix = descriptor.Static ? "" : "instance$";
var memberValue = descriptor.Target[mangledName];
var newValue = null;
var isPlaceholder;
var fullName = this.namespace + "." + methodName;
{
var externalMethods = this.typeObject.__ExternalMethods__;
var externalMethodIndex = externalMethods.length;
// FIXME: Avoid doing this somehow?
externalMethods.push(signature);
var getName = function () {
var thisType = (this.__Type__ || this.__ThisType__);
var lateBoundSignature = thisType.__ExternalMethods__[externalMethodIndex];
// FIXME: Why is this necessary now when it wasn't before?
if (lateBoundSignature == null)
lateBoundSignature = signature;
return lateBoundSignature.toString(methodName);
};
}
JSIL.$PlaceExternalMember(
descriptor.Target, impl, prefix, mangledName, this.namespace, getName
);
var isConstructor = (descriptor.EscapedName === "_ctor");
var memberTypeName = isConstructor ? "ConstructorInfo" : "MethodInfo";
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember(memberTypeName, descriptor, {
signature: signature,
genericSignature: null,
mangledName: mangledName,
isExternal: true,
isPlaceholder: isPlaceholder,
isConstructor: isConstructor,
parameterInfo: memberBuilder.parameterInfo
}, memberBuilder, true);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.ExternalProperty = function (descriptor, propertyName, propertyType) {
this.ExternalMethod(
descriptor, "get_" + propertyName,
JSIL.MethodSignature.Return(propertyType)
);
this.ExternalMethod(
descriptor, "set_" + propertyName,
JSIL.MethodSignature.Action(propertyType)
);
return this.Property(descriptor, propertyName, propertyType);
};
JSIL.InterfaceBuilder.prototype.ExternalEvent = function (descriptor, eventName, eventType) {
this.ExternalMethod(
descriptor, "add_" + eventName,
JSIL.MethodSignature.Return(eventType)
);
this.ExternalMethod(
descriptor, "remove_" + eventName,
JSIL.MethodSignature.Action(eventType)
);
return this.Event(descriptor, eventName, eventType);
};
JSIL.InterfaceBuilder.prototype.RawMethod = function (isStatic, methodName, fn) {
methodName = JSIL.EscapeName(methodName);
if (typeof (fn) !== "function")
JSIL.RuntimeError("RawMethod only accepts function arguments");
JSIL.SetValueProperty(
isStatic ? this.publicInterface : this.publicInterface.prototype,
methodName, fn
);
var rawRecord = new JSIL.RawMethodRecord(methodName, isStatic);
this.typeObject.__RawMethods__.push(rawRecord);
};
JSIL.InterfaceBuilder.prototype.Method = function (_descriptor, methodName, signature, fn) {
var descriptor = this.ParseDescriptor(_descriptor, methodName, signature);
var mangledName = signature.GetNamedKey(descriptor.EscapedName, true);
var memberBuilder = new JSIL.MemberBuilder(this.context);
if (this.typeObject.IsInterface) {
var methodObject = new JSIL.InterfaceMethod(this.typeObject, descriptor.EscapedName, signature, memberBuilder.parameterInfo);
JSIL.SetValueProperty(descriptor.Target, mangledName, methodObject);
if (!descriptor.Target[descriptor.EscapedName])
JSIL.SetValueProperty(descriptor.Target, descriptor.EscapedName, methodObject);
} else {
if (typeof (fn) !== "function")
JSIL.RuntimeError("Method expected a function as 4th argument when defining '" + methodName + "'");
var fullName = this.namespace + "." + methodName;
JSIL.SetValueProperty(descriptor.Target, mangledName, fn);
}
var isConstructor = (descriptor.EscapedName === "_ctor");
var memberTypeName = isConstructor ? "ConstructorInfo" : "MethodInfo";
this.PushMember(memberTypeName, descriptor, {
signature: signature,
genericSignature: null,
mangledName: mangledName,
isExternal: false,
isConstructor: isConstructor,
parameterInfo: memberBuilder.parameterInfo
}, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.MakeEventAccessors = function (_descriptor, name, type) {
var signature = JSIL.MethodSignature.Action(type);
function adder (value) {
var existingValue = this[name] || null;
var newValue = $jsilcore.$CombineDelegates(existingValue, value);
return this[name] = newValue;
};
function remover (value) {
var existingValue = this[name] || null;
var newValue = $jsilcore.$RemoveDelegate(existingValue, value);
return this[name] = newValue;
};
this.Method(_descriptor, "add_" + name, signature, adder);
this.Method(_descriptor, "remove_" + name, signature, remover);
};
JSIL.InterfaceBuilder.prototype.InheritBaseMethod = function (name, signature) {
var descriptor = this.ParseDescriptor({Public: true, Static: false}, name, signature);
var mangledName = signature.GetNamedKey(descriptor.EscapedName, true);
var fn = null;
fn = function InheritedBaseMethod_Invoke () {
var proto = Object.getPrototypeOf(this);
var baseMethod;
while (true) {
baseMethod = proto[mangledName];
if (baseMethod === fn)
proto = Object.getPrototypeOf(proto);
else
break;
}
if (typeof (baseMethod) === "function")
return baseMethod.apply(this, arguments);
else
JSIL.Host.warning("InheritBaseMethod() used but no method was found to inherit!");
};
JSIL.SetValueProperty(descriptor.Target, mangledName, fn);
var isConstructor = (descriptor.EscapedName === "_ctor");
var memberTypeName = isConstructor ? "ConstructorInfo" : "MethodInfo";
var memberBuilder = new JSIL.MemberBuilder(this.context);
this.PushMember(memberTypeName, descriptor, {
signature: signature,
genericSignature: null,
mangledName: mangledName,
isExternal: false,
isConstructor: isConstructor,
isInherited: true,
parameterInfo: memberBuilder.parameterInfo
}, memberBuilder);
return memberBuilder;
};
JSIL.InterfaceBuilder.prototype.InheritDefaultConstructor = function () {
this.InheritBaseMethod(".ctor", JSIL.MethodSignature.Void);
};
JSIL.InterfaceBuilder.prototype.ImplementInterfaces = function (/* ...interfacesToImplement */) {
var interfaces = this.typeObject.__Interfaces__;
if (typeof (interfaces) === "undefined")
JSIL.RuntimeError("Type has no interface list");
for (var i = 0; i < arguments.length; i++) {
var iface = arguments[i];
if (!iface)
JSIL.RuntimeError("Nonexistent interface passed to ImplementInterfaces");
interfaces.push(iface);
}
};
JSIL.SignatureBase = function () {
JSIL.RuntimeError("Abstract base class");
};
JSIL.SignatureBase.prototype.GetNamedKey$CacheMiss = function (name, includeReturnType) {
var result = name + "" + this.get_Hash(includeReturnType);
if (includeReturnType !== false) {
this._lastKeyName = null;
this._lastKey = result;
}
return result;
};
JSIL.SignatureBase.prototype.GetNamedKey = function (name, includeReturnType) {
if (!name)
return this.GetUnnamedKey(includeReturnType);
else if ((name === this._lastKeyName) && (includeReturnType !== false))
return this._lastKey;
return this.GetNamedKey$CacheMiss(name, includeReturnType);
};
JSIL.SignatureBase.prototype.GetUnnamedKey$CacheMiss = function (includeReturnType) {
var result = this.get_Hash(includeReturnType);
if (includeReturnType !== false) {
this._lastKeyName = null;
this._lastKey = result;
}
return result;
};
JSIL.SignatureBase.prototype.GetUnnamedKey = function (includeReturnType) {
if ((!this._lastKeyName) && (includeReturnType !== false))
return this._lastKey;
return this.GetUnnamedKey$CacheMiss(includeReturnType);
};
JSIL.SignatureBase.prototype.GetKey = function (name, includeReturnType) {
if (arguments.length === 2)
return this.GetNamedKey(name, includeReturnType);
else if (arguments.length === 1)
return this.GetNamedKey(name, true);
else
return this.GetUnnamedKey(true);
};
JSIL.SignatureBase.prototype.ResolveTypeReference = function (typeReference) {
return JSIL.ResolveTypeReference(typeReference, this);
};
JSIL.SignatureBase.prototype.LookupMethod = function (context, name) {
if (!context)
JSIL.RuntimeError("Attempting to invoke method named '" + name + "' on null/undefined object");
var key = this.GetNamedKey(name, true);
var method = context[key];
if (typeof (method) !== "function") {
var signature = this.toString(name);
JSIL.RuntimeError(
"No method with signature '" + signature +
"' defined in context '" + JSIL.GetTypeName(context) + "'"
);
}
return method;
};
JSIL.MethodSignature = function (returnType, argumentTypes, genericArgumentNames, context, openSignature, genericArgumentValues) {
this._lastKeyName = "<null>";
this._lastKey = "<null>";
this._genericSuffix = null;
this._hash = null;
this._hashIncludesReturnType = null;
this.context = context || $private;
this.returnType = returnType;
if (!JSIL.IsArray(argumentTypes)) {
if (argumentTypes !== null) {
var argumentTypesString = typeof(argumentTypes) + " " + String(argumentTypes);
JSIL.RuntimeError("ArgumentTypes must be an array or null, was: " + argumentTypesString);
} else
this.argumentTypes = $jsilcore.ArrayNull;
} else {
this.argumentTypes = argumentTypes;
}
if (JSIL.IsArray(genericArgumentNames))
this.genericArgumentNames = genericArgumentNames;
else
this.genericArgumentNames = $jsilcore.ArrayNull;
this.openSignature = openSignature || null;
if (JSIL.IsArray(genericArgumentValues)){
this.genericArgumentValues = genericArgumentValues;
}
this.recompileCount = 0;
this.useInlineCache = JSIL.MethodSignature.EnableInlineCaches;
this.inlineCacheEntries = [];
this.isInterfaceSignature = false;
};
JSIL.MethodSignature.prototype = JSIL.CreatePrototypeObject(JSIL.SignatureBase.prototype);
JSIL.MethodSignature.prototype.Clone = function (isInterfaceSignature) {
var result = new JSIL.MethodSignature(
this.returnType, this.argumentTypes, this.genericArgumentNames,
this.context, this.openSignature, this.genericArgumentValues
);
result.isInterfaceSignature = isInterfaceSignature;
return result;
};
JSIL.SetLazyValueProperty(JSIL.MethodSignature, "Void", function () {
return new JSIL.MethodSignature(null, null, null);
});
JSIL.MethodSignature.$returnCache = {};
JSIL.MethodSignature.$actionCache = {};
JSIL.MethodSignature.Return = function (returnType) {
var key = null;
if (!returnType)
JSIL.RuntimeError("Return type must be specified");
else if (Object.getPrototypeOf(returnType) === JSIL.TypeRef.prototype)
key = returnType.getTypeId();
else if (returnType.__TypeId__)
key = returnType.__TypeId__;
else
JSIL.RuntimeError("Unsupported return type format");
var result = JSIL.MethodSignature.$returnCache[key];
if (!result) {
result = new JSIL.MethodSignature(returnType, null, null);
JSIL.MethodSignature.$returnCache[key] = result;
}
return result;
};
JSIL.MethodSignature.Action = function (argumentType) {
var key = null;
if (!argumentType)
JSIL.RuntimeError("Argument type must be specified");
else if (Object.getPrototypeOf(argumentType) === JSIL.TypeRef.prototype)
key = argumentType.getTypeId();
else if (argumentType.__TypeId__)
key = argumentType.__TypeId__;
else
JSIL.RuntimeError("Unsupported argument type format");
var result = JSIL.MethodSignature.$actionCache[key];
if (!result) {
result = new JSIL.MethodSignature(null, [argumentType], null);
JSIL.MethodSignature.$actionCache[key] = result;
}
return result;
};
JSIL.SetLazyValueProperty(
JSIL.MethodSignature.prototype, "Call",
function () { return this.$MakeCallMethod("Call", null, null); }, true, false
);
JSIL.SetLazyValueProperty(
JSIL.MethodSignature.prototype, "CallStatic",
function () { return this.$MakeCallMethod("CallStatic", null, null); }, true, false
);
JSIL.SetLazyValueProperty(
JSIL.MethodSignature.prototype, "CallVirtual",
function () { return this.$MakeCallMethod("CallVirtual", null, null); }, true, false
);
JSIL.MethodSignature.prototype.Resolve = function (name) {
var argTypes = [];
var resolvedReturnType = null;
if (this.returnType !== null) {
resolvedReturnType = JSIL.ResolveTypeReference(this.returnType, this)[1];
}
for (var i = 0; i < this.argumentTypes.length; i++) {
argTypes[i] = JSIL.ResolveTypeReference(this.argumentTypes[i], this)[1];
}
return new JSIL.ResolvedMethodSignature(
this,
this.GetNamedKey(name, true),
resolvedReturnType,
argTypes
);
};
JSIL.MethodSignature.prototype.toString = function (name, includeReturnType) {
var signature;
if (includeReturnType === false) {
signature = "";
} else if (this.returnType !== null) {
signature = JSIL.TypeReferenceToName(this.returnType) + " ";
} else {
signature = "void ";
}
if (typeof (name) === "string") {
signature += name;
}
if (this.genericArgumentNames.length > 0) {
signature += "<";
for (var i = 0, l = this.genericArgumentNames.length; i < l; i++) {
if (i > 0)
signature += ", ";
signature += this.genericArgumentNames[i];
}
signature += "> (";
} else {
signature += "(";
}
for (var i = 0; i < this.argumentTypes.length; i++) {
signature += JSIL.TypeReferenceToName(this.argumentTypes[i]);
if (i < this.argumentTypes.length - 1)
signature += ", "
}
signature += ")";
return signature;
};
JSIL.MethodSignature.$EmitInvocation = function (
body, callText,
thisReferenceArg, prefix,
argumentTypes, genericArgumentNames,
isInterface, indentation
) {
var comma;
var needsBindingForm = false;
if (typeof (indentation) !== "string")
indentation = " ";
if (genericArgumentNames)
comma = (genericArgumentNames.length + argumentTypes.length) > 0 ? "," : "";
else
comma = argumentTypes.length > 0 ? "," : "";
body.push(indentation + prefix + callText + "(");
if (thisReferenceArg)
body.push(indentation + " " + thisReferenceArg + comma);
if (genericArgumentNames)
for (var i = 0, l = genericArgumentNames.length; i < l; i++) {
comma = ((i < (l - 1)) || (!needsBindingForm && argumentTypes.length > 0)) ? "," : "";
body.push(indentation + " ga[" + i + "]" + comma);
}
if (needsBindingForm)
body.push(indentation + ")(");
for (var i = 0, l = argumentTypes.length; i < l; i++) {
comma = (i < (l - 1)) ? "," : "";
body.push(indentation + " arg" + i + comma);
}
body.push(indentation + ");");
};
// Used as a global cache for generated invocation method bodies.
// Caching them reduces memory usage but probably ruins type info, so we're not
// going to do it by default.
if (false) {
JSIL.MethodSignature.$CallMethodCache = JSIL.CreateDictionaryObject(null);
} else {
JSIL.MethodSignature.$CallMethodCache = null;
}
// Control whether generated ICs check argument & generic argument counts.
// Shouldn't ever be necessary, but it's a useful debugging tool.
JSIL.MethodSignature.CheckArgumentCount = false;
JSIL.MethodSignature.CheckGenericArgumentCount = false;
JSIL.MethodSignature.EnableInlineCaches = true;
JSIL.MethodSignatureInlineCacheEntry = function (name, typeId, methodKey) {
this.name = name;
this.typeId = typeId;
this.methodKey = methodKey;
};
JSIL.MethodSignatureInlineCacheEntry.prototype.equals = function (name, typeId, methodKey) {
return (this.name === name) &&
(this.typeId === typeId) &&
(this.methodKey === methodKey);
};
JSIL.MethodSignature.prototype.$MakeInlineCacheBody = function (callMethodName, knownMethodKey, fallbackMethod) {
// Welcome to optimization hell! Enjoy your stay.
var returnType = this.returnType;
var argumentTypes = this.argumentTypes;
var genericArgumentNames = this.genericArgumentNames;
var argumentNames;
var methodLookupArg, thisReferenceArg;
var suffix;
var isInterfaceCall = false;
// We're generating an optimized inline cache or invocation thunk that handles
// method dispatch for four different types of calls. They are all similar.
switch (callMethodName) {
case "CallStatic":
// Invoking a specific static method of a given type. There's no this-reference.
// methodSource is the public interface of the type, we can call off it directly.
thisReferenceArg = methodLookupArg = "methodSource";
argumentNames = ["methodSource", "name", "ga"];
break;
case "Call":
// Invoking a specific method against a specific object instance.
thisReferenceArg = "thisReference";
methodLookupArg = "methodSource";
argumentNames = ["methodSource", "name", "ga", "thisReference"];
break;
case "CallVirtual":
// Invoking a specific virtual method of a specific object instance.
// The thisReference is the source of the method so we can call off it directly.
suffix = "Virtual";
thisReferenceArg = methodLookupArg = "thisReference";
argumentNames = ["name", "ga", "thisReference"];
break;
case "CallInterface":
case "CallVariantInterface":
// Interface calls that are non-variant don't need an IC. Their target is constant.
if (callMethodName === "CallInterface")
this.useInlineCache = false;
// Invoking an interface method against a this-reference.
// If the method is part of a variant generic interface, we need to do variant
// lookup. Otherwise, the name is constant and we can dispatch to it directly.
isInterfaceCall = true;
thisReferenceArg = methodLookupArg = "thisReference";
argumentNames = ["thisReference", "ga"];
break;
default:
JSIL.RuntimeError("Invalid callMethodName");
}
for (var i = 0, l = argumentTypes.length; i < l; i++) {
var argumentName = "arg" + i;
argumentNames.push(argumentName);
}
var requiredArgumentCount = argumentNames.length;
var argumentCheckOperator = "!==";
// HACK to allow simple 'method.call(x)' form for zero-argument, non-generic methods.
if ((genericArgumentNames.length === 0) && (argumentTypes.length === 0)) {
requiredArgumentCount = 1;
argumentCheckOperator = "<";
}
// We attempt to generate unique-enough and friendly names for our generated closures.
// These names make it clear what the IC is for and how many times it has been recompiled.
// The recompile count is important; otherwise some debuggers overwrite older compiles
// with new ones, making it confusing to debug.
this.recompileCount += 1;
var functionName = (isInterfaceCall ? "InterfaceMethod" : "MethodSignature") +
"." + callMethodName;
if (knownMethodKey && (callMethodName === "CallInterface")) {
// Generate straightforward closure names for non-variant interface methods.
functionName += "_" +
knownMethodKey;
} else {
functionName +=
"$" + genericArgumentNames.length +
"$" + argumentTypes.length;
}
if (this.useInlineCache)
functionName += "$inlineCache" + this.recompileCount;
var body = [];
// Check the # of provided arguments to detect an invalid invocation.
if (JSIL.MethodSignature.CheckArgumentCount) {
body.push("var argc = arguments.length | 0;");
body.push("if (argc " + argumentCheckOperator + " " + requiredArgumentCount + ")");
body.push(" JSIL.RuntimeError('" + requiredArgumentCount + " argument(s) required, ' + argc + ' provided.');");
}
// If the function accepts generic arguments, we need to do a check to ensure
// that the appropriate # of arguments were passed.
if (genericArgumentNames.length > 0) {
if (JSIL.MethodSignature.CheckGenericArgumentCount) {
body.push("if (!ga || ga.length !== " + genericArgumentNames.length + ")");
body.push(" JSIL.RuntimeError('Invalid number of generic arguments');");
}
body.push("JSIL.ResolveTypeArgumentArray(ga);");
body.push("");
} else {
// If it doesn't accept them, and we're in validation mode, insert a check.
// This wastes cycles normally so we don't always want to put it in there.
if (JSIL.MethodSignature.CheckGenericArgumentCount) {
body.push("if (ga && ga.length > 0)");
body.push(" JSIL.RuntimeError('Invalid number of generic arguments');");
body.push("");
}
}
var nameIdentifier = "name";
var thisReferenceExpression = null;
if (methodLookupArg !== thisReferenceArg)
thisReferenceExpression = thisReferenceArg;
var emitMissingMethodCheck = function (result, methodExpression, methodName, indentation) {
var errMethod =
indentation + " " +
(callMethodName === "CallStatic")
? "this.$StaticMethodNotFound("
: "this.$MethodNotFound(";
result.push(indentation + "if (!" + methodExpression + ")");
if (thisReferenceArg !== methodLookupArg)
result.push(errMethod + thisReferenceExpression + ", " + methodName + ");");
else
result.push(errMethod + thisReferenceArg + ", " + methodName + ");");
result.push(indentation);
};
// This is the path used for simple invocations - no IC, etc.
var emitDefaultInvocation = function (indentation, methodKeyToken) {
// For every invocation type other than Call, the this-reference will
// automatically bind thanks to JS call semantics.
var methodName = (callMethodName === "Call")
? methodLookupArg + "[" + methodKeyToken + "].call"
: methodLookupArg + "[" + methodKeyToken + "]";
if (fallbackMethod) {
body.push(indentation + " var methodReference = " + methodName + ";");
body.push(indentation + " if (!methodReference) {");
body.push(indentation + " methodReference = fallbackMethod(this.typeObject, this, thisReference)");
body.push(indentation + " }");
body.push("");
JSIL.MethodSignature.$EmitInvocation(
body, "methodReference.call", "thisReference",
(!!returnType) ? "return " : "",
argumentTypes, genericArgumentNames,
false, indentation + " "
);
} else {
emitMissingMethodCheck(body, methodName, methodKeyToken, "");
JSIL.MethodSignature.$EmitInvocation(
body, methodName, thisReferenceExpression,
(!!returnType) ? "return " : "",
argumentTypes, genericArgumentNames,
false, indentation
);
}
};
// The 'method key' used to find the method in the method source depends on
// the call scenario.
var getMethodKeyLookup = function () {
if (isInterfaceCall) {
if (callMethodName === "CallVariantInterface") {
return "this.LookupVariantMethodKey(thisReference)";
} else if (knownMethodKey) {
return "\"" + knownMethodKey + "\"";
} else {
return "this.methodKey";
}
} else {
return "this.GetNamedKey(name, true)";
}
};
// When an IC is enabled, if a cache miss occurs we update the IC before finally
// doing a typical invocation.
var emitCacheMissInvocation = function (indentation) {
// Interface ICs are keyed off the type ID of the this-reference.
// Non-interface ICs are keyed off method name.
var typeIdExpression =
isInterfaceCall
? "typeId"
: "null";
// Interface ICs live on the InterfaceMethod's signature.
var cacheMissMethod =
isInterfaceCall
? "this.signature.$InlineCacheMiss(this, '"
: "this.$InlineCacheMiss(this, '";
// Look up the actual method key, update the IC...
body.push(indentation + "var methodKey = " + getMethodKeyLookup() + ";");
body.push(
indentation + cacheMissMethod +
callMethodName + "', " +
nameIdentifier + ", " +
typeIdExpression + ", methodKey);"
);
// Then finally invoke.
emitDefaultInvocation(indentation, "methodKey");
};
if (this.useInlineCache) {
// Crazy inline cache nonsense time!
if (fallbackMethod)
JSIL.RuntimeError("Inline caching does not support fallback methods");
// Look up the type ID of the this-reference for interface calls. We'll be using it a lot.
if (isInterfaceCall) {
nameIdentifier = "null";
body.push("var typeId = thisReference.__ThisTypeId__;");
}
// Generate the lookup switch for the IC, along with IC management code.
for (var i = 0, l = this.inlineCacheEntries.length; i < l; i++) {
var entry = this.inlineCacheEntries[i];
// Check to see if the cache entry matches. Note that the condition depends
// on whether this is an interface method IC.
// FIXME: Can the key end up with a single quote in it, or a backslash?
var conditionExpression =
isInterfaceCall
? "\"" + entry.typeId + "\""
: "\"" + entry.name + "\"";
// So, you might be asking yourself... why a switch block keyed on the name?
// It's a good question. The first IC implementation built a name -> index
// dictionary, and looked up the name in the dictionary to choose the method
// to call. This was a performance improvement.
// The key observation, however, is that the value of these ICs is actually for
// inlining. If the call target is known, inlining can occur more easily,
// and once a method is inlining lots of cool new optimizations become possible.
// In an ideal world, *both* this IC *and* the call target will be inlined,
// so we want to design the IC to make this possible and make it *fast*.
// The old table lookup is not particularly optimizer-friendly. Even if it inlined
// the IC, it wouldn't have any easy way to know that the table lookup
// was constant.
// Replacing the table lookup with a switch (or if statements, even) keyed on
// the name/typeId means that once inlined, the IC looks like this:
//
// function ic (name /* = 'knownName' */, ...) {
// if (name === 'knownName' /* true */) {
// ...
// } else if (name === 'otherKnownName' /* false */) {
// ...
//
// Thanks to the inline, the JIT now has all the information it needs to
// *completely* optimize out the IC. It can kill all the false branch
// conditions and it's only left with the true branch - which calls a specific
// known method directly on the provided this-reference.
// In most scenarios the method name being passed into the IC is a constant,
// so it's fairly likely that inlining can happen and that it will optimize this way.
// Finally, in testing switch statements were not found to be any slower than
// if statements, so we generate an if statement. The generated code is denser
// and clearer, which is nice, and it makes it less work for the JIT to figure
// out that it can use a jump table or whatever it likes in the case where
// we aren't optimized out entirely.
if (i === 0) {
body.push(
"switch (" +
(isInterfaceCall
? "typeId"
: "name") +
") {"
);
}
body.push(
" case " + conditionExpression + ": "
);
// For every invocation type other than Call, the this-reference will
// automatically bind thanks to JS call semantics.
var methodName = (callMethodName === "Call")
? methodLookupArg + "['" + entry.methodKey + "'].call"
: methodLookupArg + "['" + entry.methodKey + "']";
emitMissingMethodCheck(body, methodName, "'" + entry.methodKey + "'", " ");
// This inline cache entry matches, so build an appropriate invocation.
JSIL.MethodSignature.$EmitInvocation(
body, methodName, thisReferenceExpression,
(!!returnType) ? "return " : "",
argumentTypes, genericArgumentNames,
false, " "
);
body.push(" break;");
body.push(" ");
}
if (this.inlineCacheEntries.length >= 1) {
body.push(" default: ");
emitCacheMissInvocation(" ");
body.push("}");
body.push("");
} else {
emitCacheMissInvocation("");
}
} else {
emitDefaultInvocation("", getMethodKeyLookup());
}
var joinedBody = body.join("\r\n");
var closure = null;
if (fallbackMethod)
closure = { fallbackMethod: fallbackMethod };
return JSIL.CreateNamedFunction(
functionName,
argumentNames,
joinedBody,
closure
);
};
JSIL.MethodSignature.prototype.$StaticMethodNotFound = function (publicInterface, methodName) {
JSIL.RuntimeErrorFormat(
"No static method with signature '{0}' found in context '{1}'", [
this.toString(methodName),
publicInterface
]
);
};
JSIL.MethodSignature.prototype.$MethodNotFound = function (thisReference, methodName) {
JSIL.RuntimeErrorFormat(
"No method with signature '{0}' found on instance '{1}'", [
this.toString(methodName),
thisReference
]
);
};
JSIL.MethodSignature.prototype.$MakeCallMethod = function (callMethodName, knownMethodKey, fallbackMethod) {
// FIXME: Is this correct? I think having all instances of a given unique signature
// share the same IC is probably correct.
var cacheKey = callMethodName + "$" + this.GetUnnamedKey(true);
if (JSIL.MethodSignature.$CallMethodCache) {
var cachedResult = JSIL.MethodSignature.$CallMethodCache[cacheKey];
if (cachedResult)
return cachedResult;
}
// Doing an IC with a fallback method in play is totally not worth the trouble.
// Fallback methods are an infrequently used hack anyway.
if (fallbackMethod)
this.useInlineCache = false;
var result = this.$MakeInlineCacheBody(callMethodName, knownMethodKey, fallbackMethod);
if (JSIL.MethodSignature.$CallMethodCache) {
JSIL.MethodSignature.$CallMethodCache[cacheKey] = result;
}
return result;
};
JSIL.MethodSignature.prototype.$InlineCacheMiss = function (target, callMethodName, name, typeId, methodKey) {
if (!this.useInlineCache)
return;
// FIXME: This might be too small.
var inlineCacheCapacity = 3;
var numEntries = this.inlineCacheEntries.length | 0;
if (numEntries >= inlineCacheCapacity) {
// Once the IC gets too large we convert it back to a simple invocation method.
// This is important since these ICs are only a big optimization if the JIT is
// able to inline them into the caller (so the conditionals become free).
// Making an IC too big will prevent inlining and at that point it's not gonna
// be particularly fast or worthwhile.
this.inlineCacheEntries = null;
this.useInlineCache = false;
this.$RecompileInlineCache(target, callMethodName);
} else {
for (var i = 0; i < numEntries; i++) {
var entry = this.inlineCacheEntries[i];
// Our caller is an expired inline cache function.
if (entry.equals(name, typeId, methodKey)) {
// Some bugs cause this to happen over and over so perf sucks.
// JSIL.RuntimeError("Inline cache miss w/ pending recompile.");
return;
}
}
// If we had a cache miss and the target doesn't have an entry, add it and recompile.
var newEntry = new JSIL.MethodSignatureInlineCacheEntry(name, typeId, methodKey);
this.inlineCacheEntries.push(newEntry);
this.$RecompileInlineCache(target, callMethodName);
}
};
JSIL.MethodSignature.prototype.$RecompileInlineCache = function (target, callMethodName) {
var cacheKey = callMethodName + "$" + this.GetUnnamedKey(true);
var newFunction = this.$MakeInlineCacheBody(callMethodName, target.methodKey || null);
if (JSIL.MethodSignature.$CallMethodCache) {
JSIL.MethodSignature.$CallMethodCache[cacheKey] = newFunction;
}
// HACK
var propertyName = this.isInterfaceSignature
? "Call"
: callMethodName;
// Once we've recompiled the inline cache, overwrite the old one on the target.
// Note that this is not 'this' because for interface methods, the IC is managed
// by their signature but lives on the interface method object instead.
JSIL.SetValueProperty(target, propertyName, newFunction);
};
JSIL.MethodSignature.prototype.get_GenericSuffix = function () {
if (this._genericSuffix !== null)
return this._genericSuffix;
if (this.genericArgumentNames.length > 0) {
return this._genericSuffix = "`" + this.genericArgumentNames.length.toString();
}
return this._genericSuffix = "";
};
JSIL.MethodSignature.prototype.get_Hash = function (includeReturnType) {
if ((this._hash !== null) && (this._hashIncludesReturnType === includeReturnType))
return this._hash;
var hash = "$" + JSIL.HashTypeArgumentArray(this.argumentTypes, this.context);
if ((this.returnType !== null) && (includeReturnType !== false)) {
hash += "=" + JSIL.HashTypeArgumentArray([this.returnType], this.context);
} else {
if (includeReturnType !== false)
hash += "=void";
}
this._hash = hash;
this._hashIncludesReturnType = includeReturnType;
return hash;
};
JSIL.MethodSignature.prototype.get_IsClosed = function () {
if (this.returnType && (this.returnType.__IsClosed__ === false))
return false;
for (var i = 0, l = this.argumentTypes.length; i < l; i++) {
var at = this.argumentTypes[i];
if (at.__IsClosed__ === false)
return false;
}
return true;
};
Object.defineProperty(JSIL.MethodSignature.prototype, "GenericSuffix", {
configurable: false,
enumerable: true,
get: JSIL.MethodSignature.prototype.get_GenericSuffix
});
Object.defineProperty(JSIL.MethodSignature.prototype, "Hash", {
configurable: false,
enumerable: true,
get: JSIL.MethodSignature.prototype.get_Hash
});
Object.defineProperty(JSIL.MethodSignature.prototype, "IsClosed", {
configurable: false,
enumerable: true,
get: JSIL.MethodSignature.prototype.get_IsClosed
});
JSIL.ConstructorSignature = function (type, argumentTypes, context) {
this._lastKeyName = "<null>";
this._lastKey = "<null>";
this._hash = null;
this._typeObject = null;
this.context = context || $private;
this.type = type;
if (!JSIL.IsArray(argumentTypes)) {
if (argumentTypes !== null) {
var argumentTypesString = typeof(argumentTypes) + " " + String(argumentTypes);
JSIL.RuntimeError("ArgumentTypes must be an array or null, was: " + argumentTypesString);
} else
this.argumentTypes = $jsilcore.ArrayNull;
} else {
this.argumentTypes = argumentTypes;
}
};
JSIL.ConstructorSignature.prototype = JSIL.CreatePrototypeObject(JSIL.SignatureBase.prototype);
JSIL.SetLazyValueProperty(JSIL.ConstructorSignature.prototype, "Construct", function () { return this.$MakeConstructMethod(); }, true);
JSIL.ConstructorSignature.prototype.get_Type = function () {
if (this._typeObject !== null)
return this._typeObject;
return this._typeObject = this.ResolveTypeReference(this.type)[1];
};
JSIL.ConstructorSignature.prototype.get_Hash = function (includeReturnType) {
if (this._hash !== null)
return this._hash;
return this._hash = "$" + JSIL.HashTypeArgumentArray(this.argumentTypes, this.context) + "=void";
};
JSIL.ConstructorSignature.prototype.$MakeBoundConstructor = function (argumentNames) {
var typeObject = this.get_Type();
var publicInterface = typeObject.__PublicInterface__;
var closure = {};
var body = [];
var proto = publicInterface.prototype;
closure.fieldInitializer = JSIL.GetFieldInitializer(typeObject);
body.push("fieldInitializer(this);");
var ctorKey = "_ctor";
if (typeObject.__IsStruct__ && argumentNames.length === 0) {
} else {
ctorKey = this.GetNamedKey("_ctor", true);
if (!proto[ctorKey]) {
if (!proto["_ctor"])
JSIL.RuntimeError("No method named '_ctor' found");
else
ctorKey = "_ctor";
}
JSIL.MethodSignature.$EmitInvocation(
body, "this['" + ctorKey + "']", null,
"return ", argumentNames
);
}
var result = JSIL.CreateNamedFunction(
typeObject.__FullName__ + "." + ctorKey,
argumentNames,
body.join("\r\n"),
closure
);
result.prototype = proto;
return result;
};
JSIL.ConstructorSignature.prototype.$MakeConstructMethod = function () {
var typeObject = this.get_Type();
var publicInterface = typeObject.__PublicInterface__;
var argumentTypes = this.argumentTypes;
if (typeObject.__IsClosed__ === false)
return function () {
JSIL.RuntimeError("Cannot create an instance of an open type");
};
else if (typeObject.IsInterface)
return function () {
JSIL.RuntimeError("Cannot create an instance of an interface");
};
var closure = {
typeObject: typeObject,
publicInterface: publicInterface
};
var body = [];
var argumentNames = [];
for (var i = 0, l = argumentTypes.length; i < l; i++) {
var argumentName = "arg" + i;
argumentNames.push(argumentName);
}
JSIL.RunStaticConstructors(publicInterface, typeObject);
if (typeObject.__IsNativeType__) {
closure.ctor = publicInterface.prototype["_ctor"];
JSIL.MethodSignature.$EmitInvocation(
body, "ctor.call", "publicInterface",
"return ", argumentTypes
);
} else {
closure.constructor = this.$MakeBoundConstructor(
argumentNames
);
JSIL.MethodSignature.$EmitInvocation(
body, "new constructor", null,
"return ", argumentTypes
);
}
var result = JSIL.CreateNamedFunction(
"ConstructorSignature.Construct$" + argumentTypes.length,
argumentNames,
body.join("\r\n"),
closure
);
return result;
};
JSIL.ConstructorSignature.prototype.toString = function () {
var signature;
signature = this.get_Type().toString(this) + "::.ctor (";
for (var i = 0; i < this.argumentTypes.length; i++) {
signature += this.ResolveTypeReference(this.argumentTypes[i])[1].toString(this);
if (i < this.argumentTypes.length - 1)
signature += ", "
}
signature += ")";
return signature;
};
JSIL.ResolvedMethodSignature = function (methodSignature, key, returnType, argumentTypes) {
this.methodSignature = methodSignature;
this.key = key;
this.returnType = returnType;
this.argumentTypes = argumentTypes;
JSIL.ValidateArgumentTypes(argumentTypes);
};
JSIL.ResolvedMethodSignature.prototype.ResolvePositionalGenericParameter = function (genericParameterValues, parameter) {
if (
(typeof (parameter) === "object") &&
(parameter !== null) &&
(Object.getPrototypeOf(parameter) === JSIL.PositionalGenericParameter.prototype)
) {
return genericParameterValues[parameter.index] || null;
} else {
return parameter;
}
};
JSIL.ResolvedMethodSignature.prototype.ResolvePositionalGenericParameters = function (genericParameterValues) {
var returnType = this.ResolvePositionalGenericParameter(genericParameterValues, this.returnType);
var argumentTypes = [];
var resolvedAnyArguments = false;
for (var i = 0, l = this.argumentTypes.length; i < l; i++) {
var argumentType = this.argumentTypes[i];
argumentType = this.ResolvePositionalGenericParameter(genericParameterValues, argumentType);
argumentTypes.push(argumentType);
if (argumentType !== this.argumentTypes[i]);
resolvedAnyArguments = true;
}
if ((returnType !== this.returnType) || resolvedAnyArguments)
return new JSIL.ResolvedMethodSignature(
this.methodSignature,
this.key,
returnType,
argumentTypes
);
else
return this;
};
JSIL.ResolvedMethodSignature.prototype.toString = function () {
return this.methodSignature.toString.apply(this.methodSignature, arguments);
};
JSIL.InterfaceMethod = function (typeObject, methodName, signature, parameterInfo) {
this.typeObject = typeObject;
this.variantGenericArguments = JSIL.$FindVariantGenericArguments(typeObject);
this.methodName = methodName;
if (signature) {
// Important so ICs don't get mixed up.
this.signature = signature.Clone(true);
} else {
// FIXME: Why the hell does this happen?
this.signature = null;
}
this.parameterInfo = parameterInfo;
this.qualifiedName = JSIL.$GetSignaturePrefixForType(typeObject) + this.methodName;
this.variantInvocationCandidateCache = JSIL.CreateDictionaryObject(null);
this.fallbackMethod = JSIL.$PickFallbackMethodForInterfaceMethod(typeObject, methodName, signature);
JSIL.SetLazyValueProperty(this, "methodKey", function () {
return this.signature.GetNamedKey(this.qualifiedName, true);
});
};
JSIL.SetLazyValueProperty(JSIL.InterfaceMethod.prototype, "Call", function () { return this.$MakeCallMethod(); }, true);
JSIL.InterfaceMethod.prototype.Rebind = function (newTypeObject, newSignature) {
var result = new JSIL.InterfaceMethod(newTypeObject, this.methodName, newSignature, this.parameterInfo);
result.fallbackMethod = this.fallbackMethod;
return result;
};
JSIL.InterfaceMethod.prototype.$StaticMethodNotFound = function (thisReference, methodName) {
JSIL.RuntimeErrorFormat(
"Interface method '{0}' not found in context '{1}'", [
this.signature.toString(this.methodName),
thisReference
]
);
};
JSIL.InterfaceMethod.prototype.GetVariantInvocationCandidates = function (thisReference) {
var cache = this.variantInvocationCandidateCache;
var typeId = thisReference.__ThisTypeId__;
var result = cache[typeId];
if (typeof (result) === "undefined") {
cache[typeId] = result = JSIL.$GenerateVariantInvocationCandidates(
this.typeObject, this.signature, this.qualifiedName, this.variantGenericArguments, JSIL.GetType(thisReference)
);
}
return result;
};
JSIL.InterfaceMethod.prototype.MethodLookupFailed = function (thisReference) {
var variantInvocationCandidates = this.GetVariantInvocationCandidates(thisReference);
var errorString = "Method '" + this.signature.toString(this.methodName) + "' of interface '" +
this.typeObject.__FullName__ + "' is not implemented by object " +
thisReference + "\n";
if (variantInvocationCandidates) {
errorString += "(Looked for key(s): '";
errorString += this.methodKey + "'";
for (var i = 0, l = variantInvocationCandidates.length; i < l; i++) {
var candidate = variantInvocationCandidates[i];
errorString += ", \n'" + candidate + "'";
}
errorString += ")";
} else {
errorString += "(Looked for key '" + this.methodKey + "')";
}
JSIL.RuntimeError(errorString);
};
JSIL.InterfaceMethod.prototype.LookupMethod = function (thisReference, name) {
var methodKey;
if (this.variantGenericArguments.length > 0) {
methodKey = this.LookupVariantMethodKey(thisReference);
} else {
methodKey = this.methodKey;
}
var result = thisReference[methodKey];
if (!result)
this.MethodLookupFailed(thisReference);
return result;
};
JSIL.InterfaceMethod.prototype.LookupVariantMethodKey = function (thisReference) {
var variantInvocationCandidates = this.GetVariantInvocationCandidates(thisReference);
if (variantInvocationCandidates) {
for (var i = 0, l = variantInvocationCandidates.length; i < l; i++) {
var candidate = variantInvocationCandidates[i];
var variantResult = thisReference[candidate];
if (variantResult)
return candidate;
}
}
return this.methodKey;
};
JSIL.InterfaceMethod.prototype.$MakeCallMethod = function () {
if (this.typeObject.__IsClosed__ && this.signature.IsClosed) {
var callType =
(this.variantGenericArguments.length > 0)
? "CallVariantInterface"
: "CallInterface";
var fallbackMethod = this.fallbackMethod;
Object.defineProperty(
this, "fallbackMethod",
{
value: fallbackMethod,
writable: false,
writeable: false,
configurable: false
}
);
return this.signature.$MakeCallMethod(callType, this.methodKey, fallbackMethod);
} else {
return function () {
JSIL.RuntimeError("Cannot invoke method '" + this.methodName + "' of open generic interface '" + this.typeObject.__FullName__ + "'");
};
}
};
JSIL.InterfaceMethod.prototype.toString = function () {
// HACK: This makes it possible to do
// MethodSignature.CallVirtual(IFoo.Method, thisReference)
return this.qualifiedName;
};
JSIL.$GetSignaturePrefixForType = function (typeObject) {
if (typeObject.IsInterface) {
if (typeObject.__OpenType__)
return "I" + typeObject.__OpenType__.__TypeId__ + "$";
else
return "I" + typeObject.__TypeId__ + "$";
} else {
return "";
}
};
//
// System.Type.cs
//
// Author:
// Rodrigo Kumpera <kumpera@gmail.com>
//
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
JSIL.TypeNameParseState = function (input, fromPosition) {
this.input = input;
this.pos = fromPosition;
};
Object.defineProperty(JSIL.TypeNameParseState.prototype, "eof", {
get: function () {
return this.pos >= this.input.length;
}
});
Object.defineProperty(JSIL.TypeNameParseState.prototype, "current", {
get: function () {
return this.input[this.pos];
}
});
JSIL.TypeNameParseState.prototype.substr = function (start, count) {
return this.input.substr(start, count);
};
JSIL.TypeNameParseState.prototype.moveNext = function () {
this.pos += 1;
return (this.pos < this.input.length);
};
JSIL.TypeNameParseState.prototype.skipWhitespace = function () {
var length = this.input.length;
while ((this.pos < length) && (this.current === ' '))
this.pos += 1;
};
JSIL.TypeNameParseResult = function () {
this.type = null;
this.assembly = null;
this.genericArguments = [];
this.arraySpec = [];
this.pointerLevel = 0;
this.isByRef = false;
this.parseEndedAt = null;
};
Object.defineProperty(JSIL.TypeNameParseResult.prototype, "isArray", {
get: function () {
return this.arraySpec.length > 0;
}
});
JSIL.TypeNameParseResult.prototype.addName = function (name) {
if (!this.type)
this.type = name;
else
this.type += "+" + name;
};
JSIL.TypeNameParseResult.prototype.addArray = function (array) {
this.arraySpec.push(array);
};
JSIL.ParseTypeNameImpl = function (input, fromPosition, isRecursive, allowQualifiedNames) {
var state = new JSIL.TypeNameParseState(input, fromPosition);
var inModifiers = false;
state.skipWhitespace();
var startPosition = state.pos;
var result = new JSIL.TypeNameParseResult();
while (state.moveNext()) {
switch (state.current) {
case '+':
result.addName(state.substr(startPosition, state.pos - startPosition));
startPosition = state.pos + 1;
break;
case ',':
case ']':
result.addName(state.substr(startPosition, state.pos - startPosition));
startPosition = state.pos + 1;
inModifiers = true;
if (isRecursive && !allowQualifiedNames) {
result.parseEndedAt = state.pos;
return result;
}
break;
case '&':
case '*':
case '[':
if (isRecursive && (state.current !== '['))
JSIL.RuntimeError("Generic argument must be by-value and not a pointer");
result.addName(state.substr(startPosition, state.pos - startPosition));
startPosition = state.pos + 1;
inModifiers = true;
break;
}
if (inModifiers)
break;
}
if (startPosition < state.pos)
result.addName(state.substr(startPosition, state.pos - startPosition));
if (!inModifiers) {
result.parseEndedAt = state.pos;
return result;
}
state.pos -= 1;
while (state.moveNext()) {
switch (state.current) {
case '&':
if (result.isByRef)
JSIL.RuntimeError("Too many &s");
result.isByRef = true;
break;
case '*':
if (result.isByRef)
JSIL.RuntimeError("Can't have a pointer to a byref type");
result.pointerLevel += 1;
break;
case ',':
if (isRecursive) {
var length = state.input.length, end = state.pos;
while (end < length && state.input[end] !== ']')
end += 1;
if (end >= length)
JSIL.RuntimeError("Unmatched '['");
result.assembly = state.substr(state.pos + 1, end - state.pos - 1).trim();
state.pos = end + 1;
result.parseEndedAt = state.pos;
return result;
}
result.assembly = state.substr(state.pos + 1).trim();
state.pos = length;
break;
case '[':
if (result.isByRef)
JSIL.RuntimeError("ByRef qualifier must be last part of type");
state.pos += 1;
if (state.pos >= length)
JSIL.RuntimeError("Invalid array/generic spec");
state.skipWhitespace();
var sch = state.current;
if (
(sch !== ',') &&
(sch !== '*') &&
(sch !== ']')
) {
//generic args
if (result.isArray)
throw new ArgumentException ("generic args after array spec", "typeName");
while (!state.eof) {
state.skipWhitespace();
var aqn = state.current === '[';
if (aqn)
state.moveNext();
var subspec = JSIL.ParseTypeNameImpl(state.input, state.pos, true, aqn);
state.pos = subspec.parseEndedAt;
result.genericArguments.push(subspec);
if (state.eof)
JSIL.RuntimeError("Invalid generic args spec");
if (state.current === ']')
break;
else if (state.current === ',')
state.moveNext();
else
JSIL.RuntimeError("Invalid generic args separator");
}
if (state.eof || (state.current !== ']'))
JSIL.RuntimeError("Invalid generic args spec");
} else {
//array spec
var dimensions = 1, bound = false;
while (!state.eof && (state.current !== ']')) {
if (state.current === '*') {
if (bound)
JSIL.RuntimeError("Array spec has too many bound dimensions");
bound = true;
} else if (state.current !== ',') {
JSIL.RuntimeError("Invalid character in array spec");
} else {
dimensions += 1;
}
state.moveNext();
state.skipWhitespace();
}
if (state.current !== ']')
JSIL.RuntimeError("Invalid array spec");
if ((dimensions > 1) && bound)
JSIL.RuntimeError("Invalid array spec: Multi-dimensional array can't be bound");
result.addArray({
dimensions: dimensions,
bound: bound
});
}
break;
case ']':
if (isRecursive) {
result.parseEndedAt = state.pos;
return result;
}
JSIL.RuntimeError("Unmatched ']'");
default:
JSIL.RuntimeError("Invalid type spec");
}
}
return result;
};
JSIL.ParseTypeName = function (name) {
return JSIL.ParseTypeNameImpl(name, 0, false, true);
};
JSIL.GetTypeInternal = function (parsedTypeName, defaultContext, throwOnFail) {
var context = null;
if (parsedTypeName.assembly !== null)
context = JSIL.GetAssembly(parsedTypeName.assembly, true);
if (context === null)
context = defaultContext;
var ga = null;
if (parsedTypeName.genericArguments !== null) {
ga = new Array(parsedTypeName.genericArguments.length);
for (var i = 0, l = ga.length; i < l; i++) {
ga[i] = JSIL.GetTypeInternal(parsedTypeName.genericArguments[i], defaultContext, false);
if (ga[i] === null) {
if (throwOnFail)
JSIL.RuntimeError("Unable to resolve generic argument '" + parsedTypeName.genericArguments[i].type + "'");
else
return null;
}
}
}
return JSIL.GetTypeFromAssembly(context, parsedTypeName.type, ga, throwOnFail);
};
JSIL.GetTypeFromAssembly = function (assembly, typeName, genericArguments, throwOnFail) {
var resolved, result = null;
var publicInterface = assembly.__PublicInterface__ || assembly;
assembly = publicInterface.__Assembly__;
resolved = JSIL.ResolveName(publicInterface, typeName, true, throwOnFail === true);
if (resolved === null)
return null;
if (resolved.exists()) {
result = resolved.get();
if (JSIL.IsArray(genericArguments) && (genericArguments.length > 0))
result = result.Of.apply(result, genericArguments);
} else if (throwOnFail) {
throw new System.TypeLoadException("The type '" + typeName + "' could not be found in the assembly '" + assembly.toString() + "'.");
}
if (result !== null)
return result.__Type__;
else
return null;
};
JSIL.GetTypesFromAssembly = function (assembly) {
var publicInterface = assembly.__PublicInterface__ || assembly;
assembly = publicInterface.__Assembly__;
var result = [];
var types = publicInterface.$typesByName;
for (var k in types) {
var typeFunction = types[k];
var publicInterface = typeFunction(false);
var type = publicInterface.__Type__;
result.push(type);
}
return result;
};
JSIL.$CreateInstanceOfTypeTable = JSIL.CreateDictionaryObject(null);
JSIL.CreateInstanceOfTypeRecordSet = function (type) {
this.records = JSIL.CreateDictionaryObject(null);
};
JSIL.CreateInstanceOfTypeRecord = function (
type, publicInterface,
constructorName, constructor,
specialValue
) {
JSIL.RunStaticConstructors(publicInterface, type);
var closure = JSIL.CreateDictionaryObject(null);
var constructorBody = [];
this.type = type;
this.constructorName = constructorName;
this.constructor = constructor;
this.specialValue = specialValue;
this.argumentlessInstanceConstructor = null;
// FIXME: I think this runs the field initializer twice? :(
var fi = JSIL.GetFieldInitializer(type);
if (fi) {
closure.fieldInitializer = fi;
constructorBody.push("fieldInitializer(this);");
}
if ((constructorName === null) && (constructor === null)) {
} else {
if (type.__IsStruct__) {
this.argumentlessInstanceConstructor = JSIL.CreateNamedFunction(
type.__FullName__ + ".CreateInstanceOfType$NoArguments",
[],
constructorBody.join("\r\n"),
closure
);
this.argumentlessInstanceConstructor.prototype = publicInterface.prototype;
} else {
constructorBody.push("if ((typeof (argv) === 'undefined') || (argv === null)) argv = [];");
}
if (constructor) {
closure.actualConstructor = constructor;
constructorBody.push("return actualConstructor.apply(this, argv);");
}
}
this.instanceConstructor = JSIL.CreateNamedFunction(
type.__FullName__ + ".CreateInstanceOfType",
["argv"],
constructorBody.join("\r\n"),
closure
);
this.instanceConstructor.prototype = publicInterface.prototype;
};
JSIL.CreateInstanceOfType$CacheMiss = function (type, constructorName, constructorArguments, recordSet) {
if (!recordSet)
recordSet = JSIL.$CreateInstanceOfTypeTable[type.__TypeId__] =
new JSIL.CreateInstanceOfTypeRecordSet(type);
var publicInterface = type.__PublicInterface__;
var record = null;
if (type.__IsNativeType__) {
var specialValue = JSIL.DefaultValue(type);
record = new JSIL.CreateInstanceOfTypeRecord(
type, publicInterface, null, null, specialValue
);
} else if (typeof (constructorName) === "string") {
var constructor = publicInterface.prototype[constructorName];
if (!constructor)
JSIL.RuntimeError("Type '" + type.__FullName__ + "' does not have a constructor named '" + constructorName + "'");
record = new JSIL.CreateInstanceOfTypeRecord(
type, publicInterface, constructorName, constructor, null
);
} else if (typeof (constructorName) === "function") {
record = new JSIL.CreateInstanceOfTypeRecord(
type, publicInterface, constructorName, constructorName, null
);
} else {
record = new JSIL.CreateInstanceOfTypeRecord(
type, publicInterface, null, null, null
);
}
if (type.__IsClosed__ === false)
JSIL.RuntimeError("Cannot create an instance of an open type");
else if (type.IsInterface)
JSIL.RuntimeError("Cannot create an instance of an interface");
recordSet.records[constructorName] = record;
return JSIL.CreateInstanceOfType$CacheHit(type, record, constructorArguments);
};
JSIL.CreateInstanceOfType$CacheHit = function (type, record, constructorArguments) {
if (type.__IsNativeType__) {
// Native types need to be constructed differently.
if (record.specialValue !== null)
return record.specialValue;
else
return record.constructor.apply(record.constructor, constructorArguments);
} else {
if (
(constructorArguments === null) ||
(constructorArguments === undefined) ||
(constructorArguments.length === 0)
) {
if (record.argumentlessInstanceConstructor !== null)
return new (record.argumentlessInstanceConstructor)();
else
return new (record.instanceConstructor)($jsilcore.ArrayNull);
} else {
return new (record.instanceConstructor)(constructorArguments);
}
}
};
JSIL.CreateInstanceOfType = function (type, $constructorName, $constructorArguments) {
var constructorName = null, constructorArguments = null;
if (arguments.length < 2)
constructorName = "_ctor";
else
constructorName = $constructorName;
if (arguments.length < 3)
constructorArguments = null;
else
constructorArguments = $constructorArguments;
var recordSet = JSIL.$CreateInstanceOfTypeTable[type.__TypeId__] || null;
if (recordSet) {
var record = recordSet.records[constructorName] || null;
if (record) {
return JSIL.CreateInstanceOfType$CacheHit(type, record, constructorArguments);
} else {
return JSIL.CreateInstanceOfType$CacheMiss(type, constructorName, constructorArguments, recordSet);
}
} else {
return JSIL.CreateInstanceOfType$CacheMiss(type, constructorName, constructorArguments, null);
}
};
$jsilcore.BindingFlags = {
Default: 0,
IgnoreCase: 1,
DeclaredOnly: 2,
Instance: 4,
Static: 8,
Public: 16,
NonPublic: 32,
FlattenHierarchy: 64,
InvokeMethod: 256,
CreateInstance: 512,
GetField: 1024,
SetField: 2048,
GetProperty: 4096,
SetProperty: 8192,
PutDispProperty: 16384,
PutRefDispProperty: 32768,
ExactBinding: 65536,
SuppressChangeType: 131072,
OptionalParamBinding: 262144,
IgnoreReturn: 16777216,
$Flags: function () {
var result = 0;
for (var i = 0; i < arguments.length; i++) {
result |= $jsilcore.BindingFlags[arguments[i]];
}
return result;
}
};
// Ensures that all the type's members have associated MemberInfo instances and returns them.
JSIL.GetReflectionCache = function (typeObject) {
if (typeof (typeObject) === "undefined")
return null;
if (typeObject === null)
return null;
var cache = typeObject.__ReflectionCache__;
if (JSIL.IsArray(cache))
return cache;
var members = typeObject.__Members__;
if (!JSIL.IsArray(members))
return null;
cache = typeObject.__ReflectionCache__ = [];
var makeTypeInstance = function (type) {
// Construct the appropriate subclass of MemberInfo
var parsedTypeName = JSIL.ParseTypeName("System.Reflection." + type);
var infoType = JSIL.GetTypeInternal(parsedTypeName, $jsilcore, true);
var info = JSIL.CreateInstanceOfType(infoType, null);
/*
// Don't trigger type initialization machinery
// FIXME: This will break if any of the memberinfo types rely on static constructors.
var infoType = JSIL.GetTypeByName("System.Reflection." + type, $jsilcore);
var info = Object.create(infoType.prototype);
*/
// HACK: Makes it possible to tell what type a member is trivially
JSIL.SetValueProperty(info, "__MemberType__", type);
return info;
};
for (var i = 0, l = members.length; i < l; i++) {
var member = members[i];
if (!member)
continue;
var type = member.type;
var descriptor = member.descriptor;
var data = member.data;
var info = makeTypeInstance(type);
info._typeObject = typeObject;
info._data = data;
info._descriptor = descriptor;
info.__Attributes__ = member.attributes;
info.__Overrides__ = member.overrides;
cache.push(info);
}
return cache;
};
// Scans the specified type (and its base types, as necessary) to retrieve all the MemberInfo instances appropriate for a request.
// If any BindingFlags are specified in flags they are applied as filters to limit the number of members returned.
// If memberType is specified and is the short name of a MemberInfo subclass like 'FieldInfo', only members of that type are returned.
JSIL.GetMembersInternal = function (typeObject, flags, memberType, name) {
var result = [];
var bindingFlags = $jsilcore.BindingFlags;
var allMethodsIncludingSpecialNames = (memberType === "$AllMethods");
var methodOrConstructor = (memberType === "$MethodOrConstructor") || allMethodsIncludingSpecialNames;
var allowInherited = ((flags & bindingFlags.DeclaredOnly) == 0) &&
// FIXME: WTF is going on here?
!typeObject.IsInterface;
var publicOnly = (flags & bindingFlags.Public) != 0;
var nonPublicOnly = (flags & bindingFlags.NonPublic) != 0;
if (publicOnly && nonPublicOnly)
publicOnly = nonPublicOnly = false;
// FIXME: Is this right?
else if (!publicOnly && !nonPublicOnly)
return result;
var staticOnly = (flags & bindingFlags.Static) != 0;
var instanceOnly = (flags & bindingFlags.Instance) != 0;
if (staticOnly && instanceOnly)
staticOnly = instanceOnly = false;
var members = [];
var target = typeObject;
while (target !== null) {
var targetMembers = JSIL.GetReflectionCache(target);
if (targetMembers === null)
break;
members = targetMembers.concat(members);
if (!allowInherited)
break;
target = target.__BaseType__;
}
for (var i = 0, l = members.length; i < l; i++) {
var member = members[i];
// HACK: Reflection never seems to enumerate static constructors. This is probably because
// it doesn't make any sense to invoke them explicitly anyway, and they don't have arguments...
if (
!allMethodsIncludingSpecialNames &&
member._descriptor.Static &&
member._descriptor.SpecialName &&
member._descriptor.Name.indexOf("cctor") >= 0
)
continue;
if (publicOnly && !member._descriptor.Public)
continue;
else if (nonPublicOnly && member._descriptor.Public)
continue;
if (staticOnly && !member._descriptor.Static)
continue;
else if (instanceOnly && member._descriptor.Static)
continue;
var currentMemberType = member.__ThisType__.__ShortName__;
if (methodOrConstructor) {
if (
(currentMemberType != "MethodInfo") &&
(currentMemberType != "ConstructorInfo")
)
continue;
} else if ((typeof (memberType) === "string") && (memberType != currentMemberType)) {
continue;
}
if ((typeof (name) === "string") && (name != member._descriptor.Name)) {
continue;
}
result.push(member);
}
return result;
};
JSIL.AnyValueType = JSIL.AnyType = {
__TypeId__: "any",
CheckType: function (value) {
return true;
}
};
JSIL.ApplyCollectionInitializer = function (target, values) {
for (var i = 0, l = values.length; i < l; i++)
target.Add.apply(target, values[i]);
};
JSIL.StructEquals = function Struct_Equals (lhs, rhs) {
if (lhs === rhs)
return true;
if ((rhs === null) || (rhs === undefined))
return false;
var thisType = lhs.__ThisType__;
var comparer = thisType.__Comparer__;
if (comparer === $jsilcore.FunctionNotInitialized)
comparer = thisType.__Comparer__ = JSIL.$MakeStructComparer(thisType, thisType.__PublicInterface__);
return comparer(lhs, rhs);
};
JSIL.DefaultValueInternal = function (typeObject, typePublicInterface) {
var fullName = typeObject.__FullName__;
if (fullName === "System.Char") {
return "\0";
} else if (fullName === "System.Boolean") {
return false;
} else if (typeObject.__IsReferenceType__) {
return null;
} else if (typeObject.__IsNumeric__) {
return 0;
} else if (typeObject.__IsEnum__) {
return typePublicInterface[typeObject.__ValueToName__[0]];
} else if (typeObject.__IsNullable__) {
return null;
} else {
return new typePublicInterface();
}
};
JSIL.DefaultValue = function (type) {
var typeObject, typePublicInterface;
if (!type)
JSIL.RuntimeError("No type passed into DefaultValue");
if (typeof (type.__Type__) === "object") {
typeObject = type.__Type__;
typePublicInterface = type;
} else if (typeof (type.__PublicInterface__) !== "undefined") {
typeObject = type;
typePublicInterface = type.__PublicInterface__;
}
if (typeObject && typePublicInterface) {
return JSIL.DefaultValueInternal(typeObject, typePublicInterface);
} else {
// Handle stupid special cases
if ((type === Object) || (type === Array) || (type === String))
return null;
else if (type === Number)
return 0;
JSIL.RuntimeError("Invalid type passed into DefaultValue: " + String(type));
}
};
JSIL.Array.GetElements = function (array) {
if (Object.getPrototypeOf(array) === JSIL.MultidimensionalArray.prototype)
return array._items;
else if (JSIL.IsArray(array))
return array;
else
JSIL.RuntimeError("Argument is not an array");
};
JSIL.Array.$EraseImplementations = JSIL.CreateDictionaryObject(null);
// Creating a unique implementation of Erase for every element type
// allows JITs to optimize it more aggressively by making ICs monomorphic
JSIL.Array.$GetEraseImplementation = function (elementTypeObject, elementTypePublicInterface) {
var result = JSIL.Array.$EraseImplementations[elementTypeObject.__TypeId__];
if (!result) {
var body = [
"length = length | 0;",
"startIndex = startIndex | 0;",
"",
"if (length > elements.length)",
" JSIL.RuntimeError('Length out of range');",
""
];
var isStruct = !elementTypeObject.__IsNullable__ &&
elementTypeObject.__IsStruct__;
if (elementTypeObject.__IsNativeType__) {
body.push("var defaultValue = JSIL.DefaultValueInternal(elementTypeObject, elementTypePublicInterface);");
} else if (elementTypeObject.__IsEnum__) {
body.push("var defaultValue = elementTypePublicInterface.$Cast(0);");
} else if (!isStruct) {
body.push("var defaultValue = null;");
}
body.push("");
body.push("for (var i = 0; i < length; i = (i + 1) | 0)");
if (isStruct) {
body.push(" elements[(i + startIndex) | 0] = new elementTypePublicInterface();");
} else {
body.push(" elements[(i + startIndex) | 0] = defaultValue;");
}
result = JSIL.CreateNamedFunction(
elementTypeObject.__FullName__ + "[].Erase",
["elements", "startIndex", "length"],
body.join("\n"),
{
elementTypeObject: elementTypeObject,
elementTypePublicInterface: elementTypePublicInterface
}
);
JSIL.Array.$EraseImplementations[elementTypeObject.__TypeId__] = result;
}
return result;
};
// startIndex and length are optional
JSIL.Array.Erase = function Array_Erase (array, elementType, startIndex, length) {
var elementTypeObject, elementTypePublicInterface;
if (typeof (elementType.__Type__) === "object") {
elementTypeObject = elementType.__Type__;
elementTypePublicInterface = elementType;
} else if (typeof (elementType.__PublicInterface__) !== "undefined") {
elementTypeObject = elementType;
elementTypePublicInterface = elementType.__PublicInterface__;
}
var elements = JSIL.Array.GetElements(array);
if (typeof (startIndex) !== "number")
startIndex = 0;
startIndex = startIndex | 0;
if (typeof (length) !== "number")
length = elements.length - startIndex;
length = length | 0;
var impl = JSIL.Array.$GetEraseImplementation(elementTypeObject, elementTypePublicInterface);
impl(elements, startIndex, length);
};
JSIL.Array.New = function Array_New (elementType, sizeOrInitializer) {
var elementTypeObject = null, elementTypePublicInterface = null;
if (typeof (elementType.__Type__) === "object") {
elementTypeObject = elementType.__Type__;
elementTypePublicInterface = elementType;
} else if (typeof (elementType.__PublicInterface__) !== "undefined") {
elementTypeObject = elementType;
elementTypePublicInterface = elementType.__PublicInterface__;
}
var result = null, size = 0;
var initializerIsArray = JSIL.IsArray(sizeOrInitializer);
if (initializerIsArray) {
size = sizeOrInitializer.length;
} else {
size = Number(sizeOrInitializer);
}
var typedArrayCtor = JSIL.GetTypedArrayConstructorForElementType(elementTypeObject, false);
if (typedArrayCtor) {
result = new (typedArrayCtor)(size);
} else {
result = new Array(size);
}
if (initializerIsArray) {
// If non-numeric, assume array initializer
for (var i = 0; i < sizeOrInitializer.length; i++)
result[i] = sizeOrInitializer[i];
} else if (!typedArrayCtor) {
JSIL.Array.Erase(result, elementType);
}
return result;
};
JSIL.Array.Clone = function (array) {
if (JSIL.IsTypedArray(array)) {
var ctor = Object.getPrototypeOf(array).constructor;
return new ctor(array);
} else if (Object.getPrototypeOf(array) === JSIL.MultidimensionalArray.prototype) {
return new JSIL.MultidimensionalArray(array._type, array._dimensions, array._items);
} else if (JSIL.IsArray(array)) {
return Array.prototype.slice.call(array);
} else {
JSIL.RuntimeError("Invalid array");
}
};
JSIL.Array.CopyTo = function (source, destination, destinationIndex) {
if (JSIL.IsTypedArray(destination)) {
destination.set(source, destinationIndex);
return;
}
var srcArray = JSIL.Array.GetElements(source);
var destArray = JSIL.Array.GetElements(destination);
var size = Math.min(srcArray.length, destArray.length);
for (var i = 0; i < size; i++)
destArray[i + destinationIndex] = srcArray[i];
};
JSIL.Array.ShallowCopy = function (destination, source) {
JSIL.Array.CopyTo(source, destination, 0);
};
$jsilcore.CheckDelegateType = function (value) {
if (value === null)
return false;
return (
(typeof (value) === "function") ||
(typeof (value) === "object")
) && (value.__ThisType__ === this);
};
JSIL.MakeDelegate = function (fullName, isPublic, genericArguments, methodSignature, pInvokeInfo) {
var assembly = $private;
var localName = JSIL.GetLocalName(fullName);
var callStack = null;
if (typeof (printStackTrace) === "function")
callStack = printStackTrace();
var creator = function CreateDelegate () {
var delegateType;
delegateType = JSIL.GetTypeByName("System.MulticastDelegate", $jsilcore).__Type__;
var typeObject = JSIL.$MakeTypeObject(fullName);
typeObject.__Context__ = assembly;
JSIL.SetValueProperty(typeObject, "__BaseType__", delegateType);
JSIL.SetValueProperty(typeObject, "__FullName__", fullName);
typeObject.__CallStack__ = callStack;
typeObject.__Interfaces__ = [];
typeObject.__IsDelegate__ = true;
JSIL.SetValueProperty(typeObject, "__IsReferenceType__", true);
typeObject.__AssignableTypes__ = null;
typeObject.__IsEnum__ = false;
typeObject.__IsValueType__ = false;
typeObject.__IsByRef__ = false;
typeObject.__TypeInitialized__ = false;
JSIL.FillTypeObjectGenericArguments(typeObject, genericArguments);
var staticClassObject = typeObject.__PublicInterface__ = JSIL.CreateSingletonObject(JSIL.StaticClassPrototype);
staticClassObject.__Type__ = typeObject;
staticClassObject.prototype = JSIL.CreatePrototypeObject($jsilcore.System.MulticastDelegate.prototype);
var toStringImpl = function DelegateType_ToString () {
return this.__ThisType__.toString();
};
var pinImpl = function Delegate_Pin () {
this.__pinnedPointer__ =
System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate$b1(
this.__ThisType__
)(
this
);
};
var unpinImpl = function Delegate_Unpin () {
this.__pinnedPointer__ = null;
};
var asIntPtrImpl = function Delegate_AsIntPtr () {
if (this.__pinnedPointer__)
return this.__pinnedPointer__;
else
JSIL.RuntimeErrorFormat("Delegate of type {0} is not pinned and cannot be packed/marshalled", [this.__ThisType__]);
};
JSIL.SetValueProperty(staticClassObject, "CheckType", $jsilcore.CheckDelegateType.bind(typeObject));
JSIL.SetValueProperty(staticClassObject, "New", function (object, method, methodInfoResolver) {
if ((typeof (method) === "undefined") &&
(typeof (object) === "function")
) {
method = object;
object = null;
if (method.__ThisType__ === typeObject)
return method;
else
JSIL.RuntimeError("Single delegate argument passed to Delegate.New, but types don't match");
}
if (typeof (method) !== "function") {
JSIL.RuntimeError("Non-function passed to Delegate.New");
}
if (method.__IsMembrane__)
method = method.__Unwrap__();
var resultDelegate = function Delegate_Invoke () {
return method.apply(object, arguments);
};
JSIL.SetValueProperty(resultDelegate, "__ThisType__", this.__Type__);
JSIL.SetValueProperty(resultDelegate, "toString", toStringImpl);
JSIL.SetValueProperty(resultDelegate, "__object__", object);
JSIL.SetValueProperty(resultDelegate, "__method__", method);
JSIL.SetValueProperty(resultDelegate, "__isMulticast__", false);
JSIL.SetValueProperty(resultDelegate, "Invoke", method);
JSIL.SetValueProperty(resultDelegate, "get_Method", this.__Type__.__PublicInterface__.prototype.get_Method);
JSIL.SetValueProperty(resultDelegate, "__methodInfoResolver__", methodInfoResolver);
// FIXME: Move these off the object to reduce cost of constructing delegates
JSIL.SetValueProperty(resultDelegate, "$pin", pinImpl);
JSIL.SetValueProperty(resultDelegate, "$unpin", unpinImpl);
JSIL.SetValueProperty(resultDelegate, "$asIntPtr", asIntPtrImpl);
resultDelegate.__isMethodInfoResolved__ = false;
return resultDelegate;
});
JSIL.SetTypeId(
typeObject, staticClassObject, JSIL.AssignTypeId(assembly, fullName)
);
if (typeObject.__GenericArguments__.length > 0) {
staticClassObject.Of$NoInitialize = $jsilcore.$MakeOf$NoInitialize(staticClassObject);
staticClassObject.Of = $jsilcore.$MakeOf(staticClassObject);
typeObject.__IsClosed__ = false;
typeObject.__OfCache__ = {};
} else {
typeObject.__IsClosed__ = true;
typeObject.__AssignableFromTypes__ = {};
}
JSIL.MakeCastMethods(staticClassObject, typeObject, "delegate");
if (methodSignature) {
var ib = new JSIL.InterfaceBuilder(assembly, typeObject, staticClassObject);
ib.Method({Static:false , Public:true }, "Invoke",
methodSignature,
function() {return this.__method__.apply(this, arguments);});
typeObject.__Signature__ = methodSignature;
} else {
typeObject.__Signature__ = null;
}
if (pInvokeInfo) {
typeObject.__PInvokeInfo__ = pInvokeInfo;
} else {
typeObject.__PInvokeInfo__ = null;
}
return staticClassObject;
};
JSIL.RegisterName(fullName, assembly, isPublic, creator);
};
JSIL.StringToByteArray = function (text) {
var result = JSIL.Array.New(System.Byte, text.length);
for (var i = 0, l = text.length; i < l; i++)
result[i] = text.charCodeAt(i) & 0xFF;
return result;
};
JSIL.StringToCharArray = function (text) {
var result = JSIL.Array.New(System.Char, text.length);
for (var i = 0, l = text.length; i < l; i++)
result[i] = text[i];
return result;
};
JSIL.$equalsSignature = null;
JSIL.GetEqualsSignature = function () {
if (JSIL.$equalsSignature === null)
JSIL.$equalsSignature = new JSIL.MethodSignature("System.Boolean", ["System.Object"], [], $jsilcore);
return JSIL.$equalsSignature;
}
JSIL.ObjectEqualsInstance = function (lhs, rhs, virtualCall, thisType) {
switch (typeof (lhs)) {
case "string":
case "number":
return lhs == rhs;
break;
case "object":
if (virtualCall) {
var key = JSIL.GetEqualsSignature().GetNamedKey("Object_Equals", true);
var fn = lhs[key];
if (fn)
return fn.call(lhs, rhs);
}
else {
if (thisType.__PublicInterface__.prototype.Object_Equals) {
return thisType.__PublicInterface__.prototype.Object_Equals.call(lhs, rhs);
}
}
break;
}
if (lhs === rhs)
return true;
return false;
};
JSIL.ObjectEquals = function (lhs, rhs) {
if ((lhs === null) || (rhs === null))
return lhs === rhs;
if (lhs === rhs)
return true;
switch (typeof (lhs)) {
case "string":
case "number":
return lhs == rhs;
break;
case "object":
var key = JSIL.GetEqualsSignature().GetNamedKey("Object_Equals", true);
var fn = lhs[key];
if (fn)
return fn.call(lhs, rhs);
break;
}
return false;
};
JSIL.CompareValues = function (lhs, rhs) {
if (lhs > rhs)
return 1;
else if (lhs < rhs)
return -1;
else
return 0;
};
var $nextHashCode = 0;
var $hashCodeWeakMap = null;
if (typeof (WeakMap) !== "undefined") {
$hashCodeWeakMap = new WeakMap();
JSIL.HashCodeInternal = function (obj) {
var hc = $hashCodeWeakMap.get(obj);
if (!hc) {
hc = (++$nextHashCode) | 0;
$hashCodeWeakMap.set(obj, hc);
}
return hc;
};
} else {
JSIL.HashCodeInternal = function (obj) {
var hc = obj.__HashCode__;
if (!hc)
hc = obj.__HashCode__ = (++$nextHashCode) | 0;
return hc;
};
}
JSIL.ObjectHashCode = function (obj, virtualCall, thisType) {
var type = typeof obj;
if (type === "object" || type == "string") {
if (obj.GetHashCode && virtualCall)
return (obj.GetHashCode() | 0);
if (!virtualCall && thisType.__PublicInterface__.prototype.GetHashCode)
return (thisType.__PublicInterface__.prototype.GetHashCode.call(obj) | 0);
return JSIL.HashCodeInternal(obj);
} else {
// FIXME: Not an integer. Gross.
return String(obj);
}
};
// MemberwiseClone if parameter is struct, otherwise do nothing.
JSIL.CloneParameter = function (parameterType, value) {
if (!parameterType)
JSIL.RuntimeError("Undefined parameter type");
if (
parameterType.__IsStruct__ &&
(parameterType.__IsNullable__ !== true) &&
// We have to check this because of some tricky semantic corner cases :/
(value !== null)
) {
return value.MemberwiseClone();
} else
return value;
};
JSIL.Nullable_Value = function (n) {
if (n === null)
throw new System.InvalidOperationException("Nullable has no value");
else
return n;
};
JSIL.Nullable_ValueOrDefault = function (n, defaultValue) {
if (n === null)
return defaultValue;
else
return n;
};
JSIL.Nullable_Cast = function (n, targetType) {
if (n === null)
return null;
else
return targetType.$Cast(n);
};
JSIL.GetMemberAttributes = function (memberInfo, inherit, attributeType, result) {
var tType = $jsilcore.System.Type;
var memberType = memberInfo.GetType().get_FullName();
if (inherit) {
if (!result)
result = [];
if (memberType === "System.RuntimeType") {
var currentType = memberInfo;
while (currentType && currentType.GetType) {
JSIL.GetMemberAttributes(currentType, false, attributeType, result);
currentType = currentType.__BaseType__;
}
return result;
} else if (memberType === "System.Reflection.MethodInfo" && memberInfo._descriptor.Virtual) {
var currentType = memberInfo.get_DeclaringType();
while (currentType && currentType.GetType) {
var foundMethod = JSIL.GetMethodInfo(currentType.__PublicInterface__, memberInfo.get_Name(), memberInfo._data.signature, false, null);
if (foundMethod != null) {
JSIL.GetMemberAttributes(foundMethod, false, attributeType, result);
}
currentType = currentType.__BaseType__;
}
}
}
var attributes = memberInfo.__CachedAttributes__;
if (!attributes) {
attributes = memberInfo.__CachedAttributes__ = [];
var attributeRecords = memberInfo.__Attributes__;
if (attributeRecords) {
for (var i = 0, l = attributeRecords.length; i < l; i++) {
var record = attributeRecords[i];
var recordType = record.GetType();
var instance = record.Construct();
attributes.push(instance);
}
}
}
if (!result)
result = [];
for (var i = 0, l = attributes.length; i < l; i++) {
var attribute = attributes[i];
if (attributeType && !tType.op_Equality(attributeType, attribute.GetType()))
continue;
result.push(attributes[i]);
}
return result;
};
var $blobBuilderInfo = {
initialized: false,
retainedBlobs: []
};
JSIL.InitBlobBuilder = function () {
if ($blobBuilderInfo.initialized)
return;
var blobBuilder = window.WebKitBlobBuilder || window.mozBlobBuilder || window.MSBlobBuilder || window.BlobBuilder;
$blobBuilderInfo.hasObjectURL = (typeof (window.URL) !== "undefined") && (typeof (window.URL.createObjectURL) === "function");
$blobBuilderInfo.hasBlobBuilder = Boolean(blobBuilder);
$blobBuilderInfo.blobBuilder = blobBuilder;
$blobBuilderInfo.hasBlobCtor = false;
$blobBuilderInfo.applyIEHack = navigator.userAgent.indexOf("Trident/") >= 0;
try {
var blob = new Blob();
$blobBuilderInfo.hasBlobCtor = Boolean(blob);
} catch (exc) {
}
if (navigator.userAgent.indexOf("Firefox/14.") >= 0) {
JSIL.Host.logWriteLine("Your browser is outdated and has a serious bug. Please update to a newer version.");
$blobBuilderInfo.hasBlobBuilder = false;
$blobBuilderInfo.hasBlobCtor = false;
}
}
JSIL.GetObjectURLForBytes = function (bytes, mimeType) {
JSIL.InitBlobBuilder();
if (!$blobBuilderInfo.hasObjectURL)
JSIL.RuntimeError("Object URLs not available");
else if (!("Uint8Array" in window))
JSIL.RuntimeError("Typed arrays not available");
var blob = null;
if (Object.getPrototypeOf(bytes) !== Uint8Array.prototype)
JSIL.RuntimeError("bytes must be a Uint8Array");
try {
if ($blobBuilderInfo.hasBlobCtor) {
blob = new Blob([bytes], { type: mimeType });
}
} catch (exc) {
}
if (!blob) {
try {
if ($blobBuilderInfo.hasBlobBuilder) {
var bb = new $blobBuilderInfo.blobBuilder();
bb.append(bytes.buffer);
blob = bb.getBlob(mimeType);
}
} catch (exc) {
}
}
if (!blob)
JSIL.RuntimeError("Blob API broken or not available");
if ($blobBuilderInfo.applyIEHack)
$blobBuilderInfo.retainedBlobs.push(blob);
return window.URL.createObjectURL(blob);
}
JSIL.BinarySearch = function (T, array, start, count, value, comparer) {
if (!Array.isArray(array))
throw new System.Exception("An array must be provided");
if (start < 0)
throw new System.ArgumentOutOfRangeException("start");
else if (start >= array.length)
throw new System.ArgumentOutOfRangeException("start");
else if (count < 0)
throw new System.ArgumentOutOfRangeException("count");
else if ((start + count) > array.length)
throw new System.ArgumentOutOfRangeException("count");
if (comparer === null)
comparer = System.Collections.Generic.Comparer$b1.Of(T).get_Default();
var low = start, high = start + count - 1, pivot;
while (low <= high) {
pivot = (low + (high - low) / 2) | 0;
var order = comparer.Compare(array[pivot], value);
if (order === 0)
return pivot;
else if (order < 0)
low = pivot + 1;
else
high = pivot - 1;
}
return ~low;
};
JSIL.ResolveGenericExternalMethods = function (publicInterface, typeObject) {
var externalMethods = typeObject.__ExternalMethods__;
if (!externalMethods)
return;
var result = typeObject.__ExternalMethods__ = new Array(externalMethods.length);
for (var i = 0, l = result.length; i < l; i++)
result[i] = JSIL.$ResolveGenericMethodSignature(typeObject, externalMethods[i], publicInterface) || externalMethods[i];
};
JSIL.FreezeImmutableObject = function (object) {
// Object.freeze and Object.seal make reads *slower* in modern versions of Chrome and older versions of Firefox.
if (jsilConfig.enableFreezeAndSeal === true)
Object.freeze(object);
};
JSIL.GetTypedArrayConstructorForElementType = function (typeObject, byteFallback) {
if (!typeObject)
JSIL.RuntimeError("typeObject was null");
var result = typeObject.__TypedArray__ || null;
if (!result && byteFallback) {
if (typeObject.__IsStruct__)
result = $jsilcore.System.Byte.__TypedArray__ || null;
}
return result;
};
JSIL.ResolveGenericMemberSignatures = function (publicInterface, typeObject) {
var members = typeObject.__Members__;
if (!JSIL.IsArray(members))
return;
members = typeObject.__Members__ = Array.prototype.slice.call(members);
var resolveContext = typeObject.__IsStatic__ ? publicInterface : publicInterface.prototype;
for (var i = 0, l = members.length; i < l; i++) {
var member = members[i];
var descriptor = member.descriptor;
var data = member.data;
if (!data)
continue;
var signature = data.signature;
if (!signature)
continue;
var resolvedSignature = JSIL.$ResolveGenericMethodSignature(
typeObject, signature, resolveContext
);
if (!resolvedSignature)
continue;
var newData = JSIL.CreateDictionaryObject(data);
if (!newData.genericSignature)
newData.genericSignature = signature;
newData.signature = resolvedSignature;
var newMember = new JSIL.MemberRecord(member.type, member.descriptor, newData, member.attributes, member.overrides);
members[i] = newMember;
}
};
JSIL.TypeReferenceToName = function (typeReference) {
var result = null;
if (
typeof (typeReference) === "string"
) {
return typeReference;
} else if (
typeof (typeReference) === "object"
) {
if (typeReference === null)
JSIL.RuntimeError("Null type reference");
if (Object.getPrototypeOf(typeReference) === JSIL.TypeRef.prototype)
return typeReference.toName();
}
if (typeof (typeReference.__Type__) === "object") {
return typeReference.__Type__.toString();
} else {
return typeReference.toString();
}
};
JSIL.FillTypeObjectGenericArguments = function (typeObject, argumentNames) {
var names = [];
var variances = [];
if (argumentNames) {
if (!JSIL.IsArray(argumentNames))
JSIL.RuntimeError("Generic argument names must be undefined or an array");
for (var i = 0, l = argumentNames.length; i < l; i++) {
var variance = {
"in": false,
"out": false
};
var argumentName = argumentNames[i];
var tokens = argumentName.trim().split(" ");
for (var j = 0; j < tokens.length - 1; j++) {
switch (tokens[j]) {
case "in":
variance.in = true;
break;
case "out":
variance.out = true;
break;
default:
JSIL.RuntimeError("Invalid generic argument modifier: " + tokens[j]);
}
}
variances.push(variance);
names.push(tokens[tokens.length - 1].trim());
}
}
typeObject.__GenericArguments__ = names;
typeObject.__GenericArgumentVariance__ = variances;
};
JSIL.GetTypeAndBases = function (typeObject) {
// FIXME: Memoize the result of this function?
var result = [typeObject];
JSIL.$EnumBasesOfType(typeObject, result);
return result;
};
JSIL.$EnumBasesOfType = function (typeObject, resultList) {
var currentType = typeObject;
while (currentType) {
var baseRef = currentType.__BaseType__;
if (!baseRef)
break;
var base = JSIL.ResolveTypeReference(baseRef, currentType.__Context__)[1];
if (base)
resultList.push(base);
currentType = base;
}
};
JSIL.GetInterfacesImplementedByType = function (typeObject, walkInterfaceBases, allowDuplicates, includeDistance) {
// FIXME: Memoize the result of this function?
if (arguments.length < 3)
JSIL.RuntimeError("3 arguments expected");
var typeAndBases = JSIL.GetTypeAndBases(typeObject);
var result = [];
var distanceList = [];
// Walk in reverse to match the behavior of JSIL.Internal.TypeInfo.AllInterfacesRecursive
typeAndBases.reverse();
for (var i = 0, l = typeAndBases.length; i < l; i++) {
var typeObject = typeAndBases[i];
var distance = (typeAndBases.length - i - 1);
JSIL.$EnumInterfacesImplementedByTypeExcludingBases(
typeObject, result, distanceList, walkInterfaceBases, allowDuplicates, distance
);
}
if (includeDistance)
return {
interfaces: result,
distances: distanceList
};
else
return result;
};
JSIL.$EnumInterfacesImplementedByTypeExcludingBases = function (typeObject, resultList, distanceList, walkInterfaceBases, allowDuplicates, distance) {
if (arguments.length !== 6)
JSIL.RuntimeError("6 arguments expected");
var interfaces = typeObject.__Interfaces__;
var toEnumerate = [];
if (interfaces && interfaces.length) {
for (var i = 0, l = interfaces.length; i < l; i++) {
var ifaceRef = interfaces[i];
var iface = JSIL.ResolveTypeReference(ifaceRef, typeObject.__Context__)[1];
if (!iface)
continue;
var alreadyAdded = resultList.indexOf(iface) >= 0;
if (!alreadyAdded || allowDuplicates) {
resultList.push(iface);
if (distanceList)
distanceList.push(distance);
}
if (!alreadyAdded && walkInterfaceBases)
toEnumerate.push(iface);
}
}
for (var i = 0, l = toEnumerate.length; i < l; i++) {
var iface = toEnumerate[i];
JSIL.$EnumInterfacesImplementedByTypeExcludingBases(iface, resultList, distanceList, walkInterfaceBases, allowDuplicates, distance + 1);
}
};
JSIL.$FindMatchingInterfacesThroughVariance = function (expectedInterfaceObject, actualTypeObject, variantParameters) {
// FIXME: Memoize the result of this function?
var result = [];
var trace = 0;
var record = function (distance, iface) {
this.distance = distance;
this.interface = iface;
};
record.prototype.toString = function () {
return "<" + this.interface.toString() + " (distance " + this.distance + ")>";
};
// We have to scan exhaustively through all the interfaces implemented by this type
// We turn on distance tracking, so the interface records are [distance, interface] instead of interface objects.
var obj = JSIL.GetInterfacesImplementedByType(actualTypeObject, true, false, true);
var interfaces = obj.interfaces;
var distances = obj.distances;
if (trace >= 2)
System.Console.WriteLine("Type {0} implements {1} interface(s): [ {2} ]", actualTypeObject.__FullName__, interfaces.length, interfaces.join(", "));
var openExpected = expectedInterfaceObject.__OpenType__;
if (!openExpected || !openExpected.IsInterface)
JSIL.RuntimeError("Expected interface object must be a closed generic interface type");
// Scan for interfaces that could potentially match through variance
for (var i = 0, l = interfaces.length; i < l; i++) {
var iface = interfaces[i];
var distance = distances[i];
var openIface = iface.__OpenType__;
// Variance only applies to closed generic interface types... I think.
if (!openIface || !openIface.IsInterface)
continue;
if (openIface !== openExpected)
continue;
var ifaceResult = true;
check_parameters:
for (var j = 0; j < variantParameters.length; j++) {
var vp = variantParameters[j];
var lhs = expectedInterfaceObject.__GenericArgumentValues__[vp.index];
var rhs = iface.__GenericArgumentValues__[vp.index];
var parameterResult = true;
var foundIndex = -1;
if (vp.in) {
if (rhs.IsInterface) {
var interfacesLhs = JSIL.GetInterfacesImplementedByType(lhs, true, true);
foundIndex = interfacesLhs.indexOf(rhs);
} else {
var typeAndBasesLhs = JSIL.GetTypeAndBases(lhs);
foundIndex = typeAndBasesLhs.indexOf(rhs);
}
if (foundIndex < 0)
ifaceResult = parameterResult = false;
}
if (vp.out) {
if (lhs.IsInterface) {
var interfacesRhs = JSIL.GetInterfacesImplementedByType(rhs, true, true);
foundIndex = interfacesRhs.indexOf(lhs);
} else {
var typeAndBasesRhs = JSIL.GetTypeAndBases(rhs);
foundIndex = typeAndBasesRhs.indexOf(lhs);
}
if (foundIndex < 0)
ifaceResult = parameterResult = false;
}
if (trace >= 1)
System.Console.WriteLine(
"Variance check {4}{5}{0}: {1} <-> {2} === {3}",
vp.name, lhs, rhs, parameterResult,
vp.in ? "in " : "", vp.out ? "out " : ""
);
}
if (ifaceResult)
result.push(new record(distance, iface));
}
return result;
};
JSIL.CheckInterfaceVariantEquality = function (expectedInterfaceObject, actualTypeObject, variantParameters) {
// FIXME: Memoize the result of this function?
var matchingInterfaces = JSIL.$FindMatchingInterfacesThroughVariance(expectedInterfaceObject, actualTypeObject, variantParameters);
return matchingInterfaces.length > 0;
};
JSIL.$FindVariantGenericArguments = function (typeObject) {
var result = [];
var argumentVariances = typeObject.__GenericArgumentVariance__;
if (!argumentVariances)
return result;
for (var i = 0, l = argumentVariances.length; i < l; i++) {
var variance = argumentVariances[i];
if (variance.in || variance.out) {
var vp = JSIL.CreateDictionaryObject(variance);
vp.name = typeObject.__GenericArguments__[i];
vp.index = i;
result.push(vp);
}
}
return result;
};
JSIL.WrapCastMethodsForInterfaceVariance = function (typeObject, isFunction, asFunction) {
var trace = false;
var result = {
"is": isFunction,
"as": asFunction
};
var variantParameters = JSIL.$FindVariantGenericArguments(typeObject);
if (variantParameters.length === 0) {
if (trace)
System.Console.WriteLine("None of interface {0}'s parameters are variant", typeObject.__FullName__);
return result;
}
result.is = function Is_VariantInterface (value) {
var result = isFunction(value);
if (trace)
System.Console.WriteLine("({0} is {1}) == {2}", value, typeObject.__FullName__, result);
if (!result)
result = JSIL.CheckInterfaceVariantEquality(typeObject, JSIL.GetType(value), variantParameters);
if (trace)
System.Console.WriteLine("({0} is {1}) == {2}", value, typeObject.__FullName__, result);
return result;
};
result.as = function As_VariantInterface (value) {
var result = asFunction(value);
if (trace && !result)
System.Console.WriteLine("{0} as {1} failed", value, typeObject.__FullName__);
if (!result) {
if (JSIL.CheckInterfaceVariantEquality(typeObject, JSIL.GetType(value), variantParameters))
result = value;
if (trace)
System.Console.WriteLine("{0} as {1} variantly {2}", value, typeObject.__FullName__, result ? "succeeded" : "failed");
}
return result;
};
return result;
};
JSIL.$GenerateVariantInvocationCandidates = function (interfaceObject, signature, qualifiedMethodName, variantGenericArguments, thisReferenceType) {
var trace = false;
var matchingInterfaces = JSIL.$FindMatchingInterfacesThroughVariance(interfaceObject, thisReferenceType, variantGenericArguments);
if (trace)
System.Console.WriteLine("Matching interfaces in candidate generator: [ {0} ]", matchingInterfaces.join(", "));
if (!matchingInterfaces.length)
return null;
else if (!signature.openSignature) {
// FIXME: Is this right?
return null;
}
var result = [];
// Sort the interfaces by distance, in increasing order.
// This is necessary for the implementation-selection behavior used by the CLR in cases where
// there are multiple candidates due to variance. See issue #445.
matchingInterfaces.sort(function (lhs, rhs) {
return JSIL.CompareValues(lhs.distance, rhs.distance);
});
generate_candidates:
for (var i = 0, l = matchingInterfaces.length; i < l; i++) {
var record = matchingInterfaces[i];
// FIXME: This is incredibly expensive.
var variantSignature = JSIL.$ResolveGenericMethodSignature(
record.interface, signature.openSignature, record.interface.__PublicInterface__
);
var candidate = variantSignature.GetNamedKey(qualifiedMethodName, true);
if (trace)
System.Console.WriteLine("Candidate (distance {0}): {1}", record.distance, candidate);
result.push(candidate);
}
return result;
};
JSIL.$GetStringEnumerator = function () {
return JSIL.GetEnumerator(this, $jsilcore.System.Char.__Type__, true);
};
$jsilcore.$GetArrayEnumeratorImplementations = {};
JSIL.$GetEnumeratorFallback = function (interfaceTypeObject, signature, thisReference) {
if (typeof (thisReference) === "string") {
return JSIL.$GetStringEnumerator;
} else if (JSIL.IsArray(thisReference)) {
var enumeratorTypeArgument = $jsilcore.System.Object.__Type__;
if (interfaceTypeObject.IsGenericType) {
enumeratorTypeArgument = interfaceTypeObject.__GenericArgumentValues__[0];
}
var key = enumeratorTypeArgument.__TypeId__;
var result = $jsilcore.$GetArrayEnumeratorImplementations[key];
if (!result) {
$jsilcore.$GetArrayEnumeratorImplementations[key] = result = function () {
return JSIL.GetEnumerator(this, enumeratorTypeArgument, true);
};
}
return result;
} else {
JSIL.RuntimeError("Object of type '" + JSIL.GetType(thisReference) + "' has no implementation of " + signature.toString("GetEnumerator"));
}
};
// FIXME: This can probably be replaced with compiler and/or runtime intelltypeigence
// to create interface overlays for strings, just like arrays.
JSIL.$PickFallbackMethodForInterfaceMethod = function (interfaceObject, methodName, signature) {
// HACK: Ensures that you can enumerate the chars of a JS string or array in cases where they lack an overlay.
if (
(
(interfaceObject.__FullName__ === "System.Collections.Generic.IEnumerable`1") ||
(interfaceObject.__FullName__ === "System.Collections.IEnumerable")
) && (methodName === "GetEnumerator")
) {
return JSIL.$GetEnumeratorFallback;
}
return null;
};
JSIL.$DoTypesMatch = function (expected, type) {
if (expected === null)
return (type === null);
if (expected === type)
return true;
if (expected.__FullName__ === "System.Array")
return type.__IsArray__;
if (expected instanceof JSIL.PositionalGenericParameter && type instanceof JSIL.PositionalGenericParameter && expected.index === type.index)
return true;
return false;
}
JSIL.$FilterMethodsByArgumentTypes = function (methods, argumentTypes, returnType) {
var trace = false;
var l = methods.length;
for (var i = 0; i < l; i++) {
var remove = false;
var method = methods[i];
var parameterInfos = $jsilcore.$MethodGetParameters(method);
if (parameterInfos.length !== argumentTypes.length) {
if (trace)
console.log("Dropping because wrong argcount", argumentTypes.length, parameterInfos.length);
remove = true;
} else {
for (var j = 0; j < argumentTypes.length; j++) {
var argumentType = argumentTypes[j];
var argumentTypeB = $jsilcore.$ParameterInfoGetParameterType(parameterInfos[j]);
if (!JSIL.$DoTypesMatch(argumentType, argumentTypeB)) {
if (trace)
console.log("Dropping because arg mismatch", argumentType.__FullName__, argumentTypeB.__FullName__);
remove = true;
break;
}
}
}
if (typeof (returnType) !== "undefined") {
// FIXME: Do a more complete assignability check
if (!JSIL.$DoTypesMatch(returnType, $jsilcore.$MethodGetReturnType(method))) {
if (trace)
console.log("Dropping because wrong return type", returnType.__FullName__, method.get_ReturnType().__FullName__);
remove = true;
}
}
if (remove) {
methods[i] = methods[l - 1];
l -= 1;
i -= 1;
}
}
methods.length = l;
};
JSIL.$GetMethodImplementation = function (method, target) {
var isStatic = method._descriptor.Static;
var isInterface = method._typeObject.IsInterface;
var key = null;
if (isInterface)
key = method._descriptor.EscapedName;
else if (method._data.signature)
key = method._data.signature.GetNamedKey(method._descriptor.EscapedName, true);
else
key = method._data.mangledName || method._descriptor.EscapedName;
var genericArgumentValues = method._data.signature.genericArgumentValues;
var publicInterface = method._typeObject.__PublicInterface__;
var context = isStatic || isInterface
? publicInterface
: publicInterface.prototype;
var result = context[key] || null;
if (isInterface) {
if (!result.signature.IsClosed)
JSIL.RuntimeError("Generic method is not closed");
}
// 1. Generic
if (genericArgumentValues && genericArgumentValues.length) {
// 1.1 Generic static
if (isStatic) {
// Return an invoker that concats generic arguments and arglist and invokes
// static generic method implementation directly.
return function () {
var fullArgumentList = genericArgumentValues.concat(Array.prototype.slice.call(arguments));
return result.apply(
publicInterface, fullArgumentList
);
};
// 1.2 Generic instance (interface)
} else if (result instanceof JSIL.InterfaceMethod) {
// Return an invoker that specifies the generic arguments and passes in rest
return function () {
return result.Call.apply(result,
[this, genericArgumentValues].concat(Array.prototype.slice.call(arguments))
);
};
// 1.3 Generic instance (non-interface)
} else {
// Return an invoker that concats generic arguments and arglist and invokes
// generic method implementation directly.
return function () {
var fullArgumentList = genericArgumentValues.concat(Array.prototype.slice.call(arguments));
return result.apply(
this, fullArgumentList
);
};
}
// 2. Non-generic
// 2.1 Non-generic instance (interface)
} else if (result instanceof JSIL.InterfaceMethod) {
// Wrap the interface method invoker since it expects a generic arguments parameter.
return function (methodArgs) {
return result.Call(this, null, methodArgs);
};
}
if (!result) {
debugger;
}
// 2.2 Non-generic instance (non-interface)
// 2.3 Non-generic static
return result;
};
JSIL.$FindMethodBodyInTypeChain = function (typeObject, isStatic, key, recursive) {
var typeChain = [];
var currentType = typeObject;
while (currentType) {
if (currentType.__PublicInterface__)
typeChain.push(currentType.__PublicInterface__);
if (currentType.__OpenType__ && currentType.__OpenType__.__PublicInterface__)
typeChain.push(currentType.__OpenType__.__PublicInterface__);
if (recursive)
currentType = currentType.__BaseType__;
else
break;
}
for (var i = 0, l = typeChain.length; i < l; i++) {
currentType = typeChain[i];
var target = isStatic ? currentType : currentType.prototype;
var method = target[key];
if (typeof (method) === "function")
return method;
}
return null;
};
JSIL.$IgnoredPrototypeMembers = [
];
JSIL.$IgnoredPublicInterfaceMembers = [
"__Type__", "__TypeId__", "__ThisType__", "__TypeInitialized__", "__IsClosed__", "prototype",
"Of", "toString", "__FullName__", "__OfCache__", "Of$NoInitialize",
"GetType", "__ReflectionCache__", "__Members__", "__ThisTypeId__",
"__RanCctors__", "__RanFieldInitializers__", "__PreInitMembrane__",
"__FieldList__", "__Comparer__", "__Marshaller__", "__Unmarshaller__",
"__UnmarshalConstructor__", "__ElementProxyConstructor__", "__IsNativeType__"
];
JSIL.$CopyMembersIndirect = function (target, source, ignoredNames, recursive) {
if (!source)
JSIL.RuntimeError("No source provided for copy");
if (source.__ThisType__ && (source.__ThisType__.__FullName__.indexOf("ArrayEnumerator") >= 0)) {
// debugger;
}
// FIXME: for ( in ) is deoptimized in V8. Maybe use Object.keys(), or type metadata?
for (var k in source) {
if (ignoredNames.indexOf(k) !== -1)
continue;
if (!recursive && !source.hasOwnProperty(k))
continue;
if (target.hasOwnProperty(k))
continue;
JSIL.MakeIndirectProperty(target, k, source);
}
};
JSIL.$CopyInterfaceMethods = function (interfaceList, target) {
var imProto = JSIL.InterfaceMethod.prototype;
var makeGetter = function (src, key) {
return function () {
return src[key];
};
};
for (var i = 0, l = interfaceList.length; i < l; i++) {
var ifaceRef = interfaceList[i];
var iface = JSIL.ResolveTypeReference(ifaceRef)[0];
for (var k in iface) {
if (!Object.prototype.hasOwnProperty.call(iface, k))
continue;
if (Object.prototype.hasOwnProperty.call(target, k))
continue;
JSIL.SetLazyValueProperty(target, k, makeGetter(iface, k));
}
}
};
JSIL.SetEntryPoint = function (assembly, typeRef, methodName, methodSignature) {
if (JSIL.$EntryPoints[assembly.__AssemblyId__])
JSIL.RuntimeError("Assembly already has an entry point");
JSIL.$EntryPoints[assembly.__AssemblyId__] =
[assembly, typeRef, methodName, methodSignature];
};
JSIL.GetEntryPoint = function (assembly) {
var entryPoint = JSIL.$EntryPoints[assembly.__AssemblyId__];
if (!entryPoint)
return null;
var entryTypePublicInterface = JSIL.ResolveTypeReference(entryPoint[1])[0];
var methodName = entryPoint[2];
var methodSignature = entryPoint[3];
return {
thisReference: entryTypePublicInterface,
method: methodSignature.LookupMethod(entryTypePublicInterface, methodName)
};
};
JSIL.InvokeEntryPoint = function (assembly, args) {
var dict = JSIL.GetEntryPoint(assembly);
if (!dict)
JSIL.RuntimeError("Assembly has no entry point");
if (!args)
args = [];
return dict.method.apply(dict.thisReference, args);
};
JSIL.ThrowNullReferenceException = function () {
throw new System.NullReferenceException();
};
JSIL.RuntimeError = function (text) {
throw new Error(text);
};
JSIL.RuntimeErrorFormat = function (format, values) {
var text = JSIL.$FormatStringImpl(format, values);
throw new Error(text);
};
JSIL.WarningFormat = function (format, values) {
var text = JSIL.$FormatStringImpl(format, values);
JSIL.Host.warning(text);
};
JSIL.ValidateArgumentTypes = function (types) {
for (var i = 0, l = types.length; i < l; i++) {
var item = types[i];
if (
(typeof (item) === "string") ||
(typeof (item) === "number") ||
(typeof (item) === "undefined") ||
(item === null)
) {
JSIL.RuntimeError("Argument type list must only contain type objects: " + JSON.stringify(item));
}
}
};
JSIL.GetMethodInfo = function(typeObject, name, signature, isStatic, methodGenericParameters){
var methods = JSIL.GetMembersInternal(
typeObject.__Type__, $jsilcore.BindingFlags.$Flags("DeclaredOnly", "Public", "NonPublic", isStatic ? "Static" : "Instance"), "$AllMethods", name
);
for (var i = 0, l = methods.length; i < l; i++) {
var method = methods[i];
if (method._data.signature.Hash == signature.Hash){
if (JSIL.IsArray(methodGenericParameters)) {
var genericParameterTypes = [];
for (var i = 0, l = methodGenericParameters.length; i < l; i++) {
genericParameterTypes.push(methodGenericParameters[i].get().__Type__);
}
return method.MakeGenericMethod(genericParameterTypes);
}
return method;
}
}
return null;
};
JSIL.GetFieldInfo = function(typeObject, name, isStatic){
var fields = JSIL.GetMembersInternal(
typeObject.__Type__, $jsilcore.BindingFlags.$Flags("DeclaredOnly", "Public", "NonPublic", isStatic ? "Static" : "Instance"), "FieldInfo", name
);
if (fields.length == 1) {
return fields[0];
}
return null;
};
// index alignment valueFormat escape
JSIL.$FormatRegex = new RegExp("{([0-9]*)(?:,([-0-9]*))?(?::([^}]*))?}|{{|}}|{|}", "g");
JSIL.$FormatStringImpl = function (format, values) {
if ((arguments.length !== 2) || !JSIL.IsArray(values))
JSIL.RuntimeError("JSIL.$FormatStringImpl expects (formatString, [value0, value1, ...])");
var match = null;
var matcher = function (match, index, alignment, valueFormat, offset, str) {
if (match === "{{")
return "{";
else if (match === "}}")
return "}";
else if ((match === "{") || (match === "}"))
throw new System.FormatException("Input string was not in a correct format.");
index = parseInt(index);
var value = values[index];
if (alignment || valueFormat) {
return JSIL.NumberToFormattedString(value, alignment, valueFormat);
} else {
if (typeof (value) === "boolean") {
if (value)
return "True";
else
return "False";
} else if (value === null) {
return "";
} else {
return String(value);
}
}
};
return format.replace(JSIL.$FormatRegex, matcher);
};
JSIL.Array.IndexOf = function (array, startIndex, count, value) {
for (var i = startIndex, l = startIndex + count; i < l; i++) {
if (JSIL.ObjectEquals(array[i], value))
return i;
}
return -1;
}; |
Ember.mixin(Array.prototype, {
sum: function() {
return this.reduce(function(sum, x) { return sum+x; }, 0);
},
isEqual: function(ary) {
if (!ary) return false ;
if (ary == this) return true;
var loc = ary.get('length') ;
if (loc != this.get('length')) return false ;
while(--loc >= 0) {
if (!Ember.isEqual(ary.objectAt(loc), this.objectAt(loc))) return false ;
}
return true ;
},
max: function() {
return Math.max.apply(Math, this);
},
min: function() {
return Math.min.apply(Math, this);
},
flatten: function() {
return this.reduce(function(a, b) { return a.concat(b); }, []);
}
});
|
import React from "react";
import { Link } from "react-router-dom";
import { Sticky, StickyContainer } from "../src/";
export class Navbar extends React.Component {
render() {
return (
<div className="navbar">
<ul>
<li className="nav-link">
<Link to="/basic">Basic</Link>
</li>
<li className="nav-link">
<Link to="/relative">Relative</Link>
</li>
<li className="nav-link">
<Link to="/stacked">Stacked</Link>
</li>
</ul>
</div>
);
}
}
|
buildEmailTemplate = function (htmlContent) {
var juice = Meteor.require('juice');
var emailProperties = {
headerColor: getSetting('headerColor'),
buttonColor: getSetting('buttonColor'),
siteName: getSetting('title'),
tagline: getSetting('tagline'),
siteUrl: getSiteUrl(),
body: htmlContent,
unsubscribe: '',
accountLink: getSiteUrl()+'account',
footer: getSetting('emailFooter'),
logoUrl: getSetting('logoUrl'),
logoHeight: getSetting('logoHeight'),
logoWidth: getSetting('logoWidth')
}
var emailHTML = Handlebars.templates[getTemplate('emailWrapper')](emailProperties);
var inlinedHTML = Async.runSync(function(done) {
juice.juiceContent(emailHTML, {
url: getSiteUrl(),
removeStyleTags: false
}, function (error, result) {
done(null, result);
});
}).result;
var doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
return doctype+inlinedHTML;
}
sendEmail = function(to, subject, html, text){
// TODO: limit who can send emails
// TODO: fix this error: Error: getaddrinfo ENOTFOUND
var from = getSetting('defaultEmail', 'noreply@example.com');
var siteName = getSetting('title');
var subject = '['+siteName+'] '+subject;
if (typeof text == 'undefined'){
// Auto-generate text version if it doesn't exist. Has bugs, but should be good enough.
var htmlToText = Meteor.require('html-to-text');
var text = htmlToText.fromString(html, {
wordwrap: 130
});
}
console.log('//////// sending email…');
console.log('from: '+from);
console.log('to: '+to);
console.log('subject: '+subject);
// console.log('html: '+html);
// console.log('text: '+text);
Email.send({
from: from,
to: to,
subject: subject,
text: text,
html: html
});
};
buildAndSendEmail = function (to, subject, template, properties) {
var html = buildEmailTemplate(Handlebars.templates[getTemplate(template)](properties));
sendEmail (to, subject, buildEmailTemplate(html));
} |
new Test.Unit.Runner({
testNumberTween: function(){ with(this) {
assertEqual(0, (0).tween(1, 0));
assertEqual(.5, (0).tween(1, .5));
assertEqual(1, (0).tween(1, 1));
assertEqual(25, (20).tween(30, .5));
assertEqual(50, (100).tween(0, .5));
assertEqual(33.33, (100).tween(0, 2/3).toFixed(2));
assertEqual(66.67, (100).tween(0, 1/3).toFixed(2));
assertEqual(Infinity, (0).tween(Infinity, 1));
assertEqual(Infinity, (0).tween(Infinity, 0.000001));
assert(isNaN((0).tween(Infinity, 0)));
assert(isNaN(NaN, (0).tween(NaN, 0)));
assert(isNaN(NaN, (NaN).tween(NaN, 0)));
}},
testObjectPropertize: function(){ with(this) {
var propertizeTransitions = function(prop) {
return Object.propertize(prop, S2.FX.Transitions);
};
assertEqual(propertizeTransitions('sinusoidal'), S2.FX.Transitions.sinusoidal);
assertEqual(propertizeTransitions(S2.FX.Transitions.sinusoidal), S2.FX.Transitions.sinusoidal);
}},
testFunctionOptionize: function(){ with(this) {
var o = {a:1},
optionize = (function(a,b,options) {
return options;
}).optionize();
// options set to last object
assertEqual(o, optionize(o));
assertEqual(o, optionize(1,o));
assertEqual(o, optionize(1,2,o));
// unless the argument is already filled in
assertEqual(3, optionize(1,2,3,o));
}}
});
|
if (typeof module === "object" && typeof require === "function") {
var assert = require("assert");
var buster = {
util: require("buster-util"),
assertions: require("../lib/buster-assertions")
};
}
(function () {
var create = function (obj) {
function F() {}
F.prototype = obj;
return new F();
};
var ba = buster.assertions;
var expect = ba.expect;
expect();
buster.util.testCase("IsArgumentsTest", {
"should recognize real arguments object": function () {
assert.ok(ba.isArguments(arguments));
},
"should reject primitive": function () {
assert.ok(!ba.isArguments(42));
},
"should reject object without length": function () {
assert.ok(!ba.isArguments({}));
},
"should reject array": function () {
assert.ok(!ba.isArguments([]));
}
});
buster.util.testCase("KeysTest", {
"should return keys of object": function () {
var obj = { a: 1, b: 2, c: 3 };
assert.equal(ba.keys(obj).sort().join(""), "abc");
},
"should exclude inherited properties": function () {
var obj = { a: 1, b: 2, c: 3 };
var obj2 = create(obj);
obj2.d = 4;
obj2.e = 5;
assert.deepEqual(ba.keys(obj2).sort().join(""), "de");
}
});
buster.util.testCase("AddAssertionTest", {
"should add expectation if expect property is set": function () {
ba.add("isFoo", {
assert: function (actual) {
return actual == "foo";
},
assertMessage: "Expected ${1} to be foo!",
refuteMessage: "Expected not to be foo!",
expectation: "toBeFoo"
});
expect("foo").toBeFoo();
}
});
}());
|
angular.module('app.EventFactory', [])
.factory('EventFactory', eventFactory);
function eventFactory($http, $rootScope, apiUrl) {
var services = {};
services.acceptEvent = function(eventId, userId, username, acceptedLat, acceptedLong){
return $http({
method: 'POST',
url: apiUrl + '/acceptEvent/' + eventId,
data: {
userId: userId,
username: username,
acceptedLat: acceptedLat,
acceptedLong: acceptedLong
}
})
}
services.lockEvent = function (eventId){
return $http.put(apiUrl + '/lockEvent/' + eventId)
}
services.getUberData = function (userLat, userLong, locationLat, locationLong) {
return $http({
method: 'POST',
url: apiUrl + '/uber',
data: {
userLat: userLat,
userLong: userLong,
locationLat: locationLat,
locationLong: locationLong
}
})
}
return services;
}
|
import $ from 'jquery';
require('./style/main.scss');
import * as utils from './../components/utils/utils.js';
import bootstrap from './bootstrap.js';
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-ar.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-de.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-es.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-fr.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-nl.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-en-GB.js');
$.widget.bridge('uitooltip', $.fn.tooltip);
//window.btn = $.fn.button.noConflict(); // reverts $.fn.button to jqueryui btn
//$.fn.btn = window.btn; // assigns bootstrap button functionality to $.fn.btn
let ProductionApplication = {
bootstrap, utils
};
if (typeof window !== 'undefined') {
window.ProductionApplication = ProductionApplication;
}
module.exports = ProductionApplication;
|
"use strict";
const expect = require('chai').expect;
const runner = require('../runner');
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const exec = require('child_process').exec;
const prewarm = require('../../lib/utils/when-prewarmed').setupMocha;
describe('kotlin-runner', function() {
this.timeout(0);
prewarm();
afterEach(function cleanup(done) {
exec('rm -rf /home/codewarrior/project', function(err) {
if (err) return done(err);
done();
});
});
describe('running', function() {
it('should handle basic code evaluation', function(done) {
runner.run({
language: 'kotlin',
solution: [
`fun main(args: Array<String>) {`,
` println(42)`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.equal('42\n');
done();
});
});
it('should handle setup code', function(done) {
runner.run({
language: 'kotlin',
setup: [
`fun greet(name: String): String {`,
` return "Hello, " + name`,
`}`,
].join('\n'),
solution: [
`fun main(args: Array<String>) {`,
` println(greet("Joe"))`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.equal('Hello, Joe\n');
done();
});
});
it('can have package declaration', function(done) {
runner.run({
language: 'kotlin',
setup: [
`package example`,
`fun greet(name: String): String {`,
` return "Hello, " + name`,
`}`,
].join('\n'),
solution: [
`package example`,
`fun main(args: Array<String>) {`,
` println(greet("Joe"))`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.equal('Hello, Joe\n');
done();
});
});
});
describe('testing with JUnit', function() {
it('should handle basic assertion', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`fun add(a: Int, b: Int) = a + b`,
].join('\n'),
fixture: [
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
it('should handle basic assertion with named package', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a + b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
it('should handle basic assertion failure', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a - b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
console.log(buffer);
expect(buffer.stdout).to.contain('<FAILED::>');
done();
});
});
it('should handle basic assertion failure by error', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a / b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(1, add(1, 0))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
console.log(buffer);
expect(buffer.stdout).to.contain('<ERROR::>');
done();
});
});
it('should handle basic assertion failure with message', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a - b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1), "add(1, 1) should return 2")`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
console.log(buffer);
expect(buffer.stdout).to.contain('<FAILED::>');
expect(buffer.stdout).to.contain('add(1, 1) should return 2');
done();
});
});
it('can have multiple suites', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
`fun add(a: Int, b: Int): Int {`,
` return a + b`,
`}`,
].join('\n'),
fixture: [
`package kata`,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
`class TestAddPositive {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1))`,
` }`,
`}`,
`class TestAddNegative {`,
` @Test`,
` fun addTest() {`,
` assertEquals(-2, add(-1, -1))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
const expected = [
'<DESCRIBE::>',
' <IT::><PASSED::><COMPLETEDIN::>',
'<COMPLETEDIN::>',
'<DESCRIBE::>',
' <IT::><PASSED::><COMPLETEDIN::>',
'<COMPLETEDIN::>',
].join('').replace(/\s/g, '');
expect(buffer.stdout.match(/<(?:DESCRIBE|IT|PASSED|FAILED|COMPLETEDIN)::>/g).join('')).to.equal(expected);
done();
});
});
it('should allow logging', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'junit4',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int): Int {`,
' println("a = ${a}, b = ${b}")',
` return a + b`,
`}`,
].join('\n'),
fixture: [
`package kata`,
``,
`import kotlin.test.assertEquals`,
`import org.junit.Test`,
``,
`class TestAdd {`,
` @Test`,
` fun addTest() {`,
` assertEquals(2, add(1, 1))`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('a = 1, b = 1');
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
});
describe('testing with KotlinTest', function() {
it('should handle basic assertion', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`fun add(a: Int, b: Int) = a + b`,
].join('\n'),
fixture: [
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAdd : StringSpec() {`,
` init {`,
` "add(1, 1) should return 2" {`,
` add(1, 1) shouldBe 2`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
it('should handle basic assertion with named package', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a + b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAdd : StringSpec() {`,
` init {`,
` "add(1, 1) should return 2" {`,
` add(1, 1) shouldBe 2`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
it('should handle basic assertion failure', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`fun add(a: Int, b: Int) = a - b`,
].join('\n'),
fixture: [
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAdd : StringSpec() {`,
` init {`,
` "add(1, 1) should return 2" {`,
` add(1, 1) shouldBe 2`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<FAILED::>');
done();
});
});
it('should handle basic assertion failure by error', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`fun add(a: Int, b: Int) = a / b`,
].join('\n'),
fixture: [
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAdd : StringSpec() {`,
` init {`,
` "add(1, 0) should return 1" {`,
` add(1, 0) shouldBe 1`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('<ERROR::>');
done();
});
});
it('can have multiple suites', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int) = a + b`,
].join('\n'),
fixture: [
`package kata`,
``,
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAddPositives : StringSpec() {`,
` init {`,
` "add(1, 1) should return 2" {`,
` add(1, 1) shouldBe 2`,
` }`,
` }`,
`}`,
``,
`class TestAddNegatives : StringSpec() {`,
` init {`,
` "add(-1, -1) should return -2" {`,
` add(-1, -1) shouldBe -2`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
const expected = [
'<DESCRIBE::>',
' <IT::><PASSED::><COMPLETEDIN::>',
'<COMPLETEDIN::>',
'<DESCRIBE::>',
' <IT::><PASSED::><COMPLETEDIN::>',
'<COMPLETEDIN::>',
].join('').replace(/\s/g, '');
expect(buffer.stdout.match(/<(?:DESCRIBE|IT|PASSED|FAILED|COMPLETEDIN)::>/g).join('')).to.equal(expected);
done();
});
});
it('should allow logging', function(done) {
runner.run({
language: 'kotlin',
testFramework: 'kotlintest',
solution: [
`package kata`,
``,
`fun add(a: Int, b: Int): Int {`,
' println("a = ${a}, b = ${b}")',
` return a + b`,
`}`,
].join('\n'),
fixture: [
`package kata`,
``,
`import io.kotlintest.matchers.shouldBe`,
`import io.kotlintest.specs.StringSpec`,
``,
`class TestAdd : StringSpec() {`,
` init {`,
` "add(1, 1) should return 2" {`,
` add(1, 1) shouldBe 2`,
` }`,
` }`,
`}`,
].join('\n'),
}, function(buffer) {
expect(buffer.stdout).to.contain('a = 1, b = 1');
expect(buffer.stdout).to.contain('<PASSED::>');
done();
});
});
});
describe('Example Challenges', function() {
forEachExamples(function(framework, name, example) {
describe(`${framework}: "${name}" example`, function() {
it('should define an initial code block', function() {
expect(example.initial).to.be.a('string');
});
it('should have a passing solution', function(done) {
runner.run({
language: 'kotlin',
setup: example.setup,
solution: example.answer,
fixture: example.fixture,
testFramework: framework,
}, function(buffer) {
expect(buffer.stdout).to.contain('<PASSED::>');
expect(buffer.stdout).to.not.contain('<FAILED::>');
expect(buffer.stdout).to.not.contain('<ERROR::>');
done();
});
});
});
});
});
});
function forEachExamples(cb) {
const examples = yaml.safeLoad(fs.readFileSync(path.join(__dirname, `../../examples/kotlin.yml`), 'utf8'));
for (const framework of Object.keys(examples)) {
for (const example of Object.keys(examples[framework])) {
cb(framework, example, examples[framework][example]);
}
}
}
|
//= require vendor
//= require app
//= require_tree ./lib
//= require_tree ./app
|
import projection from '../../common/view-models/shopping-list.projection'
import {
SHOPPING_LIST_CREATED,
SHOPPING_LIST_RENAMED,
SHOPPING_LIST_REMOVED,
SHOPPING_ITEM_CREATED,
SHOPPING_ITEM_TOGGLED,
SHOPPING_ITEM_REMOVED,
} from '../../common/event-types'
describe('view-models', () => {
describe('ShoppingList', () => {
it('projection "SHOPPING_LIST_CREATED" should create a list', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = null
const event = { aggregateId, payload: { name } }
expect(
projection[SHOPPING_LIST_CREATED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: false,
name,
list: [],
})
})
it('projection "SHOPPING_LIST_RENAMED" should rename the list', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = {
id: aggregateId,
removed: false,
name,
list: [],
}
const event = { payload: { name: 'renamed' } }
expect(
projection[SHOPPING_LIST_RENAMED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: false,
name: 'renamed',
list: [],
})
})
it('projection "SHOPPING_LIST_REMOVED" should remove the list', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = {
id: aggregateId,
removed: false,
name,
list: [],
}
const event = {}
expect(
projection[SHOPPING_LIST_REMOVED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: true,
name,
list: [],
})
})
it('projection "SHOPPING_ITEM_CREATED" should create a item', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = {
id: aggregateId,
removed: false,
name,
list: [],
}
const event = { payload: { id: 'id', text: 'text' } }
expect(
projection[SHOPPING_ITEM_CREATED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: false,
name,
list: [
{
id: 'id',
text: 'text',
checked: false,
},
],
})
})
it('projection "SHOPPING_ITEM_TOGGLED" should toggle the item', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = {
id: aggregateId,
removed: false,
name,
list: [
{
id: 'id',
text: 'text',
checked: false,
},
],
}
const event = { payload: { id: 'id', text: 'text' } }
expect(
projection[SHOPPING_ITEM_TOGGLED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: false,
name,
list: [
{
id: 'id',
text: 'text',
checked: true,
},
],
})
})
it('projection "SHOPPING_ITEM_REMOVED" should remove the item', () => {
const aggregateId = 'aggregateId'
const name = 'name'
const state = {
id: aggregateId,
removed: false,
name,
list: [
{
id: 'id',
text: 'text',
checked: true,
},
],
}
const event = { payload: { id: 'id' } }
expect(
projection[SHOPPING_ITEM_REMOVED](state, event, undefined, undefined)
).toEqual({
id: aggregateId,
removed: false,
name,
list: [],
})
})
})
})
|
define(['annotate', 'is-js'], function(annotate, is) {
return annotate('log', 'Returns the natural logarithm (base E) of a number')
.on(is.number, Math.log);
});
|
/*!
* jquery.customSelect() - v0.5.1
* http://adam.co/lab/jquery/customselect/
* 2014-03-19
*
* Copyright 2013 Adam Coulombe
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @license http://www.gnu.org/licenses/gpl.html GPL2 License
*/
(function ($) {
'use strict';
$.fn.extend({
customSelect: function (options) {
// filter out <= IE6
if (typeof document.body.style.maxHeight === 'undefined') {
return this;
}
var defaults = {
customClass: 'customSelect',
mapClass: true,
mapStyle: true
},
options = $.extend(defaults, options),
prefix = options.customClass,
changed = function ($select,customSelectSpan) {
var currentSelected = $select.find(':selected'),
customSelectSpanInner = customSelectSpan.children(':first'),
html = currentSelected.html() || ' ';
customSelectSpanInner.html(html);
if (currentSelected.attr('disabled')) {
customSelectSpan.addClass(getClass('DisabledOption'));
} else {
customSelectSpan.removeClass(getClass('DisabledOption'));
}
setTimeout(function () {
customSelectSpan.removeClass(getClass('Open'));
$(document).off('mouseup.customSelect');
}, 60);
},
getClass = function(suffix){
return prefix + suffix;
};
return this.each(function () {
var $select = $(this),
customSelectInnerSpan = $('<span />').addClass(getClass('Inner')),
customSelectSpan = $('<span />');
$select.after(customSelectSpan.append(customSelectInnerSpan));
customSelectSpan.addClass(prefix);
if (options.mapClass) {
customSelectSpan.addClass($select.attr('class'));
}
if (options.mapStyle) {
customSelectSpan.attr('style', $select.attr('style'));
}
$select
.addClass('hasCustomSelect')
.on('render.customSelect', function () {
changed($select,customSelectSpan);
$select.css('width','');
var selectBoxWidth = parseInt($select.outerWidth(), 10) -
(parseInt(customSelectSpan.outerWidth(), 10) -
parseInt(customSelectSpan.width(), 10));
// Set to inline-block before calculating outerHeight
customSelectSpan.css({
display: 'inline-block'
});
var selectBoxHeight = customSelectSpan.outerHeight();
if ($select.attr('disabled')) {
customSelectSpan.addClass(getClass('Disabled'));
} else {
customSelectSpan.removeClass(getClass('Disabled'));
}
customSelectInnerSpan.css({
width: selectBoxWidth,
display: 'inline-block'
});
$select.css({
'-webkit-appearance': 'menulist-button',
width: customSelectSpan.outerWidth(),
position: 'absolute',
opacity: 0,
height: selectBoxHeight,
fontSize: customSelectSpan.css('font-size')
});
})
.on('change.customSelect', function () {
customSelectSpan.addClass(getClass('Changed'));
changed($select,customSelectSpan);
})
.on('keyup.customSelect', function (e) {
if(!customSelectSpan.hasClass(getClass('Open'))){
$select.trigger('blur.customSelect');
$select.trigger('focus.customSelect');
}else{
if(e.which==13||e.which==27){
changed($select,customSelectSpan);
}
}
})
.on('mousedown.customSelect', function () {
customSelectSpan.removeClass(getClass('Changed'));
})
.on('mouseup.customSelect', function (e) {
if( !customSelectSpan.hasClass(getClass('Open'))){
// if FF and there are other selects open, just apply focus
if($('.'+getClass('Open')).not(customSelectSpan).length>0 && typeof InstallTrigger !== 'undefined'){
$select.trigger('focus.customSelect');
}else{
customSelectSpan.addClass(getClass('Open'));
e.stopPropagation();
$(document).one('mouseup.customSelect', function (e) {
if( e.target != $select.get(0) && $.inArray(e.target,$select.find('*').get()) < 0 ){
$select.trigger('blur.customSelect');
}else{
changed($select,customSelectSpan);
}
});
}
}
})
.on('focus.customSelect', function () {
customSelectSpan.removeClass(getClass('Changed')).addClass(getClass('Focus'));
})
.on('blur.customSelect', function () {
customSelectSpan.removeClass(getClass('Focus')+' '+getClass('Open'));
})
.on('mouseenter.customSelect', function () {
customSelectSpan.addClass(getClass('Hover'));
})
.on('mouseleave.customSelect', function () {
customSelectSpan.removeClass(getClass('Hover'));
})
.trigger('render.customSelect');
});
}
});
})(jQuery);
|
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
import image from "./image/plugin";
import video from "./video/plugin";
export default [
image,
video
];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.