Skip to content

bigfunctions > explore_events

explore_events

Call or Deploy explore_events ?

✅ You can call this explore_events bigfunction directly from your Google Cloud Project (no install required).

  • This explore_events function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

explore_events(events_table, max_minutes_between_events)

Description

Show events (WORK IN PROGRESS)

See the result as a data visualization in BigQuery Console!

The result of this function can be vizualized as an html report directly in BigQuery Console!

  1. Install this bookmarklet: bigfunctions (it has to be done only once)
  2. Open BigQuery console
  3. Click on the installed bookmarklet.
    • From now on, the bookmarklet code will observe the BigQuery console page.
    • If a BigQuery result appears with a unique cell containing html content, it will be rendered.
  4. You will have to click on the bookmarklet again:
    • If you refresh the Bigquery console page,
    • If you open the BigQuery console in a new tab of your browser.
  5. Run the query of the example and open the result of the latest subquery. The result will be shown as a nice html content.


bookmarklet usage

Examples

call bigfunctions.eu.explore_events("bigfunctions.eu.natality.weight_pounds");
select html from bigfunction_result;
call bigfunctions.us.explore_events("bigfunctions.us.natality.weight_pounds");
select html from bigfunction_result;
call bigfunctions.europe_west1.explore_events("bigfunctions.europe_west1.natality.weight_pounds");
select html from bigfunction_result;
Need help using explore_events?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using explore_events?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

This function, explore_events, aims to visualize events data from a BigQuery table. Although marked as "WORK IN PROGRESS", the documentation suggests it's designed to display event sequences, possibly with a focus on the time elapsed between events.

Here's a potential use case:

Analyzing User Journeys on a Website:

Imagine you have a BigQuery table storing website event data. Each row represents an event with columns like:

  • user_id: Identifier for the user.
  • event_timestamp: Timestamp of the event.
  • event_name: Name of the event (e.g., "page_view", "add_to_cart", "purchase").
  • page_url: The URL of the page visited (for page_view events).
  • product_id: The ID of the product added to cart or purchased.

You could use explore_events to visualize common user journeys. By providing the table name and a max_minutes_between_events parameter (e.g., 60 minutes), the function could:

  1. Group events by user_id and order them by event_timestamp.
  2. Identify sequences of events within the specified time window. For instance, if a user views a product page, adds the product to their cart, and purchases it within an hour, that would be considered a single journey.
  3. Generate a visualization of these journeys. This could be a Sankey diagram, a funnel chart, or another suitable representation, showing the flow of users through different event sequences. The documentation suggests HTML output, likely embedding JavaScript libraries like Chart.js or Google Charts.

This would help you understand:

  • Typical user behavior: What are the most common paths users take on your website?
  • Drop-off points: Where do users abandon their journey? For example, are many users adding items to their cart but not completing the purchase?
  • Effectiveness of website elements: Does a particular page design or call-to-action lead to more conversions?

Other potential use cases:

  • Analyzing customer interactions with a mobile app: Similar to the website example, you can track events like app installs, feature usage, in-app purchases, etc.
  • Understanding patient journeys in healthcare: Track events like appointments, diagnoses, treatments to identify common pathways and potential areas for improvement.
  • Monitoring IoT device activity: Visualize event sequences from connected devices to detect anomalies or patterns.

It's important to note that the function's output and specific capabilities are not fully detailed in the provided documentation. The examples given don't offer much insight into the actual visualization produced. Therefore, the exact implementation and usefulness depend on the final functionality of this "WORK IN PROGRESS" function.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on