GithubHelp home page GithubHelp logo

pretzelai / pretzelai Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 97.0 245.14 MB

Open-source, browser-local data exploration using DuckDB-Wasm and PRQL

Home Page: https://pretzelai.github.io

License: Apache License 2.0

JavaScript 12.82% HTML 4.93% TypeScript 78.41% CSS 0.81% Shell 2.96% Dockerfile 0.06%
analytics artificial-intelligence business-intelligence businessintelligence dashboard data data-analysis data-analytics data-science data-visualization duckdb notebooks open-source prql reporting sql sql-editor sql-editor-online visualization wasm

pretzelai's Introduction

๐Ÿฅจ Pretzel

Discord License X GitHub Stars

Live deployed build: https://pretzelai.github.io

Pretzel is an open-source, offline browser-based tool for fast and intuitive data exploration and visualization. It can handle large data files, runs locally in your browser, and requires no backend setup. Pretzel makes it easy to manipulate data via visual chained data transform blocks. It's also reactive - changing a transform block in the chain automatically updates all transform blocks, and charts that follow.

demo.gif

Features

  • ๐Ÿš€ Blazing-fast performance with WebAssembly-based DuckDB and PRQL
  • ๐Ÿ” Intuitive data exploration with a visual, top-down pipeline of data transformations and visualizations
  • ๐Ÿง  AI-powered transformation block to help with fast data manipulation
  • ๐Ÿ”’ Privacy-first design: run Pretzel AI locally or host it yourself for full control over your data
  • ๐Ÿ“Š Upcoming features: Local LLM support, API calls, in-browser Python support with Pyodide, save and share workflows securely and canvas-based table rendering

Table of Contents

Demo video

Pretzel.mp4

Getting Started

Website (Easiest)

The easiest way to use Pretzel is to visit https://pretzelai.github.io

Offline standalone app

Since Pretzel doesn't have a backend, you can easily install it as a Chrome app and it will work even without internet (for those long flights!)

  1. Visit https://pretzelai.github.io in Chrome

  2. Click the install app icon

pretzel_chrome_install
  1. Now you can launch Pretzel as a standalone app. It will also work offline, though it may error if you try to use some internet feature (like the AI Block). Just close it and open it again to fix it.
pretzel_app_icon

Developers

Run locally

To run Pretzel locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/pretzelai/pretzelai.git
    
  2. Install dependencies:

    cd pretzelai
    npm install
    
  3. Start the development server:

    npm run start
    
  4. Open your browser and navigate to http://localhost:3000

Host Pretzel

To host Pretzel, follow these steps (it's just a static website!):

  1. Build the app
npm run build
  1. Upload the contents of the dist folder to your hosting. This is what you can find live at https://pretzelai.github.io

Deploy to Render

Optional configuration

  • Bug report box: Update /src/lib/config.ts with your PostHog config to let users report bugs directly on the website
  • AI Endpoint: Deploy a cloud function to provide an AI endpoint for users without an OpenAI API key. Check the cloud folder for instructions.

Implemented transformation blocks

  • Upload: accepts CSV / Excel (XLSX) files
  • Filter: string/number/date filtering including nested filters
  • Ask AI: connects to OpenAI to transform user command to SQL
  • Pivot: to create a pivot table (you can also go group-by using this - only use the Rows and Values fields)
  • Sort: sorts ascending or descending on multiple columns
  • Chart: supports line (including multi-line) charts, bar charts (grouped and stacked) and scatter plot
  • Create column: make a new column with basic math or use PRQL functions
  • Remove columns: easily add/remove columns with visual toggles
  • Table: add a table in the middle of your workflow to visualize data in a intermediate step
  • Download: export your transformed data in CSV

Known Bugs

  • Dates are sometimes parsed incorrectly - existing GH issue here
  • Table panel is slow for large datasets. We're planning on moving to a canvas-based table.
  • [Rare] Charts axes can sometimes not be ordered correctly

Please report any bugs you find in GitHub issues.

Contact

You can email us at founders [at] withpretzel [dot] com.

We also read all the feedback and bugs you report at the top left of https://pretzelai.github.io

pretzelai's People

Contributors

cassidoo avatar jakeroggenbuck avatar khareyash05 avatar mischau8 avatar nitinyadav237 avatar prasoon2211 avatar ramonverse avatar robdimarco-render avatar samarsharma2030 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pretzelai's Issues

refactor: codebase and organize interface and models into seperate directories

Hi team!
We can refactor the codebase to a large extent as size of files right now are huge and personally for me it was difficult to filter through the files
We can do the following

  1. Seperate interface and models into different functions
  2. Create directories for utilies functions and maybe declare a common directory which contain functions used by loads of repos
  3. Also utils folder is kind of less self explanatory.

There can be a lot of more changes that can be done. I would like to help on that! Thanks

Switch to Vite

CRA is not great for dev experience, switch to Vite to use native ES module imports.

Support for external API calling in new column creation

Let users create new columns from external API calls. Per user feedback:

I have a huge list of leads and want to call the Neverbounce API for each row for email validation. And then afterwards, the prospeo email enrichment API, โ€ฆ This would be a huge use case for me and a lot of other lead gen folks I know

Timestamp processing is flaky

nps_reviews.csv

On this CSV, the parse detects the timestamp string correctly and we pass this to DuckDB but duckdb seems to ignore the timestamp type. When we query the loaded table, duckdb returns floats and the type in the returned schema is also float (which parses correctly to the correct timestamp value).

Find if this is a DuckDB bug and if so, file with bug report with them.

Null literals in CSVs aren't handled properly

If in a CSV, there are values that are literally the string "null", currently, we make the assumption that the CSV has generated incorrectly and that these values should have been empty (i.e. no text between the commas)

We read these values currently as null or missing values. But there can be cases where the null literal should be parsed and stored as the string "null". Fix this.

Refactor with global state

Motivations:

  • Contributors have been struggling to understand the codebase
  • Better DX to develop new features or fix bugs

SQL / PRQL syntax highlighting

This is a feedback form user request.
Let's try to use codemirror npm i @uiw/react-codemirror

something like what we are doing for python but for SQL/PRQL
<CodeMirror minHeight="10px" theme={"light"} height="100%" className="w-full border h-[200px]" editable basicSetup={false} extensions={[ python(), minimalSetup({ syntaxHighlighting: true, }), ]} value={code} onChange={setCode} onKeyDown={handleKeyDown} />

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.