Get ML Features
Prebuilt event-based features for Machine Learning models.
Access prebuilt event-based Machine Learning features that will take your forecast models and results to the next level, fast.
We've built up years of expertise in transforming raw event data into meaningful demand signals. Across industries, we’ve consistently seen that naïve aggregation produces noise rather than uplift. The Features API encapsulates that experience - delivering proven, engineered signals that improve forecast accuracy without the heavy lifting.
Offset the results.
0
Limit the number of results.
10
Receive results in JSON or CSV by specifying the appropriate Accept header. Supported values:
- application/json
- text/csv
application/json
Possible values: Aggregation interval.
Possible values: Fields:
day
(default) for daily aggregationweek
for weekly aggregation
day
Possible values: The weekday to be treated as the start of the week.
Possible values:
monday
(default)tuesday
wednesday
thursday
friday
saturday
sunday
Only applicable when interval is set to week.
monday
Possible values: Academic - Graduation
Academic - Social
Community
Concerts
Conferences
Expos
Festivals
Performing Arts
Sports
School Holidays
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
Daylight Savings
Default: False
Health Warnings
Default: False
Observances
Default: False
Public Holidays
Default: False
School Holidays
Default: False
Politics
Default: False
Academic - Session
Default: False
Academic - Exam
Default: False
Academic - Holiday
Default: False
Observances
Public Holidays
School Holidays
Academic
Academic
Academic
Observances (Industry: Accommodation)
Observances (Industry: Hospitality/Food & Beverage)
Observances (Industry: Retail)
Public Holidays (Industry: Accommodation)
Public Holidays (Industry: Hospitality/Food & Beverage*)
Public Holidays (Industry: Retail)
Severe Weather - Air Quality (Industry: Retail)
Severe Weather - Blizzard (Industry: Retail)
Severe Weather - Cold Wave - (All) (Industry: Retail)
Severe Weather - Cold Wave - Snow (Industry: Retail)
Severe Weather - Cold Wave - Storm (Industry: Retail)
Severe Weather - Dust - (All) (Industry: Retail)
Severe Weather - Dust - Storm (Industry: Retail)
Severe Weather - Flood (Industry: Retail)
Severe Weather - Heat Wave (Industry: Retail)
Severe Weather - Hurricane (Industry: Retail)
Severe Weather - Thunderstorm (Industry: Retail)
Severe Weather - Tornado (Industry: Severe Weather - Tornado) (Industry: Retail)
Severe Weather - Tropical Storm (Industry: Retail)
Sports - (All)
American Football - (All)
American Football - NCAA Men's
American Football - NFL
Automotive Racing - All
Automotive Racing - Indy Car
Automotive Racing - NASCAR
Baseball - (All)
Baseball - MLB
Baseball - NCAA Men's
Basketball - (All)
Basketball - NBA
Basketball - NCAA Men's
Basketball - NCAA Women's
Boxing - (All)
Golf - (All)
Golf - Masters
Golf - PGA Championships
Golf - PGA Tours
Golf - US Open
Horse Racing - (All)
Horse Racing - Belmont Stakes
Horse Racing - Kentucky Derby
Horse Racing - Preakness Stakes
Ice Hockey - (All)
Ice Hockey - NHL
Mixed Martial Arts - (All)
Mixed Martial Arts - UFC
Soccer - (All)
Soccer - CONCACAF Champions League
Soccer - CONCACAF Gold Cup
Soccer - COPA America Men's
Soccer - FIFA World Cup Women's
Soccer - FIFA World Cup Men's
Soccer - MLS
Soccer - UEFA Champions League Men's
Softball - (All)
Softball - NCAA Women's
Tennis - (All)
Tennis - US Open
Tennis - Wimbledon
Conferences
Expos
Sports
Community
Concerts
Festivals
Performing Arts
Conferences - Accommodation
Expos - Accommodation
Sports - Accommodation
Community - Accommodation
Concerts - Accommodation
Festivals - Accommodation
Performing Arts - Accommodation
Conferences - Hospitality
Expos - Hospitality
Sports - Hospitality
Community - Hospitality
Concerts - Hospitality
Festivals - Hospitality
Performing Arts - Hospitality
Conferences - Transportation
Expos - Transportation
Sports - Transportation
Community - Transportation
Concerts - Transportation
Festivals - Transportation
Performing Arts - Transportation
Successful Response
Validation Error
POST /v1/features/ HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 5929
{
"active": {
"gt": "2025-10-08",
"gte": "2025-10-08",
"lt": "2025-10-08",
"lte": "2025-10-08"
},
"beam": {
"analysis_id": "text",
"group_id": "text"
},
"hour_of_day_start": {
"gt": 1,
"gte": 1,
"lt": 1,
"lte": 1
},
"location": {
"place_id": [
1
],
"geo": {
"lon": 1,
"lat": 1,
"radius": "text"
},
"saved_location_id": [
"text"
]
},
"interval": "day",
"week_start_day": "monday",
"predicted_events": {
"exclude": false
},
"phq_attendance_academic_graduation": true,
"phq_attendance_academic_social": true,
"phq_attendance_community": true,
"phq_attendance_concerts": true,
"phq_attendance_conferences": true,
"phq_attendance_expos": true,
"phq_attendance_festivals": true,
"phq_attendance_performing_arts": true,
"phq_attendance_sports": true,
"phq_attendance_school_holidays": true,
"phq_attendance_community_accommodation": true,
"phq_attendance_concerts_accommodation": true,
"phq_attendance_conferences_accommodation": true,
"phq_attendance_expos_accommodation": true,
"phq_attendance_festivals_accommodation": true,
"phq_attendance_performing_arts_accommodation": true,
"phq_attendance_sports_accommodation": true,
"phq_attendance_community_hospitality": true,
"phq_attendance_concerts_hospitality": true,
"phq_attendance_conferences_hospitality": true,
"phq_attendance_expos_hospitality": true,
"phq_attendance_festivals_hospitality": true,
"phq_attendance_performing_arts_hospitality": true,
"phq_attendance_sports_hospitality": true,
"phq_attendance_community_retail": true,
"phq_attendance_concerts_retail": true,
"phq_attendance_conferences_retail": true,
"phq_attendance_expos_retail": true,
"phq_attendance_festivals_retail": true,
"phq_attendance_performing_arts_retail": true,
"phq_attendance_sports_retail": true,
"phq_rank_daylight_savings": true,
"phq_rank_health_warnings": true,
"phq_rank_observances": true,
"phq_rank_public_holidays": true,
"phq_rank_school_holidays": true,
"phq_rank_politics": true,
"phq_rank_academic_session": true,
"phq_rank_academic_exam": true,
"phq_rank_academic_holiday": true,
"phq_impact_observances": true,
"phq_impact_public_holidays": true,
"phq_impact_school_holidays": true,
"phq_impact_academic_exam": true,
"phq_impact_academic_holiday": true,
"phq_impact_academic_session": true,
"phq_impact_observances_accommodation": true,
"phq_impact_observances_hospitality": true,
"phq_impact_observances_retail": true,
"phq_impact_public_holidays_accommodation": true,
"phq_impact_public_holidays_hospitality": true,
"phq_impact_public_holidays_retail": true,
"phq_impact_severe_weather_air_quality_retail": true,
"phq_impact_severe_weather_blizzard_retail": true,
"phq_impact_severe_weather_cold_wave_retail": true,
"phq_impact_severe_weather_cold_wave_snow_retail": true,
"phq_impact_severe_weather_cold_wave_storm_retail": true,
"phq_impact_severe_weather_dust_retail": true,
"phq_impact_severe_weather_dust_storm_retail": true,
"phq_impact_severe_weather_flood_retail": true,
"phq_impact_severe_weather_heat_wave_retail": true,
"phq_impact_severe_weather_hurricane_retail": true,
"phq_impact_severe_weather_thunderstorm_retail": true,
"phq_impact_severe_weather_tornado_retail": true,
"phq_impact_severe_weather_tropical_storm_retail": true,
"phq_viewership_sports": true,
"phq_viewership_sports_american_football": true,
"phq_viewership_sports_american_football_ncaa_men": true,
"phq_viewership_sports_american_football_nfl": true,
"phq_viewership_sports_auto_racing": true,
"phq_viewership_sports_auto_racing_indy_car": true,
"phq_viewership_sports_auto_racing_nascar": true,
"phq_viewership_sports_baseball": true,
"phq_viewership_sports_baseball_mlb": true,
"phq_viewership_sports_baseball_ncaa_men": true,
"phq_viewership_sports_basketball": true,
"phq_viewership_sports_basketball_nba": true,
"phq_viewership_sports_basketball_ncaa_men": true,
"phq_viewership_sports_basketball_ncaa_women": true,
"phq_viewership_sports_boxing": true,
"phq_viewership_sports_golf": true,
"phq_viewership_sports_golf_masters": true,
"phq_viewership_sports_golf_pga_championship": true,
"phq_viewership_sports_golf_pga_tour": true,
"phq_viewership_sports_golf_us_open": true,
"phq_viewership_sports_horse_racing": true,
"phq_viewership_sports_horse_racing_belmont_stakes": true,
"phq_viewership_sports_horse_racing_kentucky_derby": true,
"phq_viewership_sports_horse_racing_preakness_stakes": true,
"phq_viewership_sports_ice_hockey": true,
"phq_viewership_sports_ice_hockey_nhl": true,
"phq_viewership_sports_mma": true,
"phq_viewership_sports_mma_ufc": true,
"phq_viewership_sports_soccer": true,
"phq_viewership_sports_soccer_concacaf_champions_league": true,
"phq_viewership_sports_soccer_concacaf_gold_cup": true,
"phq_viewership_sports_soccer_copa_america_men": true,
"phq_viewership_sports_soccer_fifa_world_cup_women": true,
"phq_viewership_sports_soccer_fifa_world_cup_men": true,
"phq_viewership_sports_soccer_mls": true,
"phq_viewership_sports_soccer_uefa_champions_league_men": true,
"phq_viewership_sports_softball": true,
"phq_viewership_sports_softball_ncaa_women": true,
"phq_viewership_sports_tennis": true,
"phq_viewership_sports_tennis_us_open": true,
"phq_viewership_sports_tennis_wimbledon": true,
"phq_spend_conferences": true,
"phq_spend_expos": true,
"phq_spend_sports": true,
"phq_spend_community": true,
"phq_spend_concerts": true,
"phq_spend_festivals": true,
"phq_spend_performing_arts": true,
"phq_spend_conferences_accommodation": true,
"phq_spend_expos_accommodation": true,
"phq_spend_sports_accommodation": true,
"phq_spend_community_accommodation": true,
"phq_spend_concerts_accommodation": true,
"phq_spend_festivals_accommodation": true,
"phq_spend_performing_arts_accommodation": true,
"phq_spend_conferences_hospitality": true,
"phq_spend_expos_hospitality": true,
"phq_spend_sports_hospitality": true,
"phq_spend_community_hospitality": true,
"phq_spend_concerts_hospitality": true,
"phq_spend_festivals_hospitality": true,
"phq_spend_performing_arts_hospitality": true,
"phq_spend_conferences_transportation": true,
"phq_spend_expos_transportation": true,
"phq_spend_sports_transportation": true,
"phq_spend_community_transportation": true,
"phq_spend_concerts_transportation": true,
"phq_spend_festivals_transportation": true,
"phq_spend_performing_arts_transportation": true
}
{
"results": [
{
"date": "2025-10-08",
"phq_attendance_academic_graduation": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_academic_social": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_community": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_concerts": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_conferences": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_expos": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_festivals": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_performing_arts": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_sports": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_attendance_school_holidays": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_rank_daylight_savings": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_health_warnings": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_observances": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_public_holidays": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_school_holidays": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_politics": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_academic_session": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_academic_exam": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_rank_academic_holiday": {
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0
}
},
"phq_viewership_sports_american_football": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_auto_racing": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_baseball": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_basketball": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_boxing": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_golf": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_horse_racing": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_ice_hockey": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_mma": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_softball": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_tennis": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_american_football_ncaa": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_american_football_nfl": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_auto_racing_nascar": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_auto_racing_indy_car": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_baseball_ncaa": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_baseball_mlb": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_basketball_ncaa": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_basketball_nba": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_basketball_ncaa_women": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_golf_masters": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_golf_pga_championship": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_golf_us_open": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_golf_pga_tour": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_horse_racing_kentucky_derby": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_horse_racing_preakness_stakes": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_horse_racing_belmont_stakes": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_ice_hockey_nhl": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_mma_ufc": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_mls": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_fifa_world_cup_women": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_fifa_world_cup": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_uefa_champions_league": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_concacaf_champions_league": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_concacaf_gold_cup": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_soccer_copa_america": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_softball_ncaa_women": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_tennis_wimbledon": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
},
"phq_viewership_sports_tennis_us_open": {
"stats": {
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"avg": 1,
"median": 1,
"std_dev": 1
}
}
}
],
"count": 1,
"next": null,
"previous": null
}
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 Get ML Features.
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.
phq_attendance_academic_graduation
Academic - Graduation
phq_attendance_academic_social
Academic - Social
phq_attendance_community
Community
phq_attendance_concerts
Concerts
phq_attendance_conferences
Conferences
phq_attendance_expos
Expos
phq_attendance_festivals
Festivals
phq_attendance_performing_arts
Performing Arts
phq_attendance_sports
Sports
phq_attendance_school_holidays
School Holidays
Attended Events Impact Pattern Features
Predicted 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 Predicted Impact Patterns
phq_attendance_community_accommodation
Community accommodation impact
phq_attendance_concerts_accommodation
Concerts accommodation impact
phq_attendance_conferences_accommodation
Conferences accommodation impact
phq_attendance_expos_accommodation
Expos accommodation impact
phq_attendance_festivals_accommodation
Festivals accommodation impact
phq_attendance_performing_arts_accommodation
Performing Arts accommodation impact
phq_attendance_sports_accommodation
Sports accommodation impact
phq_attendance_community_hospitality
Community hospitality impact
phq_attendance_concerts_hospitality
Concerts hospitality impact
phq_attendance_conferences_hospitality
Conferences hospitality impact
phq_attendance_expos_hospitality
Expos hospitality impact
phq_attendance_festivals_hospitality
Festivals hospitality impact
phq_attendance_performing_arts_hospitality
Performing Arts hospitality impact
phq_attendance_sports_hospitality
Sports hospitality impact
phq_attendance_community_retail
Community Retail impact
phq_attendance_concerts_retail
Concerts Retail impact
phq_attendance_conferences_retail
Conferences Retail impact
phq_attendance_expos_retail
Expos Retail impact
phq_attendance_festivals_retail
Festivals Retail impact
phq_attendance_performing_arts_retail
Performing Arts Retail impact
phq_attendance_sports_retail
Sports Retail impact
Configuration
You can configure PHQ Attendance features using the options below.
stats
object
optional
You can optionally configure which fields are calculated for each of these features by providing the list of stats
fields you would like.
Default fields are count
and sum
.
Supported fields are:
count
sum
min
max
avg
median
std_dev
E.g.
{
"stats": [
"count",
"std_dev",
"median"
]
}
phq_rank
object
optional
Filter for events with a PHQ Rank within a certain range.
Supports the following fields:
gt
- greater thangte
- greater than or equallt
- less thanlte
- less than or equal
E.g.
{
"phq_rank": {
"gt": 50,
"lt": 80
}
}
local_rank
object
optional
Filter for events with a Local Rank within a certain range.
Supports the following fields:
gt
- greater thangte
- greater than or equallt
- less thanlte
- less than or equal
E.g.
{
"local_rank": {
"gt": 50,
"lt": 80
}
}
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.
date
string
Date in local time.
E.g. 2023-10-01
<phq_attendance_*>
object
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 count
and sum
.
E.g.
{
"stats": {
"count": 5,
"sum": 17307,
"min": 1000,
"max": 9215,
"avg": 3461.4,
"median": 2620.0,
"std_dev": 2978.810473997968
}
}
Examples
curl -X POST "https://api.predicthq.com/v1/features/?offset=0&limit=100" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @<(cat <<EOF
{
"active": {
"gte": "2019-11-16",
"lte": "2019-11-17"
},
"location": {
"geo": {
"lat": "37.78428",
"lon": "-122.40075",
"radius": "2.6mi"
}
},
"phq_attendance_conferences": {
"stats": [
"min",
"max"
]
},
"phq_attendance_sports": {
"stats": ["count", "std_dev", "median"],
"phq_rank": {
"gt": 50
}
},
"phq_attendance_concerts": true,
"phq_rank_public_holidays": true
}
EOF
)
OpenAPI Spec
The OpenAPI spec for Features API can be found here.
Guides
Below are some guides relevant to this API:
Last updated
Was this helpful?