Introducing the Forecasts API — Event-driven forecasts for precise demand planning. Fast, accurate, and easy to run.
Explore Now
LogoLogo
Visit websiteWebAppGet DemoTry for Free
  • Introduction
  • Swagger UI
  • Loop
  • System Status
  • Getting Started
    • API Quickstart
    • Data Science Notebooks
    • PredictHQ Data
      • Data Accuracy
      • Event Categories
        • Attendance-Based Events
        • Non-Attendance-Based Events
        • Unscheduled Events
        • Live TV Events
      • Labels
      • Entities
      • Ranks
        • PHQ Rank
        • Local Rank
        • Aviation Rank
      • Predicted Attendance
      • Predicted End Times
      • Predicted Event Spend
      • Predicted Events
      • Predicted Impact Patterns
    • Guides
      • Geolocation Guides
        • Overview
        • Searching by Location
          • Find Events by Latitude/Longitude and Radius
          • Find Events by Place ID
          • Find Events by IATA Code
          • Find Events by Country Code
          • Find Events by Placekey
          • Working with Location-Based Subscriptions
        • Understanding Place Hierarchies
        • Working with Polygons
        • Join Events using Placekey
      • Date and Time Guides
        • Working with Recurring Events
        • Working with Multi-day and Umbrella Events
        • Working with Dates, Times and Timezones
      • Events API Guides
        • Understanding Relevance Field in Event Results
        • Attendance-Based Events Notebooks
        • Non-Attendance-Based Events Notebooks
        • Severe Weather Events Notebooks
        • Academic Events Notebooks
        • Working with Venues Notebook
      • Features API Guides
        • Increase Accuracy with the Features API
        • Get ML Features
        • Demand Forecasting with Event Features
      • Forecasts API Guides
        • Getting Started with Forecasts API
        • Understanding Forecast Accuracy Metrics
        • Troubleshooting Guide for Forecasts API
      • Live TV Event Guides
        • Find Broadcasts by County Place ID
        • Find Broadcasts by Latitude and Longitude
        • Find all Broadcasts for an Event
        • Find Broadcasts for Specific Sport Types
        • Aggregating Live TV Events
        • Live TV Events Notebooks
      • Beam Guides
        • ML Features by Location
        • ML Features by Group
      • Demand Surge API Guides
        • Demand Surge Notebook
      • Guide to Protecting PredictHQ Data
      • Streamlit Demo Apps
      • Guide to Bulk Export Data via the WebApp
      • Industry-Specific Event Filters
      • Tutorials
        • Filtering and Finding Relevant Events
        • Improving Demand Forecasting Models with Event Features
        • Using Event Data in Power BI
        • Using Event Data in Tableau
        • Connecting to PredictHQ APIs with Microsoft Excel
        • Loading Event Data into a Data Warehouse
        • Displaying Events in a Heatmap Calendar
        • Displaying Events on a Map
    • Tutorials by Use Case
      • Demand Forecasting with ML Models
      • Dynamic Pricing
      • Inventory Management
      • Workforce Optimization
      • Visualization and Insights
  • Integrations
    • Integration Guides
      • Keep Data Updated via API
      • Integrate with Beam
      • Integrate with Loop Links
    • Third-Party Integrations
      • Receive Data via Snowflake
        • Example SQL Queries for Snowflake
        • Snowflake Data Science Guide
          • Snowpark Method Guide
          • SQL Method Guide
      • Receive Data via AWS Data Exchange
        • CSV/Parquet Data Structure for ADX
        • NDJSON Data Structure for ADX
      • Integrate with Databricks
      • Integrate with Tableau
      • Integrate with a Demand Forecast in PowerBI
      • Google Cloud BigQuery
    • PredictHQ SDKs
      • Python SDK
      • Javascript SDK
  • API Reference
    • API Overview
      • Authenticating
      • API Specs
      • Rate Limits
      • Pagination
      • API Changes
      • Attribution
      • Troubleshooting
    • Events
      • Search Events
      • Get Event Counts
    • Broadcasts
      • Search Broadcasts
      • Get Broadcasts Count
    • Features
      • Get ML Features
    • Forecasts
      • Models
        • Create Model
        • Update Model
        • Replace Model
        • Delete Model
        • Search Models
        • Get Model
        • Train Model
      • Demand Data
        • Upload Demand Data
        • Get Demand Data
      • Forecasts
        • Get Forecast
      • Algorithms
        • Get Algorithms
    • Beam
      • Create an Analysis
      • Upload Demand Data
      • Search Analyses
      • Get an Analysis
      • Update an Analysis
      • Partially Update an Analysis
      • Get Correlation Results
      • Get Feature Importance
      • Refresh an Analysis
      • Delete an Analysis
      • Analysis Groups
        • Create an Analysis Group
        • Get an Analysis Group
        • Search Analysis Groups
        • Update an Analysis Group
        • Partially Update an Analysis Group
        • Refresh an Analysis Group
        • Delete an Analysis Group
        • Get Feature Importance for an Analysis Group
    • Demand Surge
      • Get Demand Surges
    • Suggested Radius
      • Get Suggested Radius
    • Saved Locations
      • Create a Saved Location
      • Search Saved Locations
      • Get a Saved Location
      • Search Events for a Saved Location
      • Update a Saved Location
      • Delete a Saved Location
    • Loop
      • Loop Links
        • Create a Loop Link
        • Search Loop Links
        • Get a Loop Link
        • Update a Loop Link
        • Delete a Loop Link
      • Loop Settings
        • Get Loop Settings
        • Update Loop Settings
      • Loop Submissions
        • Search Submitted Events
      • Loop Feedback
        • Search Feedback
    • Places
      • Search Places
      • Get Place Hierarchies
  • WebApp Support
    • WebApp Overview
      • Using the WebApp
      • API Tools
      • Events Search
      • How to Create an API Token
    • Getting Started
      • Can I Give PredictHQ a Go on a Free Trial Basis?
      • How Do I Get in Touch if I Need Help?
      • Using AWS Data Exchange to Access PredictHQ Events Data
      • Using Snowflake to Access PredictHQ Events Data
      • What Happens at the End of My Free Trial?
      • Export Events Data from the WebApp
    • Account Management
      • Managing your Account Settings
      • How Do I Change My Name in My Account?
      • How Do I Change My Password?
      • How Do I Delete My Account?
      • How Do I Invite People Into My Organization?
      • How Do I Log In With My Google or LinkedIn Account?
      • How Do I Update My Email Address?
      • I Signed Up Using My Google/LinkedIn Account, but I Want To Log In With My Own Email
    • API Plans, Pricing & Billing
      • Do I Need To Provide Credit Card Details for the 14-Day Trial?
      • How Do I Cancel My API Subscription?
      • Learn About Our 14-Day Trial
      • What Are the Definitions for "Storing" and "Caching"?
      • What Attribution Do I Have To Give PredictHQ?
      • What Does "Commercial Use" Mean?
      • What Happens If I Go Over My API Plan's Rate Limit?
    • FAQ
      • How Does PredictHQ Support Placekey?
      • Using Power BI and Tableau With PredictHQ Data
      • Can I Download a CSV of Your Data?
      • Can I Suggest a New Event Category?
      • Does PredictHQ Have Historical Event Data?
      • Is There a PredictHQ Mobile App?
      • What Are Labels?
      • What Countries Do You Have School Holidays For?
      • What Do The Different Event Ranks Mean?
      • What Does Event Visibility Window Mean?
      • What Is the Difference Between an Observed Holiday and an Observance?
    • Tools
      • Is PHQ Attendance Available for All Categories?
      • See Event Trends in the WebApp
      • What is Event Trends?
      • Live TV Events
        • What is Live TV Events?
        • Can You Access Live TV Events via the WebApp?
        • How Do I Integrate Live TV Events into Forecasting Models?
      • Labels
        • What Does the Closed-Doors Label Mean?
    • Beam (Relevancy Engine)
      • An Overview of Beam - Relevancy Engine
      • Creating an Analysis in Beam
      • Uploading Your Demand Data to Beam
      • Viewing the List of Analysis in Beam
      • Viewing the Table of Results in Beam
      • Viewing the Category Importance Information in Beam
      • Feature Importance With Beam - Find the ML Features to Use in Your Forecasts
      • Beam Value Quantification
      • Exporting Correlation Data With Beam
      • Getting More Details on a Date on the Beam Graph
      • Grouping Analyses in Beam
      • Using the Beam Graph
      • Viewing the Time Series Impact Analysis in Beam
    • Location Insights
      • An Overview of Location Insights
      • How to Set a Default Location
      • How Do I Add a Location?
      • How Do I Edit a Location?
      • How Do I Share Location Insights With My Team?
      • How Do I View Details for One Location?
      • How Do I View My Saved Locations as a List?
      • Search and View Event Impact in Location Insights
      • What Do Each of the Columns Mean?
      • What Is the Difference Between Center Point & Radius and City, State, Country?
