GithubHelp home page GithubHelp logo

ixample / malloy-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malloydata/malloy-samples

0.0 0.0 0.0 77.27 MB

Malloy model examples and associated datasets

Home Page: http://www.malloydata.dev

License: MIT License

Shell 4.29% JavaScript 23.66% TypeScript 66.31% Nix 3.47% HTML 2.27%

malloy-samples's Introduction

Malloy Analysis Examples (and datasets)

This repository contains example data analysis and common patterns for expressed in Malloy. Each of the examples can be run from Notebooks. The 'patterns' are designed to be small and simple and show off how to acomplish some task. The examples are designed to show how to setup a more.

If you are reading this on Github, you can run these examples directly from your web browser.

  • Make sure you are logged into Github
  • press '.' (the period key)
  • Install the Malloy Extension

Getting Started

  • Hello World Example - A very simple example with a single table shows how to query data in Malloy

Data Analysis Patterns

  • Comparing Timeframes - There are several different ways of doing timeframe comparisons.
  • Foreign Sums - Malloy can aggregate safely anywhere in a network of joins. Example explains the different patterns.
  • Reading Nested Data - JSON, Parquet, Protobuff, log data is often a graph, not a table. Malloy can naturally read and aggregate from anywhere in this graph.
  • Percent of Total - Malloy provides 'level of detal' calculations that, among other things makes calculating percent of total easy at any level of heirachy.
  • Cohort Analysis - It is often useful to see how groups of people behave over time.
  • Nested Subtotals - With a single table we can only look at one or two perspectives at a time. With nesting, this is unlimited.
  • Other - Creating an Other Bucket - Looking at several groups and combining the rest into 'Other'.
  • Auto-bining Historgrams - In many tools, you need to fix the axis for histograms. In malloy we can dynamically figure out the approiate bucketing for the data.
  • Moving Average - Moving averages can give a better idea of trends.
  • Data from JSON API - We can use a JSON API endpoint as a data source.
  • Sessionize/Map Reduce - A common data pattern is to read events and combine them into session.
  • Dimensional Indexes - Malloy can find the most common values in your dataset.
  • Arrays - Unnesting Data - Some functions return arrays. How to work with them in Malloy.

Examples

These examples require a Google Cloud login.

Additional Resources:

malloy-samples's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.