🔬
Playgrounds Docs
  • Subgrounds
    • The Basics
      • What is Subgrounds?
      • Motivation
      • Why use Subgrounds?
      • How does Subgrounds work?
      • Use Cases
      • Subgrounds Docs
    • Tutorials
      • Subgrounds Workshop
Powered by GitBook
On this page
  • Part 1:
  • Part 2
  • Part 3
  1. Subgrounds
  2. Tutorials

Subgrounds Workshop

PreviousTutorials

Last updated 2 years ago

See a top to bottom exploration of Subgrounds in our 3 part workshop in collaboration with MetricsDAO. In this workshop we show you how to use a Python library to query and build on The Graph.

Part 1:

This session is focused on Subgrounds' core features and serve as a guide on how to start and complete data analytics using Subgrounds.

Participants can expect the following topics to be covered:

  • Intro: Motivations for Subgrounds and some GraphQL basics

  • FieldPaths: What are they and how do we combine them to create subgrounds requests?

  • subgrounds.query method: the simplest way to get data

  • subgrounds.query_df method: get data in a flattened representation, returned in a pandas DataFrame

  • subgrounds.query_timeseries method: query and return regularized timeseries data

    • Note: this is planned for the v0.1.0 release and is not yet publicly available.

  • Creating and using SyntheticFields

  • Querying non-Subgraph APIs with Subgrounds

Part 1 Resources:

Part 2

This session introduces building full featured analytics dashboards using Subgrounds built-in data visualization library called Dash. During this part, we will take a "live build" approach and create a simple klimaDAO analytics dashboard in this session. The dashboard will explore KlimaDAOs treasury and general protocol metrics.

Topics:

  • Introduction to dash and data visualizations with dash

  • The Code: Preparing Subgrounds for your data exploration

  • The Data: Interfacing Subgrounds with Dash

  • App Layout section: Building and assembling your dashboard components and layout

  • Callback: Connecting visualizations to Subgrounds queries

  • Running your app locally

  • Deploying your app to Heroku intro

Resources:

Part 3

The final session is a continuation of part two, except that rather than deploying locally to your machine, we will guide you on deploying to the cloud (Heroku), generating your unique URL, and sharing your dashboard as an app.

Topics

  • Introduction to Heroku

  • Setting up Heroku account

  • Installing Heroku CLI

  • Creating App project folder on your IDE

  • Installing necessary App project libraries

  • Create necessary files for Heroku server

  • Deploy App to Heroku

Resources:

Part 1
Part 2
Part 3
LogoGitHub - Tachikoma000/Subgrounds_visualization_with_dash: This repo provides explorations and examples of using subgrounds to build dashboards and data analytics web apps.GitHub
Repo for Subgrounds visualizations with Dash
LogoIntroduction | Dash for Python Documentation | Plotly
LogoQuickstart - dbc docs
Quickstart for Dash Bootstrap components
4MB
Subgrounds Workshop #1 Under the Hood.pdf
pdf
55KB
Subgrounds Part 1 binary.ipynb
3MB
Subgrounds Workshop #2 Building Subgrounds Powered Apps.pdf
pdf