Skip to content

Instantly share code, notes, and snippets.

const grouped = _.groupBy(this.state.deepAnalysisGroupedBarChart, 'color')
this.state.deepAnalysisMaxValue = max.value
const _encoding = {
x: {
field: 'value',
type: 'quantitative',
scale: {
domain: [0, max.value]
}
[
{
"author": "Jeffrey Heer",
"institution": "Stanford University",
"value": 68
},
{
"author": "Christopher D Manning",
"institution": "Stanford University",
"value": 11
@simon-lang
simon-lang / line-chart.json
Created November 28, 2018 23:24
line-chart.json
{
"$schema": "https://vega.github.io/schema/vega-lite/3.0.0-rc6.json",
"data": {
"values": [
{
"label": "2003",
"value": 1585,
"key": "pub_year",
"text": "2003 (1,585)"
},
@simon-lang
simon-lang / .block
Created September 11, 2018 00:55
fresh block
license: mit
@simon-lang
simon-lang / .block
Created September 10, 2018 04:10 — forked from NPashaP/.block
Viz - biPartite - default
license: gpl-3.0
const version = require('../../../../version.txt').trim()
class LocalStorageService {
constructor(prefix, useVersion) {
if (useVersion) {
prefix = version + ':' + prefix
}
this.prefix = prefix
this.store = {}

Keybase proof

I hereby claim:

  • I am simon-lang on github.
  • I am simonlang (https://keybase.io/simonlang) on keybase.
  • I have a public key ASDYTou6XNqXxLThey3kcC4CDJR3RJytbjda5HOutDNdywo

To claim this, I am signing this object:

@simon-lang
simon-lang / fields of use outliers.js
Created September 4, 2017 02:11
fields of use outliers
let max = 0
let maxes = []
vm.items.forEach(item => {
let _max = Math.max.apply(Math, item.data.fieldsOfUse['Relative Lens Metric by Field of Use'])
maxes.push(_max)
if (_max > max) max = _max
if (_max > 30) {
console.warn(item.user.displayName, _max)
}
})
@simon-lang
simon-lang / elasticsearch.js
Last active August 22, 2017 23:00
elastic search angular service.js
require('elasticsearch-browser/elasticsearch.angular')
const app = window.angular.module('lens-ui', ['elasticsearch'])
app.service('elasticClient', ['esFactory', esFactory => {
return esFactory({
host: 'localhost:9200',
})
}])
{
"name": "Example",
"description": "Line 1\nLine2\nThird line with \"quotation marks\""
}