Powered by GitBook

PredictHQ

  • Terms of Service
  • Privacy Policy
  • GitHub

© 2025 PredictHQ Ltd

On this page
  • Use Cases
  • Relevant Industries
  • Getting Started
  • Connection with JSON File
  • Export File
  • Connect in Tableau
  • Dashboard with Event Data
  • Worksheets
  • Dashboard
  • Next steps
  • Other Connection Methods
  • Conclusion
  • Resources for Download

Was this helpful?

  1. Getting Started
  2. Guides
  3. Tutorials

Using Event Data in Tableau

Learn how to connect PredictHQ data to Tableau and build an example dashboard.

PreviousUsing Event Data in Power BINextConnecting to PredictHQ APIs with Microsoft Excel

Last updated 1 month ago

Was this helpful?

PredictHQ provides a rich repository of event data that can impact key business operations including demand forecasting and strategic planning. This tutorial demonstrates how to seamlessly integrate PredictHQ with Tableau to create dynamic visualizations, offering insights into how events may influence business trends. Follow along as we explore a quick and easy way to load a static event export as well as advice on connecting directly from data warehouses where PredictHQ data is stored.

Use Cases

Demand Forecasting, Dynamic Pricing, Workforce Optimization, Demand Analytics, Inventory Management, Event Visibility

