Skip to content

Instantly share code, notes, and snippets.

/jsonthing.js Secret

Created December 12, 2017 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3d99d9e9628049235601a17b40167e1b to your computer and use it in GitHub Desktop.
Save anonymous/3d99d9e9628049235601a17b40167e1b to your computer and use it in GitHub Desktop.
d3.json('/mapbox-gl-js/assets/significant-earthquakes-2015.geojson', function(err, data) {
if (err) throw err;
// Create a month property value based on time
// used to filter against.
data.features = data.features.map(function(d) {
d.properties.month = new Date(d.properties.time).getMonth();
return d;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment