Compare commits
No commits in common. "6b7251375984e6aaa211f555b2b690f236c0f87b" and "7e5cb5ff1d3da8fdd014af3c6a723fde81fd5fcc" have entirely different histories.
6b72513759
...
7e5cb5ff1d
3 changed files with 23 additions and 44 deletions
|
|
@ -17,8 +17,7 @@
|
||||||
- [ ] NHL stadiums filtered for Eric and Chandler have visited -- https://upload.wikimedia.org/wikipedia/commons/2/28/NHL_arenas.jpg
|
- [ ] NHL stadiums filtered for Eric and Chandler have visited -- https://upload.wikimedia.org/wikipedia/commons/2/28/NHL_arenas.jpg
|
||||||
- [ ] Layer for drone imagery a la openaerialmap.com
|
- [ ] Layer for drone imagery a la openaerialmap.com
|
||||||
- [ ] Trip layers/slideshows
|
- [ ] Trip layers/slideshows
|
||||||
- [ ] air service: https://www.mayoclinic.org/ambulance-service/helicopter, https://ambulanceservices.northmemorial.com/air-care/#map, https://lifelinkiii.com/services/air-medical-transport/, etc
|
|
||||||
- [ ] Parse out location from fire pages, etc? https://hutchinsonfire.posthaven.com/archive (and mcleod, etc)
|
|
||||||
|
|
||||||
All filterable by time frame
|
All filterable by time frame
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,54 +4,34 @@ import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
print("Searching for Raising Cane's locations")
|
print("Searching for Raising Cane's locations")
|
||||||
|
response = requests.get('https://raisingcanes.com/page-data/sq/d/3976656178.json').json()
|
||||||
all_results = []
|
|
||||||
desired_results = 999999
|
|
||||||
|
|
||||||
while len(all_results) < desired_results:
|
|
||||||
res = requests.get("https://prod-cdn.us.yextapis.com/v2/accounts/me/search/vertical/query", params={
|
|
||||||
"experienceKey": "locator",
|
|
||||||
"api_key": "6c78315e15b82a7cccbbf3fad5db0958",
|
|
||||||
"v": "20220511",
|
|
||||||
"version": "PRODUCTION",
|
|
||||||
"locale": "en",
|
|
||||||
"verticalKey": "locations",
|
|
||||||
"filters": json.dumps({
|
|
||||||
"builtin.location": {
|
|
||||||
"$near": {
|
|
||||||
"lat": 0,
|
|
||||||
"lng": 0,
|
|
||||||
"radius": 100000000,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
"limit": 50,
|
|
||||||
"offset": len(all_results),
|
|
||||||
"source": "STANDARD",
|
|
||||||
})
|
|
||||||
desired_results = int(res.json()['response']['resultsCount'])
|
|
||||||
all_results.extend(res.json()['response']['results'])
|
|
||||||
print(f"Fetched {len(all_results)}/{desired_results} results…")
|
|
||||||
|
|
||||||
stores = []
|
stores = []
|
||||||
|
|
||||||
for s in all_results:
|
for s in response['data']['allPrismicStoreLocation']['nodes']:
|
||||||
|
if s['uid'] == 'ara2': # Not sure what's up with this one: https://raisingcanes.com/locations/ara2/
|
||||||
|
continue
|
||||||
|
elif s['uid'] == 'c524': # Null island? https://raisingcanes.com/locations/c524/
|
||||||
|
s['data']['coordinates'] = {
|
||||||
|
"longitude": -111.9811399,
|
||||||
|
"latitude": 40.5447361,
|
||||||
|
}
|
||||||
stores.append({
|
stores.append({
|
||||||
"type": "Feature",
|
"type": "Feature",
|
||||||
"geometry": {
|
"geometry": {
|
||||||
"type": "Point",
|
"type": "Point",
|
||||||
"coordinates": [float(s['data']['yextDisplayCoordinate']['longitude']), float(s['data']['yextDisplayCoordinate']['latitude'])], # yes, [lon, lat] since it's [x, y]
|
"coordinates": [float(s['data']['coordinates']['longitude']), float(s['data']['coordinates']['latitude'])], # yes, [lon, lat] since it's [x, y]
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
'name': s['data']['name'],
|
'name': s['data']['external_location_data']['displayName'],
|
||||||
'nickname': s['data']['c_nickname'],
|
'nickname': s['data']['external_location_data']['nickname'],
|
||||||
'address': s['data']['address']['line1'],
|
'address': s['data']['external_location_data']['address1'],
|
||||||
'city': s['data']['address']['city'],
|
'city': s['data']['external_location_data']['city'],
|
||||||
'state': s['data']['address']['region'],
|
'state': s['data']['external_location_data']['state'],
|
||||||
'zip': s['data']['address']['postalCode'],
|
'zip': s['data']['external_location_data']['postal_code'],
|
||||||
'website': s['data']['websiteUrl'],
|
'website': f"https://raisingcanes.com/locations/{s['uid']}",
|
||||||
'opened': s['data']['c_openDate'],
|
'opened': s['data']['external_location_data']['birthdate'],
|
||||||
'hours': s['data']['hours'],
|
'hours': s['data']['external_location_data']['hours'],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ const visitedStatesLists = {
|
||||||
// 'AL',
|
// 'AL',
|
||||||
'AR',
|
'AR',
|
||||||
'AZ',
|
'AZ',
|
||||||
'CA',
|
// 'CA',
|
||||||
'CO',
|
'CO',
|
||||||
// 'CT',
|
// 'CT',
|
||||||
'DE',
|
'DE',
|
||||||
|
|
@ -132,7 +132,7 @@ const visitedStatesLists = {
|
||||||
// 'GA',
|
// 'GA',
|
||||||
// 'HI',
|
// 'HI',
|
||||||
'IA',
|
'IA',
|
||||||
'ID',
|
// 'ID',
|
||||||
'IL',
|
'IL',
|
||||||
'IN',
|
'IN',
|
||||||
'KS',
|
'KS',
|
||||||
|
|
@ -152,7 +152,7 @@ const visitedStatesLists = {
|
||||||
'NH',
|
'NH',
|
||||||
// 'NJ',
|
// 'NJ',
|
||||||
'NM',
|
'NM',
|
||||||
'NV',
|
// 'NV',
|
||||||
'NY',
|
'NY',
|
||||||
'OH',
|
'OH',
|
||||||
'OK',
|
'OK',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue