This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"red": { | |
"value": "#E60D4E", | |
"type": "color" | |
}, | |
"blue": { | |
"value": "#0D7EE6", | |
"type": "color" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setWidthAndHeight() { | |
const cs = getComputedStyle(this.$el) | |
const paddingX = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight) | |
const paddingY = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom) | |
const borderX = | |
parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth) | |
const borderY = | |
parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CLEAR DATA | |
MATCH (n:Officer) DETACH delete n; | |
MATCH (n:Incident) DETACH delete n; | |
MATCH (n:Precinct) DETACH delete n; | |
MATCH (n:Penalty) DETACH delete n; | |
// SET CONSTRAINTS | |
CREATE CONSTRAINT officerIdConstraint ON (officer:Officer) ASSERT officer.id IS UNIQUE | |
CREATE CONSTRAINT incidentIdConstraint ON (incident:Incident) ASSERT incident.id IS UNIQUE | |
CREATE CONSTRAINT precinctIdConstraint ON (precinct:Precinct) ASSERT precinct.id IS UNIQUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clear data | |
MATCH (n:Officer) delete n; | |
MATCH (n:Incident) delete n; | |
MATCH (n:Precinct) delete n; | |
MATCH (n:Penalty) delete n; | |
CREATE CONSTRAINT officerIdConstraint ON (officer:Officer) ASSERT officer.id IS UNIQUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parsed Date | happiness | total | social | energy | wellness | |
---|---|---|---|---|---|---|
2019-07-10 | 48.25351918 | 83.88230576 | 97.03125003 | 148.7255695 | 238.6566667 | |
2019-07-11 | 149.6123334 | 98.34205408 | 185.3835502 | 94.47351362 | 249.3607796 | |
2019-07-12 | 151.5025529 | 100 | 181.2305023 | 131.2680142 | 335.0919097 | |
2019-07-13 | 104.975604 | 76.02830081 | 130.5435739 | 24.72176457 | 93.05885718 | |
2019-07-14 | 106.9930615 | 79.22556595 | 70.54415526 | 50.38911631 | 176.7435962 | |
2019-07-15 | 48.49782752 | 69.34323403 | 134.5885842 | 49.3129526 | 116.4604166 | |
2019-07-16 | 65.89493656 | 88.01984618 | 181.9219129 | 94.17121736 | 127.9488072 | |
2019-07-17 | 65.7430037 | 87.16667812 | 133.5655477 | 91.4792567 | 234.0841979 | |
2019-07-18 | 78.91884416 | 86.8878136 | 95.92553568 | 80.09017738 | 245.2977639 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage img; // Declare a variable of type PImage | |
float yScroll = 0; | |
// float scrollAmt = 50; | |
float threshold = 127; | |
PImage destination; | |
int lines = 1; | |
int scrollStart = 768; | |
float scrollScreens; | |
int revealAmt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import find from 'lodash/find' | |
import filter from 'lodash/filter' | |
import sortBy from 'lodash/sortBy' | |
import fs from 'fs' | |
//import nest from 'd3-collection' | |
import * as collection from 'd3-collection' | |
let argv = process.argv | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "prerender", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { load } = require("@alex.garcia/observable-prerender"); | |
const puppeteer = require("puppeteer"); | |
async function main() { | |
let mapWidth = 1920 | |
let mapHeight = 1080 | |
// let startDate = "20200301" | |
let startDate = "20200122" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modified from https://github.com/siegfriedgrimbeek/cheerio-pagination-tutorial | |
// Thanks to Siegfried for open sourcing this | |
// I only modified it a tiny bit to work for qmap | |
// External dependencies | |
const axios = require('axios') | |
const cheerio = require('cheerio') | |
const fs = require('fs') | |
const chalk = require('chalk') |