Created
April 11, 2017 14:49
-
-
Save LayneSmith/f0b5295ac06573fd875dac15dc6fe1e1 to your computer and use it in GitHub Desktop.
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 $ from 'jquery'; | |
import shuffle from 'lodash.shuffle'; | |
import getdata from './import'; | |
// import d3 from 'd3-fetch'; | |
import './furniture'; | |
const arr = ['a', 'b', 'c', 'd']; | |
console.log(shuffle(arr)); | |
getdata((data) => { | |
console.log(data); | |
}); | |
// const draftData = getdata('http://interactives.dallasnews.com/data-store/2017/cowboys-draft-history.json'); | |
// console.log(draftData); | |
// let draftData; | |
// $.getJSON('http://interactives.dallasnews.com/data-store/2017/cowboys-draft-history.json', (json) => { | |
// draftData = json; | |
// }); | |
// console.log(draftData); | |
$('document').ready(() => { | |
console.log('Custom scripting goes here'); | |
}); | |
import { json } from 'd3-fetch'; | |
export default (done) => { | |
json('http://interactives.dallasnews.com/data-store/2017/cowboys-draft-history.json').then((data) => { | |
done(data); | |
}).catch((err) => { | |
console.error(err); | |
}); | |
}; | |
// export default function getdata(dataUrl) { | |
// json(dataUrl).then((data) => { | |
// done(data); | |
// }).catch((err) => { | |
// console.error(err); | |
// }); | |
// } | |
// export default function getdata(dataUrl) { | |
// let draftData; | |
// $.when( | |
// $.getJSON(dataUrl, (data) => { draftData = data; }), | |
// ).then(() => { | |
// return(draftData); | |
// }); | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment