A virtual Dino world, where you can explore various types of dinosaurs from different eras and regions. This project is mainly a Next.js build | Voyage-48 | Tier 3 | Team 21 | https://chingu.io | Twitter: https://twitter.com/ChinguCollabs
getDigSites() groups all coordinates with the same "foundIn" name and calculates the count per coordinate group. this is important for showing the map overview:
e.g.,
[
{
'South Africa': { coordinates: '[23.9137106762068,-28.3782721906973]', count: 7 }
},
{ Argentina: { coordinates: '[-63.954193,-36.252002]', count: 32 } },
{
USA: { coordinates: '[-97.9222112121185,39.3812661305678]', count: 81 }
},
]
fetchDinoData() gets raw api data from the provided dino api, and converts individual location per dinosaur into coordinates. e.g.,
getDigSites() groups all coordinates with the same "foundIn" name and calculates the count per coordinate group. this is important for showing the map overview: e.g., [ { 'South Africa': { coordinates: '[23.9137106762068,-28.3782721906973]', count: 7 } }, { Argentina: { coordinates: '[-63.954193,-36.252002]', count: 32 } }, { USA: { coordinates: '[-97.9222112121185,39.3812661305678]', count: 81 } }, ]