POI (Document Model)
Try Notion
POI (Document Model)
Examples (START HERE):
(Coming Soon)
For partners and other services that can generate leads into our details page, we provide exports of our data in a Document model. We convert our graph representation of restaurants and other POIs into documents that can be exported for indexing in traditional search systems. Below please find the schema of the data structure (evolving adding more fields over time) and a sample item snippet.
Data Structure
PointOfInterestType - POI's have several different types to denote the type of business. This will be expanded as more sources are added to our database.
enum PointOfInterestType { Arcade = "arcade", Bar = "bar", Cinema = "cinema", Hotel = "hotel", Landmark = "landmark", Museum = "museum", MusicVenue = "music_venue", Park = "park", Restaurant = "restaurant", Theatre = "theatre", }
DataSourceType - The type of action a user can take through third party services to interact with a POI.
I.e a delivery DataSourceType could be a delivery through postmates or ubereats.
enum DataSourceType { DELIVERY = "delivery" LINK = "link" PURCHASE = "purchase" RESERVATION = "reservation" WATCH = "watch" }
DataSource - Data sources are used to reference any sites that data was collected from. A DatasourceId can also be an action source.
enum DataSourceId { Tripadvisor = "tripadvisor" Yelp = "yelp" Google = "google" OpenTable = "opentable" FourSquare = "foursquare" UberEats = "ubereats" Postmates = "postmates" GrubHub = "grubhub" } class DataSource { source_id: DataSourceId name: string url: string source_type: DataSourceType }
Guide - Guides are available to search by and will have different ratings associated with each GuideSource . Examples of some guides are Michelin and Zagat. The label_rating will include aspects of POI that are rated highly such as "ambience" or "service".
enum GuideSource { michelin = "michelin" zagat = "zagat" infatuation = "infatuation" } class Guide { guide: GuideSource name: string rating: float32 label_rating: string review_labels: string[] }
Address - This will be the most "trusted" address, found by finding the biggest consensus amongst data sources.
GeoPoint - Will follow the same procedure as Address to find most "trusted" latitude and longitude.
class Address { addressCountry: string addressLocality: string postalCode: string addressRegion: string streetAddress: string } class GeoPoint { latitude: float64 longitude: float64 }
Hour - A generic format for representing the time window that a POI is open. This representation is necessary due to multiple time windows in a single day.
class Hour { day: string gte: string lte: string }
I.e day Sunday could have a time window of 9am - 10am and 2pm - 11pm. These multiple time windows could be represented as
{ "day": "Sun", "gte": "09:00", "lte": "10:00" }, { "day": "Sun", "gte": "14:00", "lte": "23:00" }
Review - A written or rated review by a user for a POI. Reviews can be from any of the DataSources that provide them.
class Review { image: string title: string body: string score: int user: string date_published: string }
Price - Generic price format for that will work for any international currency and display.
class Price { currency: string value: float32 formatted: string }
MenuItem - A item from any menu belonging to a POI. Will have price and image for given menu item if it is available. Also will contain categorical labels for better searching
class MenuItem { name: string description: string category: string image: string detailed_price: Price }
Score - Score that will have associated DataSourceID and the source name for user displays. rating_label will be certain attributes associated with score I.e "Best park in town"
class Score { source_id: DataSourceId: source_name: string score: float32 ratings: int rating_label: string }
Kai Score - Kai score is a proprietary rating based on our aggregated understanding of any individual location.
PointOfInterest - Aggregated data from all data sources will be stored in the following document structure for any POI.
class PointOfInterest { kai_score: float type: PointOfInterestType[] data_sources: DataSource[] uid: string name: string description: string images: string[] address: Address formatted_address: string geo_point: GeoPoint telephone: string website: string hours: Hour[] reviews: Review[] menu: MenuItem[] known_for: string[] labels: string[] timezone: string meals: string[] features: string[] price: string[] guides: Guide[] scores: Score[] }