Spaces:
Runtime error
Runtime error
Update utils2.py
Browse files
utils2.py
CHANGED
|
@@ -29,6 +29,58 @@ DATASET_COLUMNS = [
|
|
| 29 |
'Event'
|
| 30 |
]
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
import os
|
| 33 |
from google.maps import areainsights_v1
|
| 34 |
from google.maps.areainsights_v1.types import ComputeInsightsRequest, Filter, LocationFilter, Insight
|
|
|
|
| 29 |
'Event'
|
| 30 |
]
|
| 31 |
|
| 32 |
+
|
| 33 |
+
GOOGLE_PLACE_TYPE_MAPPING = [
|
| 34 |
+
# Dining and Drinking
|
| 35 |
+
[
|
| 36 |
+
'restaurant', 'bar', 'cafe', 'bakery', 'night_club'
|
| 37 |
+
],
|
| 38 |
+
# Community and Government
|
| 39 |
+
[
|
| 40 |
+
'government_office', 'local_government_office', 'city_hall',
|
| 41 |
+
'courthouse', 'police', 'fire_station', 'post_office', 'library'
|
| 42 |
+
],
|
| 43 |
+
# Retail
|
| 44 |
+
[
|
| 45 |
+
'store', 'shopping_mall', 'grocery_store', 'pharmacy',
|
| 46 |
+
'supermarket', 'drugstore'
|
| 47 |
+
],
|
| 48 |
+
# Business and Professional Services
|
| 49 |
+
[
|
| 50 |
+
'bank', 'atm', 'corporate_office', 'accounting', 'lawyer',
|
| 51 |
+
'establishment'
|
| 52 |
+
],
|
| 53 |
+
# Landmarks and Outdoors
|
| 54 |
+
[
|
| 55 |
+
'park', 'tourist_attraction', 'national_park',
|
| 56 |
+
'historical_landmark', 'cultural_landmark'
|
| 57 |
+
],
|
| 58 |
+
# Arts and Entertainment
|
| 59 |
+
[
|
| 60 |
+
'movie_theater', 'museum', 'art_gallery',
|
| 61 |
+
'performing_arts_theater', 'amusement_park', 'aquarium', 'zoo'
|
| 62 |
+
],
|
| 63 |
+
# Health and Medicine
|
| 64 |
+
[
|
| 65 |
+
'hospital', 'doctor', 'dentist', 'pharmacy',
|
| 66 |
+
'physiotherapist', 'spa'
|
| 67 |
+
],
|
| 68 |
+
# Travel and Transportation
|
| 69 |
+
[
|
| 70 |
+
'airport', 'bus_station', 'train_station', 'transit_station',
|
| 71 |
+
'subway_station', 'parking', 'lodging'
|
| 72 |
+
],
|
| 73 |
+
# Sports and Recreation
|
| 74 |
+
[
|
| 75 |
+
'gym', 'stadium', 'bowling_alley', 'fitness_center',
|
| 76 |
+
'park', 'amusement_center'
|
| 77 |
+
],
|
| 78 |
+
# Event (Mapped to common event venues)
|
| 79 |
+
[
|
| 80 |
+
'event_venue', 'convention_center', 'banquet_hall', 'stadium'
|
| 81 |
+
]
|
| 82 |
+
]
|
| 83 |
+
|
| 84 |
import os
|
| 85 |
from google.maps import areainsights_v1
|
| 86 |
from google.maps.areainsights_v1.types import ComputeInsightsRequest, Filter, LocationFilter, Insight
|