Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Last active April 8, 2018 13:31
Show Gist options
  • Save sergiolucero/067b0793adb7f411dfd8003b5bf45015 to your computer and use it in GitHub Desktop.
Save sergiolucero/067b0793adb7f411dfd8003b5bf45015 to your computer and use it in GitHub Desktop.
som tsp from web
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