[Flood-It!](https://flood-it.app/) is a puzzle game available both on the [Android](https://play.google.com/store/apps/details?id=com.labpixies.flood)
and the [iOS](https://apps.apple.com/us/app/flood-it/id476943146) platforms. The app uses the standard Google
Analytics gaming app implementation through Firebase. The [`flood it`
dataset](https://console.cloud.google.com/bigquery?p=firebase-public-project&d=analytics_153293282&t=events_20181003&page=table) available through the `firebase-public-project` BigQuery
project contains a sample of obfuscated BigQuery event export data for 114 days.

## Prerequisites

- You need access to a Google Cloud project with BigQuery API enabled.
  Complete the *Before you begin* section in the [BigQuery Quickstart guide](https://cloud.google.com/bigquery/docs/quickstarts/quickstart-web-ui#before-you-begin) to
  create a new Google Cloud project or to enable the BigQuery API in an
  existing one.

- You can use the [BigQuery Sandbox mode](https://cloud.google.com/bigquery/docs/sandbox) for free with certain limitations.
  The [Free usage tier](https://cloud.google.com/bigquery/pricing#free-tier) should be sufficient to explore this dataset and run the
  sample queries. You can optionally [Enable Billing](https://cloud.google.com/billing/docs/how-to/modify-project) to go beyond the Free
  usage tier.

## Limitations

This dataset contains obfuscated data that emulates what a real world dataset
would look like from an actual Google Analytics implementation. Certain fields
will contain placeholder values including `<Other>`, `NULL`, and `''`. Due to
obfuscation, internal consistency of the dataset might be somewhat limited.

## Use the dataset

1. The Cloud Console provides an interface to query tables. You can use the
   [BigQuery UI](https://console.cloud.google.com/bigquery?p=firebase-public-project&d=analytics_153293282&t=events_20181003&page=table) to access the `flood it` dataset.

2. If the **Editor** tab isn't visible, then click **Compose new query**.

3. Copy and paste the following query into the Editor field. This query will
   show to number of unique events, users, and days in the dataset.

       SELECT
         COUNT(*) AS event_count,
         COUNT(DISTINCT user_pseudo_id) AS user_count,
         COUNT(DISTINCT event_date) AS day_count
       FROM `firebase-public-project.analytics_153293282.events_*`

4. For valid queries, a check mark will appear along with the amount of data
   that the query will process. This metric helps you determine the cost of
   running the query.  

   ![BigQuery UI showing query validation and query size](https://developers.google.com/static/analytics/bigquery/images/floodit-query-size.png)

   <br />

5. Click **Run** . The query results page will appear below the query window.  

   ![BigQuery UI showing query results](https://developers.google.com/static/analytics/bigquery/images/floodit-query-results.png)

   <br />

6. Try running some [sample queries](https://developers.google.com/analytics/bigquery/basic-queries).

## Next steps

- Learn more about the schema for [Google Analytics BigQuery event export
  schema](https://developers.google.com/analytics/bigquery/event-schema).

- Run some of the [advanced queries](https://developers.google.com/analytics/bigquery/advanced-queries) on the dataset.

- If you are not familiar with BigQuery, explore [BigQuery How-to Guides](https://cloud.google.com/bigquery/docs/how-to).

- Use [Connected Sheets](https://cloud.google.com/bigquery/docs/connected-sheets) to analyze the dataset from Google Sheets
  spreadsheet.

- [Visualize](https://cloud.google.com/bigquery/docs/visualize-looker-studio) the dataset using [Data Studio Pro](https://datastudio.google.com/).