Get Features
The Features API provides features for ML Models across all types of demand causal factors, including attended events and non-attended events.
Request
HTTP Request
Request Headers
Header | Value |
---|---|
| Receive results in JSON or CSV by specifying the appropriate Supported values:
|
Request Body
Field | Description |
---|---|
| The date range to calculate features for. This is named "active" because it includes events that are active within the date range. A multi-day event might start or end outside the specified date range - the days the event is active within the specified range will be included in the calculations. Supports the following fields:
Note that all dates here are in local time (not UTC). Features API works on specific locations. Please also note that the maximum supported date range is 90 days. If you require features over a wider date range please make multiple API requests. E.g. |
| Time range (per day) to calculate features for. Note: This field is currently only supported on If your location only operates within certain hours of the day you can use this filter to only include records that are happening within those hours. Supports the following fields:
The values are hours between 0 and 23 (i.e. 24h format). E.g. only include events happening between 1pm and 3pm each day. |
| Location to calculate features for. You can specify the location as a latitude/longitude (with radius), Place ID(s) or Saved Location ID(s). We recommend using a lat/lon+radius or a saved location id (for a point and radius location) as they could define the location of your interest more accurately. To work out a suitable radius around your location we strongly recommend using our Suggested Radius API. Note: When using Place IDs or Saved Location IDs a maximum of 3 IDs may be used. Note: When using lat/lon+radius, the radius must be in the format
E.g. using Place IDs: E.g. using Saved Location IDs: E.g. using a latitude/longitude and radius (recommended): |
| Aggregation interval. Possible values:
|
| The weekday to be treated as the start of the week. Possible values:
Only applicable when |
| The name of the feature you're requesting. You can request multiple features in a single request.
Features can be further configured here, or you can set the value as E.g. requesting certain stats fields and filtering for records with a PHQ Rank over 50. E.g. requesting the default calculations for a feature. |
Available Features
PHQ Attendance features provide daily-level aggregated stats based on the number of people who we predict will attend events on a given day. This takes into account complications like distributing attendance across multi-day events.
We recommend using impact pattern features instead of generic features if you are in one of the supported industries. See #attended-events-impact-patterns.
Attended Events Generic Features
Use the generic features in this table if you are not in one of the industries covered by the impact pattern features listed below.
Feature | Description |
---|---|
| Academic - Graduation |
| Academic - Social |
| Community |
| Concerts |
| Conferences |
| Expos |
| Festivals |
| Performing Arts |
| Sports |
| School Holidays |
Attended Events Impact Pattern Features
Demand impact patterns model the impact of leading days (days before the event), lagging days (days after an event), and the days the event occurs. In the Features API, Impact Patterns are provided as different features with a feature per industry. We have impact pattern features for the accommodation, hospitality (which covers food & beverage including restaurants), and retail industries.
The features above are generic features and the features in the table below are the impact pattern features per industry. For example, if you were in the accommodation industry and wanted a feature for the conferences category you'd use phq_attendance_conferences_accommodation
.
We recommend using impact pattern features instead of generic features if you are in one of the supported industries. See Impact Patterns for more details.
Feature | Description |
---|---|
| Community accommodation impact |
| Concerts accommodation impact |
| Conferences accommodation impact |
| Expos accommodation impact |
| Festivals accommodation impact |
| Performing Arts accommodation impact |
| Sports accommodation impact |
| Community hospitality impact |
| Concerts hospitality impact |
| Conferences hospitality impact |
| Expos hospitality impact |
| Festivals hospitality impact |
| Performing Arts hospitality impact |
| Sports hospitality impact |
| Community Retail impact |
| Concerts Retail impact |
| Conferences Retail impact |
| Expos Retail impact |
| Festivals Retail impact |
| Performing Arts Retail impact |
| Sports Retail impact |
Configuration
You can configure PHQ Attendance features using the options below.
Field | Description |
---|---|
| You can optionally configure which fields are calculated for each of these features by providing the list of Default fields are Supported fields are:
E.g. |
| Filter for events with a PHQ Rank within a certain range. Supports the following fields:
E.g. |
Response
Response Fields
Field | Description |
---|---|
| List of results where each item is a Feature. Please refer to the Feature Response Fields section below for the structure of each record. Note that pagination is not required in this API. |
Feature Response Fields
Other than the date, the structure of each result here will depend on how you configured the feature in your request and the type of feature.
Field | Description |
---|---|
| Date in local time.
E.g. |
| Daily-level feature result. The structure of the result here will depend on how you configured the feature in your request. PHQ Attendance features are stats-based. Default fields are E.g. |
Response Format
You can receive responses formatted as JSON (default) or CSV. Use the Accept
header when performing your request to define which format you would like to receive.
With the Accept
header set to application/json
you will receive the results as JSON like the example below:
Examples
Guides
Below are some guides relevant to this API:
Last updated