Last active
April 8, 2018 13:31
-
-
Save sergiolucero/067b0793adb7f411dfd8003b5bf45015 to your computer and use it in GitHub Desktop.
som tsp from web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json, requests | |
| import pandas as pd | |
| url = 'https://api.foursquare.com/v2/venues/explore' | |
| CLIENT_ID = 'ES4CLZNVL5AX3E43RY1115LHJGZ2HIULJWLFMZFVH03MPHHO' | |
| CLIENT_SECRET = 'OZZKEKTKH2BAIW3BNG3ZSM5MUOH444XJHQKQIZDDPFMDMBXN' | |
| params = dict( | |
| client_id=CLIENT_ID, | |
| client_secret=CLIENT_SECRET, | |
| v='20180323', | |
| ll='-33.400001, -70.620168', | |
| query='parque', | |
| limit=100 | |
| ) | |
| resp = requests.get(url=url, params=params) | |
| data = json.loads(resp.text) | |
| df=pd.DataFrame(data['response']['groups'][0]['items']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment