dbplot allows you to make calculations of plots inside databases
Project description
dbplot
dbplot allows you to make calculations for plots inside databases.
dbplot is powered by ibis so its possible to target multiple databases that include: Postgres, MySQL, Apache Impala, Apache Kudu, BigQuery and more, also everything that ibis will support in the future such as Apache Spark.
Install
pip install dbplot
Development version:
pip install git+git://github.com/danielfrg/dbplot.git
Usage
See notebooks for examples.
import os
import ibis
import dbplot
# Connect to DB
host = os.environ.get("DBPLOT_TEST_POSTGRES_HOST", "localhost")
user = os.environ.get("DBPLOT_TEST_POSTGRES_USER", "postgres")
password = os.environ.get("DBPLOT_TEST_POSTGRES_PASSWORD")
database = os.environ.get("DBPLOT_TEST_POSTGRES_DATABASE", "nycflights13")
con = ibis.postgres.connect(host=host, database=database, user=user, password=password)
# Get a table
flights = con.table("flights")
# Plot stuff
dbplot.hist(flights, flights.dep_time, nbins=20)
Roadmap
- Automated tests
- More plots such as raster plots, line charts and more :)
Notes
Based on dbplot for R.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbplot-0.1.0.tar.gz
(11.0 kB
view hashes)
Built Distribution
dbplot-0.1.0-py3-none-any.whl
(31.5 kB
view hashes)