Relevant Industries

Accommodation, Consumer Packaged Goods, Grocery and Supermarkets, Leisure, Travel and Tourism, Marketing and Advertising, Parking, Restaurants, Retail, Transportation and Delivery and Others

Getting Started

This tutorial requires access to both Tableau and PredictHQ.

  1. Tableau: The instructions provided are based on , but other Tableau products, such as Tableau Desktop, should operate similarly.

  2. PredictHQ: To download a static export of PredictHQ data, a is required.

Connection with JSON File

Tableau supports for connecting to data sources, including local files and data warehouses. This tutorial focuses on connecting to PredictHQ data via a .

Connecting via a JSON file in Tableau involves downloading a static snapshot of event data through . It is particularly useful for scenarios where real-time data updates are not essential. Ideal for quick testing or one-off analyses, this approach provides an efficient way to get started with event data in Tableau. This is a good way to try PredictHQ's data for the first time and explore how it can be useful in your business.

A JSON file export contains a structured list of events, much like a CSV export, but with better handling of nested data. While Tableau also , accessing nested data, such as , is more challenging. In contrast, Tableau's native support for JSON files simplifies the integration and manipulation of nested information, making it the preferred method for connecting PredictHQ data.

Export File

Search Events

  1. Configure Filters: Set relevant filters, such as those for category, date, and location. Once set, click 'Search'.

Example Search

Export as JSON

  1. Export Events: Once the events of interest are displayed on our WebApp's Search, click 'Export' on the right-hand side followed by 'Export Events Data'. In the dialog box that appears, select the 'JSONL' tab and then click 'Export'.

  1. Download Link: Once the export is ready, the dialog box will update with a download link. The link will also be sent via email.

  2. Save Export: Download the file and save it to a directory for later use.

For more information on using our WebApp Search and exporting files, see Guide to Bulk Export Data via the WebApp.

Connect in Tableau

Connect to File

  1. Start Tableau: Open Tableau and under 'Connect' select 'JSON file'.

  2. Locate File: Navigate to the directory where the export was previously saved. It may be necessary to change the file extension filter from 'JSON Files (*.json)' to 'All Files (*.*)' in order to see and select the JSON lines file. Click 'Open' to load the file.

Flatten Nested JSON

    1. Root Level: Typically named after the JSON file e.g. Events-Export-…

    2. Impact Patterns: Includes data related to impact patterns.

    3. Impacts: Details specific impact values for each day.

Update Data Types

Field
Correct Data Type

End Local

Date & Time

Date Local

Date

Start Local

Date & Time

State

String (Geographic Role: None)

Dashboard with Event Data

Worksheets

Chart

Folder
Field
Dialog Box

Event-Export-...

State

Filter [State]

  1. Under 'General' and 'Select from list', check active and predicted.

  2. Click 'OK'.

Notes

  • This filter is necessary unless these states have already been filtered via our WebApp Search.

Event-Export-...

Category

Filter [Category]

  1. Under 'General' and 'Select from list', check community, concerts, conferences, expos, festivals, performing-arts, sports.

  2. Click 'OK'.

Notes

  • This filter is necessary unless these categories have already been filtered via our WebApp Search.

Impact Patterns

Vertical

Filter [Vertical]

  1. Under 'General' and 'Select from list', check an industry e.g. accommodation.

  2. Click 'OK'.

Note

  • Vertical is the industry vertical associated with the impact pattern.

  • This tutorial focuses on event day impact, which is the same for all industries.

  • Choose any available industry if yours is not available.

Impacts

Date Local

