3

I need a way to obtain the coordinates for all of one type of store/restaurant in a country. For example, all the McDonald's in South Africa.

I'd like to use R or any tool that is more appropriate. I've looked into using Google's Geocoding API but I'm not sure if it integrates well with R. My experience with using APIs is limited.

3
  • 1
    Do you already have the addresses of all the Points of Interest already? This can be done with R and a bit of programming, but you might find better luck using GIS software. Have you done any research into using QGIS or gvSIG? Nov 30, 2016 at 4:10
  • I'm just clarifying: You want to obtain coordinates for all stores/restaurants that match a name. Do you already have a list of all stores/restaurants and their addresses? (Then you could use geocoding/address services like Google Maps or SmartyStreets.) Do you want the coordinates output to a spreadsheet? (You could use Google Maps API and some code to search places then print results.) Do you want to make a map? (There's a good answer for that below.) Jan 7, 2017 at 0:32
  • Used Google Places API
    – Dr_Watcher
    Jan 7, 2017 at 11:50

1 Answer 1

1

A manual workflow:

You can create a google account, go to drive.google.com. Upload your dataset, say as a csv or xlsx file. In your datafile, Put the street address + city in a single column, call it , say, "location".

Use the File/Import menu to import the csv (or .xlsx file) file to a new Google spreadsheet.

Then import the spreadsheet into a new empty Google Fusion Table (-> Tutorial ). This is kind of an online shapefile, looks like an Excel File with just 1 worksheet. Added benefit: It has Geocoding built-in.

When it's done converting Spreadsheet to Fusion Table, select the entire "location" column defined above, and select File/Geocode... A progressbar will appear when Google Fusion table begins to call the Geocoding API internally. After 1-2 minutes : Done! A new "map" worksheet / tab will appear in the Fusion Table.

This is possible for about < 1000 addresses per sheet/Table. Exact quota number I don't remember. These geocoded values you can export as csv, zip, or KML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.