A thing I made over the course of a week to rip data from Google Maps and organize it the way I want.
Note: according to Google, you can only pull a maximum of 60 places from a place, although sometimes it appears to pull more. It usually bugs out after doing that though.
- Put your Google Maps API key where it says
YOUR_API_KEY
in maps.html - Get the coordinates in latitude and longitude of the place you want to collect data from as well as the radius you want to scan
- Edit the variable
MAP_CENTER
in fetch.js. In Google Maps, you can find this information in the page URL. - Edit the variable
CENTRES
in handle.js as needed. One shopping centre is added as an example. - Open map.html and open the console. After you see
all results loaded.
and nothing else pops up after awhile, you're good to go. - Run
prepareData()
. This will also pop up a download prompt allowing you to export your shopping centres and counts of shops fitting the included indicator functions (shop types) as a csv file. - If you want to export the places that Google Maps didn't categorize, run
exportWeirdPlaces()
.