From be5fdd2631cbda776db342bca2b3030d051555bf Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 12:03:45 +0530 Subject: [PATCH 1/8] Added specifications for Google Places API data --- specifications/passive/google_places-1.0.0.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specifications/passive/google_places-1.0.0.yml diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml new file mode 100644 index 00000000..a6de7ab2 --- /dev/null +++ b/specifications/passive/google_places-1.0.0.yml @@ -0,0 +1,15 @@ +#======================================== Google Places =============================================# +vendor: GOOGLE +model: PLACES +version: 1.0.0 +data: + #Google Places + - type: GOOGLE_PLACES + app_provider: .google.GooglePlacesProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_google_places_info + value_schema: .passive.google.GooglePlacesInfo + sample_rate: + frequency: 600 + configurable: true \ No newline at end of file From f2dbb34f6563843fdc86bf13b258ff568700a09e Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 12:21:38 +0530 Subject: [PATCH 2/8] Added schema for data retrieved from Google Places API --- .../passive/google/google_places_info.avsc | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 commons/passive/google/google_places_info.avsc diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc new file mode 100644 index 00000000..2e50de20 --- /dev/null +++ b/commons/passive/google/google_places_info.avsc @@ -0,0 +1,23 @@ +{ + "namespace": "org.radarcns.passive.google", + "type": "record", + "name": "GooglePlacesInfo", + "doc": "Information of places where the user’s device is last known to be located along with an indication of the relative likelihood for each place.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "types", "type": { + "type": "array", "items": { + "name": "PlacesType", + "type": "enum", + "doc": "Categories of places based on their characteristics or attributes.", + "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] + }, "default": [ "UNKNOWN" ] + }, "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more."}, + { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, + { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, + { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, + { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, + { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." } + ] +} From c65688fed23e44c75f08dfc0ac2437799a59ccfe Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 19:46:31 +0530 Subject: [PATCH 3/8] Added new field to detect broadcasts Changed frequency to intervals in specifications Updated type of array to pass tests --- commons/passive/google/google_places_info.avsc | 10 ++++++---- specifications/passive/google_places-1.0.0.yml | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 2e50de20..88524ffd 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,18 +6,20 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": { + { "name": "types", "type": [{ "type": "array", "items": { "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] - }, "default": [ "UNKNOWN" ] - }, "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more."}, + } + }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": ["UNKNOWN"] + }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, - { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." } + { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." }, + { "name": "fromBroadcast", "type": "boolean", "doc": "Whether the data was generated as a result of a change in device location (true) or as part of a fixed scheduled intervals (false)." } ] } diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml index a6de7ab2..2b7430e7 100644 --- a/specifications/passive/google_places-1.0.0.yml +++ b/specifications/passive/google_places-1.0.0.yml @@ -11,5 +11,5 @@ data: topic: android_google_places_info value_schema: .passive.google.GooglePlacesInfo sample_rate: - frequency: 600 - configurable: true \ No newline at end of file + interval: 600 + configurable: true From 0d0d00cb89b676345baee91ec4912f8c0e644677 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 16 Aug 2023 16:36:13 +0530 Subject: [PATCH 4/8] Updated default value for PlacesTypes and modified doc for place-ID --- commons/passive/google/google_places_info.avsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 88524ffd..32f16e87 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,19 +6,19 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": [{ + { "name": "types", "type": ["null", { "type": "array", "items": { "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] } - }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": ["UNKNOWN"] + }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, - { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, - { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, + { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null }, + { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place. By default, it is not retrieved to respect the user's privacy. To retrieve place IDs, Firebase parameters need to be explicitly set.", "default": null }, { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." }, { "name": "fromBroadcast", "type": "boolean", "doc": "Whether the data was generated as a result of a change in device location (true) or as part of a fixed scheduled intervals (false)." } ] From c0aad16418779f4525505ca241b5a7f1437669e9 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 16 Aug 2023 16:37:11 +0530 Subject: [PATCH 5/8] Updated sample rate to dynamic also --- specifications/passive/google_places-1.0.0.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml index 2b7430e7..9b60951d 100644 --- a/specifications/passive/google_places-1.0.0.yml +++ b/specifications/passive/google_places-1.0.0.yml @@ -13,3 +13,4 @@ data: sample_rate: interval: 600 configurable: true + dynamic: true From db62a0b171f5c23ce6e9564b513d0556b1ffac42 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 17 Aug 2023 19:54:30 +0530 Subject: [PATCH 6/8] Removed UNKNOWN and some unavailable types from PlacesTypes enum --- commons/passive/google/google_places_info.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 32f16e87..7f289908 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -11,7 +11,7 @@ "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", - "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] + "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO"] } }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null }, From cfcb243d1686a2c87355b1403ad079331d45f9ea Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Mon, 21 Aug 2023 19:46:50 +0530 Subject: [PATCH 7/8] Modified the Places Types from an array to enums. --- commons/passive/google/google_places_info.avsc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 7f289908..dc189ed3 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,15 +6,15 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": ["null", { - "type": "array", "items": { + { "name": "type1", "type": ["null", { "name": "PlacesType", "type": "enum", - "doc": "Categories of places based on their characteristics or attributes.", + "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO"] - } - }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null + }], "doc": "Categorizing places based on their characteristics or attributes, this field represents the first type, if any, among the retrieved place categories.", "default": null }, + { "name": "type2", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the second type, if any, among the retrieved place categories.", "default": null }, + { "name": "type3", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the third type, if any, among the retrieved place categories.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null }, From a135455d80403cd7ba6f2d4c78610ba7181b19bc Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 24 Aug 2023 00:21:20 +0530 Subject: [PATCH 8/8] Added additional type for PlacesTypes --- commons/passive/google/google_places_info.avsc | 1 + 1 file changed, 1 insertion(+) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index dc189ed3..2302ee89 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -15,6 +15,7 @@ }, { "name": "type2", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the second type, if any, among the retrieved place categories.", "default": null }, { "name": "type3", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the third type, if any, among the retrieved place categories.", "default": null }, + { "name": "type4", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the fourth type, if any, among the retrieved place categories.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null },