Visualize data from API in p5.js

It looks like you have already loaded JSON file into your sketch, and logged the bikeAccidentsData object. So, we will just need to look at its properties.

  const features = bikeAccidentsData.features
  for (let i = 0; i < features.length; i++) {
    const feature = features[i]
    console.log(feature.properties.type, feature.geometry.coordinates)
  }
1 Like