How To · · 3 min read

Evidence.dev for BI as code

Evidence is an open-source framework with a code-driven approach, enabling the creation of nice data products through SQL and modern web practices, ideal for data professionals.

Evidence.dev for BI as code

In this article we are going to be using https://evidence.dev as the framework of choice. Evidence covers all concepts that are important for any "BI as code" alternative so it is a good candidate to start your journey with.

What is Evidence?

Evidence is an innovative open-source framework designed for building data products directly with SQL. It stands out as a code-driven alternative to traditional drag-and-drop Business Intelligence (BI) tools, catering to the creation of reports, decision-support tools, and embedded dashboards. Unlike conventional BI software that often results in slow and cumbersome outputs, Evidence aims to empower users to produce data products that resemble the polished data journalism of the New York Times rather than a typical dashboard. It achieves this by blending the best features of modern web frameworks with the strengths of BI tools, offering code-driven workflows, first-class text support, programmatic features, high performance, and a lightweight setup process.

Who Might Benefit from Using Evidence?

Evidence is particularly beneficial for data analysts, data scientists, and developers who are looking to build high-quality data products without the limitations of traditional BI tools. It's an excellent choice for those who prefer a code-driven approach, allowing for greater flexibility, customization, and integration with version control systems. Businesses seeking to enhance their data reporting and visualization capabilities will also find Evidence valuable, as it enables the creation of more insightful, context-rich, and interactive data products. Plus the full client is open sourced, so u can start building and using apps for free.

How to Setup and Use Evidence?

Setting up and using Evidence is straightforward, thanks to its lightweight setup process. Here's a quick guide to get you started:

  1. Install Evidence: The easiest way to begin with Evidence is through the VSCode Extension. Install it from the VSCode Marketplace, open the Command Palette (Ctrl/Cmd + Shift + P), and enter "Evidence: New Evidence Project". Click "Start Evidence" in the bottom status bar to install required dependencies and start the Evidence server. A browser window should automatically open with your app preview.
  2. Make Changes: You can start building your data product by editing markdown files. Save the file to see updates in your browser window. The template project contains a tutorial on how to use Evidence effectively.
  3. Connect Data Sources: Evidence supports a wide range of data sources, including data warehouses, flat files, and non-SQL data sources. To connect your data sources, navigate to localhost:3000/settings in your development environment and follow the instructions to select your data source, name it, and enter the required credentials.
  4. Write Queries and Build Components: Use SQL statements within markdown files to run queries against your data sources. Evidence allows you to render charts and components using these query results. You can also use loops, if/else statements, and templated pages to generate dynamic content.

Relevant Resources to Study

To deepen your understanding and skills in using Evidence, consider exploring the following resources:

By leveraging Evidence, users can transform the way they build and present data products, making the process more efficient, flexible, and aligned with modern development practices. Whether you're a data analyst looking to elevate your reporting capabilities or a developer seeking to integrate sophisticated data visualizations into your applications, Evidence offers the tools and flexibility to achieve your goals.

In a next article we will create a data-driven app together.

Read next