{
"width": 3256,
"height": 1318,
"data": [
{
"name": "polytable1",
"format": "polys",
"shapeColGroup": "mapd",
"sql": "SELECT zipcodes.rowid,AVG(contributions_donotmodify.amount) AS avgContrib FROM contributions_donotmodify,zipcodes WHERE contributions_donotmodify.amount IS NOT NULL AND contributions_donotmodify.contributor_zipcode = zipcodes.ZCTA5CE10 GROUP BY zipcodes.rowid ORDER BY avgContrib DESC"
This file contains 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 digit = (num, pos) => { | |
const str = num.toString()[pos] | |
return typeof str === "undefined" ? 0 : parseInt(str) | |
} | |
const maxDigits = input => input.reduce((accum, value) => { | |
const len = value.toString().length | |
return accum < len ? len : accum | |
}, null) |
This file contains 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
function createStandInChart (cfGroup) { | |
const chart = {} | |
chart.redrawAsync = function () { | |
cfGroup.all().then(data => { | |
dispatch(updateChartData(data)) | |
}) | |
} | |
SELECT
date_trunc(year, CAST(contrib_date AS TIMESTAMP(0))) as key0,
AVG(amount) AS series_1
FROM contributions_donotmodify
WHERE
(CAST(contrib_date AS TIMESTAMP(0)) >= TIMESTAMP(0) '1996-11-05 17:47:30'
AND CAST(contrib_date AS TIMESTAMP(0)) <= TIMESTAMP(0) '2010-10-21 10:54:07')
AND amount IS NOT NULL
GROUP BY key0
This file contains 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 R from "ramda" | |
function transducer (xform, stepper, init, input) { | |
const reducer = (accum, value) => stepper(accum, value) | |
const transduce = R.compose(R.reduce(reducer, init), xform) | |
return transduce(input) | |
} |
This file contains 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 {PropTypes} from 'react' | |
import {compose, getContext, mapProps} from 'recompose' | |
const noop = () => ({}) | |
function connect(mapStateToProps = noop, mapDispatchToProps = noop) { | |
return compose( | |
getContext({ | |
store: PropTypes.shape({ | |
getState: PropTypes.func, |
This file contains 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 {compose, getContext, mapProps} from 'recompose' | |
function connect(mapStateToProps, mapDispatchToProps) { | |
return compose( | |
getContext({ | |
store: Proptypes.shape({ | |
getState: Proptypes.func, | |
dispatch: Proptypes.func, | |
subscribe: Proptypes.func, | |
}) |
This file contains 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
// JSX | |
<Form> | |
<Row> | |
<Input /> | |
</Row> | |
</Form> | |
NewerOlder