Filter Field [Date Local]

  1. Select 'Range of Dates' then click 'Next'.

Filter [Date Local]

  1. Set the minimum and maximum dates to '01/05/2024' and '31/05/2024', respectively.

  2. Click 'OK'.

Notes

  • Date Local is the date in the local time zone.

Impacts

Position

Filter [Position]

  1. Under 'General' and 'Select from list', check event_day.

  2. Click 'OK'.

Notes

  • Position categorizes Date Local in relation to when the event takes place, such as before, during, or after the event.

  • While this tutorial focuses on the impact during event days, exploring impacts on other days is also encouraged.

For more information on PredictHQ event fields, see Events.

  1. Create Chart:

    1. Drag Value from 'Source Measures' to the Row shelf.

    2. Drag Date Local from 'Impacts' to the Column shelf. Then right-click on the Date Local pill and select the 'Exact Date' format.

  2. Chart Preview:

Table

  1. Create Table:

    1. Add all relevant fields to the Row shelf and ensure they are all formatted as 'Discrete' to produce the correct table. This formatting change should turn all the pills blue. For this tutorial, the following fields are considered:

Folder
Field
Notes

Impacts

Date Local

  • Right-click on the pill and select the 'Exact Date' and 'Discrete' formats.

Event-Export-...

Id

  • This is the ID of the event.

Event-Export-...

Category

Event-Export-...

Start Local

  • This is the start date of the event in the local time zone.

  • Right-click on each of the pills and select the 'Exact Date' and 'Discrete' formats.

Event-Export-...

End Local

  • This is the end date of the event iin the local time zone.

  • Right-click on each of the pills and select the 'Exact Date' and 'Discrete' formats.

Event-Export-...

Timezone

  • The local time zone.

Source Measures

Phq Attendance

  • Right-click on the pill and select the 'Discrete' format.

Source Measures

Value

For more information on PredictHQ event fields, see Events.

  1. Table Preview:

Dashboard

  1. Dashboard Preview:

Next steps

There are several ways to expand the functionality and relevance of this dashboard to your specific business needs:

  1. Incorporate Business Metrics: Integrate key metrics such as sales figures or units sold to gain a comprehensive view of how events influence business performance. Linking event impacts with sales data can help uncover high-level trends and support data-driven decision-making.

  2. Explore Impact Patterns: While this tutorial focuses on the immediate impacts of events, exploring additional impact patterns could yield deeper insights. For example, examining patterns leading up to and after events might reveal extended influences on consumer behavior or operational demands.

  3. Customize Visualizations: Enhance the dashboard with more complex visualizations like heat maps or geographic visualizations. These can offer spatial insights into where events have the most impact, assisting in regional marketing strategies and resource allocation.

Other Connection Methods

While this tutorial primarily focuses on connecting via a JSON file, other connection methods are available for those needing real-time updates or integration with other data services

Snowflake

This connection method involves accessing PredictHQ data through Snowflake’s Secure Data Share and connecting it to Tableau.

Snowflake Data Share

  1. Setup: Coordinate with your Snowflake administrator to set up a Data Share with PredictHQ.

  2. Database: Create a database from the Data Share and ensure that the necessary permissions are granted to users.

Connect to Snowflake in Tableau

  1. Connection Details: Before connecting, gather all necessary information including:

Filter for Relevant Events in Tableau

Amazon S3

This connection method involves accessing PredictHQ data through AWS Data Exchange and connecting it to Tableau.

AWS Data Exchange

  1. Setup: Subscribe to PredictHQ data on AWS Data Exchange

  2. Amazon S3: Copy the data to your specified S3 bucket. Ensure that your AWS IAM user or role has read permissions for this bucket.

Connect to Amazon S3 in Tableau

    1. AWS IAM access key for the S3 bucket.

    2. The name and AWS region of the S3 bucket.

Filter for Relevant Events in Tableau

More Common Connectors

Some other connectors commonly used with PredictHQ data include the following:

Conclusion

This tutorial has demonstrated how to connect PredictHQ data to Tableau and build a functional dashboard. This is just one way to harness the power of event data. Continue to refine and expand your dashboard to align with your business needs, maximizing the insights available and thereby enhancing strategic decision-making processes.

Resources for Download

Access our WebApp: Log in and navigate to .

To view all in San Francisco scheduled or predicted to take place in May 2024, use the following URL with pre-configured filters:

For guidance on finding the most relevant events for your business, see Filtering and Finding Relevant Events. For searches around specific locations or stores, exporting a JSON file from our WebApp is recommended.

Export Events dialog box
File extension options

For more information on connecting a local JSON file to Tableau and setting up the data source, see this .

