Skip to content

Instantly share code, notes, and snippets.

@azbones
azbones / 2015_card.pde
Last active August 29, 2015 14:11
This is the main code for my 2015 new year's card
//This code is written in Processing which is a programming language
//for visual arts. You can download it for free at https://processing.org/
//
//Collin's attempt at modern art- exploding cherry blossoms...BOOM!
PImage img;
String[] names;
void setup(){
size(1280, 800);
smooth();
noLoop();
@thorwebdev
thorwebdev / avg_fare_amount.sql
Created December 15, 2014 20:43
These are some interesting queries you can run on this BigQuery table: https://bigquery.cloud.google.com/table/nyctaximap:dataflow.nyc_output_join_fare_distinct . The data has been aggregated using Google Cloud Dataflow. For more background information on how the data has been processed see: https://googlecloudplatform.blogspot.com
SELECT
pickup_polyId,
SUM(fare_amount)/COUNT(*) AS average_fare,
COUNT(*) AS no_of_trips
FROM
[nyctaximap:dataflow.nyc_output_join_fare_distinct]
WHERE
fare_amount!=0
GROUP BY
pickup_polyId
[
{
"name": "faceAnnotations",
"type": "RECORD",
"mode": "REPEATED",
"fields": [
{
"name": "boundingPoly",
"type": "RECORD",
"mode": "NULLABLE",
@eriwen
eriwen / new_gradle_repos.sql
Last active December 13, 2016 07:48
GitHub Archive stats for new Gradle and Maven repos over time
SELECT
CONCAT(STRING(YEAR(create_date)), LPAD(STRING(MONTH(create_date)), 2, '0')) AS create_month,
COUNT(DISTINCT project_name)
FROM (
SELECT
create_date,
LAST(SPLIT(repo_name, '/')) AS project_name -- (avoid forks)
FROM (
SELECT
repo_name,
@bostelk
bostelk / unity_product_version_count.bq
Last active February 6, 2017 16:47
Use BigQuery to find the Unity editor versions in use.
SELECT
line AS version,
COUNT(*) AS count
FROM
FLATTEN( (
SELECT
SPLIT(REGEXP_EXTRACT(content, r'm_EditorVersion: (.+)'), '\n') AS line,
FROM (
SELECT
id,

A handful of BigQuery SQL queries that you can use to analyze your own Google Analytics for Firebase data. To find out more about how they work, check out our presentation from Cloud Next 2018 (Video link to be added soon)

Please note that these scripts have been updated to make sure of the new Firebase schema, which was rolled out to Analytics products in July of 2018.

Note that none of these scripts will work out of the box -- you'll need to update the values in brackets with the names of your actual datasets, and you'll most likely also need to replace the names of events and event properties with ones that are appropriate for your app.

The contents of this gist are licensed under the Apache License, version 2.0