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.
0Limit the number of results.
10Receive results in JSON or CSV by specifying the appropriate Accept header. Supported values:
- application/json
- text/csv
application/jsonPossible values: Aggregation interval.
Possible values: Fields:
day(default) for daily aggregationweekfor weekly aggregation
dayPossible values: The weekday to be treated as the start of the week.
Possible values:
monday(default)tuesdaywednesdaythursdayfridaysaturdaysunday
Only applicable when interval is set to week.
mondayPossible 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-28",
"gte": "2025-10-28",
"lt": "2025-10-28",
"lte": "2025-10-28"
},
"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-28",
"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:
countsumminmaxavgmedianstd_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
}
}PHQ Impact features provide daily-level aggregated stats based on the predicted impact of an event. This takes into account complications like Impact Patterns (leading and lagging effects of an event).
Holidays and Observances Impact Pattern Features
These features include the Predicted Impact Patterns for public holidays and observances. For example, these features will show when people typically arrive and book accommodation before a holiday and if they tend to leave after the holiday. See Predicted Impact Patterns
We recommend that if you operate in the industries listed below you use the demand impact features for holidays and observances instead of the generic features as these will result in greater forecast accuracy as they include the impact before an event starts and after it finishes.
phq_impact_public_holidays
Public Holidays
N/A
phq_impact_public_holidays_accommodation
Public Holidays
Accomodation
phq_impact_public_holidays_hospitality
Public Holidays
Hospitality/Food & Beverage*
phq_impact_public_holidays_retail
Public Holidays
Retail
phq_impact_observances
Observances
N/A
phq_impact_observances_accommodation
Observances
Accomodation
phq_impact_observances_retail
Observances
Retail
phq_impact_observances_hospitality
Observances
Hospitality/Food & Beverage
phq_impact_school_holidays
School Holidays
N/A
phq_impact_academic_exam
Academic
N/A
phq_impact_academic_holiday
Academic
N/A
phq_impact_academic_session
Academic
N/A
Severe Weather Impact Features
Currently supported industries are: Retail.
phq_impact_severe_weather_air_quality_retail
Severe Weather - Air Quality
Retail
phq_impact_severe_weather_blizzard_retail
Severe Weather - Blizzard
Retail
phq_impact_severe_weather_cold_wave_retail
Severe Weather - Cold Wave - (All)
Retail
phq_impact_severe_weather_cold_wave_snow_retail
Severe Weather - Cold Wave - Snow
Retail
phq_impact_severe_weather_cold_wave_storm_retail
Severe Weather - Cold Wave - Storm
Retail
phq_impact_severe_weather_dust_retail
Severe Weather - Dust - (All)
Retail
phq_impact_severe_weather_dust_storm_retail
Severe Weather - Dust - Storm
Retail
phq_impact_severe_weather_flood_retail
Severe Weather - Flood
Retail
phq_impact_severe_weather_heat_wave_retail
Severe Weather - Heat Wave
Retail
phq_impact_severe_weather_hurricane_retail
Severe Weather - Hurricane
Retail
phq_impact_severe_weather_thunderstorm_retail
Severe Weather - Thunderstorm
Retail
phq_impact_severe_weather_tornado_retail
Severe Weather - Tornado
Retail
phq_impact_severe_weather_tropical_storm_retail
Severe Weather - Tropical Storm
Retail
Attended Events Impact Features
See Get ML Features
Configuration
You can configure PHQ Impact 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:
countsumminmaxavgmedianstd_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
}PHQ Spend features provide daily-level aggregated stats based on total USD we predict will be spent during events on a given day. This takes into account complications like distributing attendance across multi-day events.
You can request industry-specific features which are tuned to one of three potential industries:
Accommodation: Event spend relating to hotels and hosts for the purposes of staying at during events. Spend can extend before and after an event actually starts/ends.
Hospitality: Event spend on restaurants, food and drinks. Hotel restaurants are included in this industry.
Transportation: Ground-based transportation for the purposes of getting to and from an event. Includes public and private transport, such as taxis, rails, busses and rideshares.
phq_spend_conferences
Conferences
phq_spend_expos
Expos
phq_spend_sports
Sports
phq_spend_community
Community
phq_spend_concerts
Concerts
phq_spend_festivals
Festivals
phq_spend_performing_arts
Performing Arts
phq_spend_conferences_accommodation
Conferences - Accommodation
phq_spend_expos_accommodation
Expos - Accommodation
phq_spend_sports_accommodation
Sports - Accommodation
phq_spend_community_accommodation
Community - Accommodation
phq_spend_concerts_accommodation
Concerts - Accommodation
phq_spend_festivals_accommodation
Festivals - Accommodation
phq_spend_performing_arts_accommodation
Performing Arts - Accommodation
phq_spend_conferences_hospitality
Conferences - Hospitality
phq_spend_expos_hospitality
Expos - Hospitality
phq_spend_sports_hospitality
Sports - Hospitality
phq_spend_community_hospitality
Community - Hospitality
phq_spend_concerts_hospitality
Concerts - Hospitality
phq_spend_festivals_hospitality
Festivals - Hospitality
phq_spend_performing_arts_hospitality
Performing Arts - Hospitality
phq_spend_conferences_transportation
Conferences - Transportation
phq_spend_expos_transportation
Expos - Transportation
phq_spend_sports_transportation
Sports - Transportation
phq_spend_community_transportation
Community - Transportation
phq_spend_concerts_transportation
Concerts - Transportation
phq_spend_festivals_transportation
Festivals - Transportation
phq_spend_performing_arts_transportation
Performing Arts - Transportation
Configuration
You can configure PHQ Spend 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:
countsumminmaxavgmedianstd_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
}
}PHQ Viewership features provide daily-level aggregated stats based on the number of people who we predict will view broadcasts on a given day.
phq_viewership_sports
Sports - (All)
phq_viewership_sports_american_football
American Football - (All)
phq_viewership_sports_american_football_ncaa_men
American Footbal - NCAA Men's
phq_viewership_sports_american_football_nfl
American Football - NFL
phq_viewership_sports_auto_racing
Automotive Racing - All
phq_viewership_sports_auto_racing_indy_car
Automotive Racing - Indy Car
phq_viewership_sports_auto_racing_nascar
Automotive Racing - NASCAR
phq_viewership_sports_baseball
Baseball - (All)
phq_viewership_sports_baseball_mlb
Baseball - MLB
phq_viewership_sports_baseball_ncaa_men
Baseball - NCAA Men's
phq_viewership_sports_basketball
Basketball - (All)
phq_viewership_sports_basketball_nba
Basketball - NBA
phq_viewership_sports_basketball_ncaa_men
Basketball - NCAA Men's
phq_viewership_sports_basketball_ncaa_women
Basketball - NCAA Women's
phq_viewership_sports_boxing
Boxing - (All)
phq_viewership_sports_golf
Golf - (All)
phq_viewership_sports_golf_masters
Golf - Masters
phq_viewership_sports_golf_pga_championship
Golf - PGA Championships
phq_viewership_sports_golf_pga_tour
Golf - PGA Tours
phq_viewership_sports_golf_us_open
Golf - US Open
phq_viewership_sports_horse_racing
Horse Racing - (All)
phq_viewership_sports_horse_racing_belmont_stakes
Horse Racing - Belmont Stakes
phq_viewership_sports_horse_racing_kentucky_derby
Horse Racing - Kentucky Derby
phq_viewership_sports_horse_racing_preakness_stakes
Horse Racing - Preakness Stakes
phq_viewership_sports_ice_hockey
Ice Hockey - (All)
phq_viewership_sports_ice_hockey_nhl
Ice Hockey - NHL
phq_viewership_sports_mma
Mixed Martial Arts - (All)
phq_viewership_sports_mma_ufc
Mixed Martial Arts - UFC
phq_viewership_sports_soccer
Soccer - (All)
phq_viewership_sports_soccer_concacaf_champions_league
Soccer - CONCACAF Champions League
phq_viewership_sports_soccer_concacaf_gold_cup
Soccer - CONCACAF Gold Cup
phq_viewership_sports_soccer_copa_america_men
Soccer - COPA America Men's
phq_viewership_sports_soccer_fifa_world_cup_women
Soccer - FIFA World Cup Women's
phq_viewership_sports_soccer_fifa_world_cup_men
Soccer - FIFA World Cup Men's
phq_viewership_sports_soccer_mls
Soccer - MLS
phq_viewership_sports_soccer_uefa_champions_league_men
Soccer - UEFA Champions League Men's
phq_viewership_sports_softball
Softball - (All)
phq_viewership_sports_softball_ncaa_women
Softball - NCAA Women's
phq_viewership_sports_tennis
Tennis - (All)
phq_viewership_sports_tennis_us_open
Tennis - US Open
phq_viewership_sports_tennis_wimbledon
Tennis - Wimbledon
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:
countsumminmaxavgmedianstd_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
optiona
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
}
}PHQ Rank features provide the daily-level aggregated sum of events bucketed by PHQ Rank level (1-5).
PHQ Rank Impact Pattern Features
See the "Holidays and Observances Impact Pattern Features" under PHQ Impact in the tab above. These features cover the Accommodation, Retail, and Hospitality (Food & Beverage) industries.
We recommend that if you operate in the supported industries you use the demand impact features for holidays and observances instead of the generic features as these will result in greater forecast accuracy as they include the impact before an event starts and after it finishes.
PHQ Rank Generic Features
These are generic features that do not include Predicted Impact Patterns and should be used if you are not in one of the industries that we have impact patterns for.
phq_rank_observances
Observances
phq_rank_public_holidays
Public Holidays
phq_rank_school_holidays
School Holidays
phq_rank_academic_session
Academic - Session
phq_rank_academic_exam
Academic - Exam
phq_rank_academic_holiday
Academic - Holiday
phq_rank_daylight_savings
Daylight savings
phq_rank_health_warnings
Health Warnings
phq_rank_politics
Politics
Configuration
PHQ Rank features cannot currently be configured further. When requesting phq_rank_* features set the value as true indicating you require the default calculations.
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
}
}date
string
Date in local time.
E.g. 2023-10-01
<phq_impact_*>
object
Daily-level feature result. The structure of the result here will depend on how you configured the feature in your request.
PHQ Impact 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
}
}date
string
Date in local time.
E.g. 2023-10-01
<phq_rank_*>
object
Daily-level feature result. The structure of the result here is always the same as PHQ Rank features cannot currently be configured.
Will contain a rank_levels field which indicates the sum of matching events active on the date at each PHQ Rank level.
PHQ Rank is on a scale of 0 to 100 and the levels are bucketed as:
1- Minor (rank between 0 and 20).2- Moderate (rank between 21 and 40).3- Important (rank between 41 and 60).4- Significant (rank between 61 and 80).5- Major (rank between 81 and 100).
E.g.
{
"rank_levels": {
"1": 0,
"2": 0,
"3": 0,
"4": 2,
"5": 0
}
}date
string
Date in local time.
E.g. 2023-10-01
<phq_spend_*>
object
Daily-level feature result. The structure of the result here will depend on how you configured the feature in your request.
PHQ Spend 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
}
}date
string
Date in local time.
E.g. 2023-10-01
<phq_viewership_*>
object
Daily-level feature result. The structure of the result here will depend on how you configured the feature in your request.
PHQ Viewership 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
)import requests
data = {
"active": {
"gte": "2019-11-16",
"lte": "2019-11-27"
},
"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
}
response = requests.post(
url="https://api.predicthq.com/v1/features/",
headers={
"Authorization": "Bearer $ACCESS_TOKEN",
"Accept": "application/json"
},
params={
"offset": 0,
"limit": 100
},
json=data
)
print(response.json())from predicthq import Client
phq = Client(access_token="$ACCESS_TOKEN")
for feature in phq.features.obtain_features(
active__gte="2019-11-16",
active__lte="2019-11-27",
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_attendance_sports__phq_rank={
"gt": 50
},
phq_attendance_concerts=True,
phq_rank_public_holidays=True
):
print(feature.date, feature.phq_attendance_conferences.stats.min,
feature.phq_attendance_conferences.stats.max,
feature.phq_attendance_sports.stats.count,
feature.phq_attendance_sports.stats.std_dev,
feature.phq_attendance_sports.stats.median,
feature.phq_attendance_concerts.stats.count,
feature.phq_attendance_concerts.stats.sum,
feature.phq_rank_public_holidays.rank_levels)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?