Select Schema Levels: When the file is loaded, the 'Select Schema Levels' dialog box should automatically appear. The schema levels can also be modified by following these . To ensure the data is structured correctly for this tutorial, select the following schema levels or follow these to change the schema levels:

Schema levels to select

For more information on schema levels, see this .

Check Data Types: Tableau automatically interprets a field's data type but this is not always correct. Review and adjust the data type where necessary by following , ensuring the following fields are set correctly for this tutorial:

For more information on data types, see this .

This section will guide you through creating a simple dashboard in Tableau, featuring a time series chart of daily event impact derived from and a table listing relevant events. PredictHQ data is connected via a JSON file.

New Worksheet: and name it 'Time Series'.

Set Filters: Use filters to refine the data for events of interest only. to the Filters shelf:

Apply Filters Globally: Apply the above filters to 'all worksheets using this data source' by right-clicking each field in the Filters shelf and following these . This prevents the need to repeat configurations across multiple worksheets, ensuring consistency in data.

Update the y-axis title to 'Daily Event Day Impact' by following these .

New Worksheet: and call it 'Event Info'.

This is the .

This is the for an event.

This is the . For this tutorial, only impact on event days is considered.

Sort by descending `Value` by following these .

New Dashboard: .

Set the size of the dashboard to 'Automatic' by following these to ensure the dashboard adjusts to fit the screen it's being viewed on.

Add Worksheets: From the Sheets list, drag the Time Series sheet anywhere in the dashboard and then 'Event Info' to the right. Resize the as needed.

Set Filters: Use the Time Series worksheet as an interactive filter by following these . This allows you to click on specific dates in the chart to dynamically filter the events displayed in the table.

For more information on creating dashboards, see this .

Up-to-date Event Data: Ensure the dashboard reflects the most current data by considering connections like Snowflake or Amazon Data Exchange. These methods (see below) offer real-time updates which are essential for accommodating the dynamic nature of event data.

For more information on receiving PredictHQ data via Snowflake, see this .

for Snowflake authentication

to set up the data source.

Start Tableau: Open Tableau and connect to Snowflake by following these .

For more information on connecting to Snowflake in Tableau and setting up the data source, see this .

Configure SQL Query: Use Tableau’s custom SQL query to manage how data is brought in for subsequent analyses. For PredictHQ data, this typically involves flattening nested JSON, converting data types, and applying filters, such as category, date, and location, to filter for relevant events. See this for an example of how this query might be structured.

For more information on connecting to a custom SQL query, see this .

For more information on receiving PredictHQ data via AWS Data Exchange, see this .

Connection Details: Before connecting, gather all including:

Start Tableau: Open Tableau and connect to the S3 bucket by following these .

For more information on connecting to Amazon S3 in Tableau and setting up the data source, see this .

Configure SQL Query: Use Tableau’s custom SQL query to manage how data is brought in for subsequent analyses. For PredictHQ data, this typically involves flattening nested JSON, converting data types, and applying filters, such as category, date, and location, to filter for relevant events. See this for an example of how this query might be structured.

For more information on connecting to a custom SQL query, see this .

For more information on loading PredictHQ data into data warehouses, see this which provides an example using Google BigQuery.

See this for all connectors supported by Tableau. Once PredictHQ data is connected to a data warehouse, techniques similar to those described in this guide can be applied for querying data from these sources.

Tableau Public
PredictHQ account
various methods
JSON file
bulk exporting from PredictHQ's WebApp
supports CSV file connections
Impact Patterns
Search Events
attendance-based events
https://control.predicthq.com/search/events?category=conferences,expos,concerts,festivals,performing-arts,community,sports&place.scope=5391959&active.gte=2024-05-01&active.lte=2024-05-31&state=active,predicted&sort=phq_attendance,-start
Saved Locations
Tableau article
instructions
instructions
Tableau article
these instructions
Tableau article
Impact Patterns
Open a new worksheet
Drag the following fields
instructions
instructions
Open a new worksheet
Open a new dashboard
instructions
layout containers
instructions
Tableau article
guide
Login credentials
Server, Warehouse, Database and Schema information
instructions
Tableau article
Power BI tutorial
Tableau article
guide
necessary information
instructions
Tableau article
Power BI tutorial
Tableau article
Google BigQuery
Azure SQL Database
Amazon Redshift
guide
article
examples
event category
predicted attendance
daily impact for an event
instructions
6MB
Events-Export-San-Francisco-from-20240501-to-20240531.jsonl
JSON file
460KB
PredictHQ Example Dashboard.twbx
Tableau workbook
Time Series worksheet
Event Info worksheet
Dashboard