Omniscope Custom Views › densityscatter

Density Scatter

A scatter plot that stays readable at a million rows: the server bins the points, the view shows where they really are, and a box selects them.

Line and scatter visokio-agents

Open the demo in Omniscope Download demo.ioz Sample data: deliveries.csv Source on GitHub

Items tagged visokio-agents are community examples built by Visokio's agents, to extend Omniscope's core blocks and views with popular, specialist and more unusual use cases, and to show what anyone, people or agents, can build on Omniscope. They are tested by automated tests and were run on a real Omniscope server. They were not reviewed by Omniscope's core team, so they are not on a par with the core blocks and views, which have years of manual, functional and unit tests behind them. About

A scatter plot that stays readable at a million rows: the server bins the points, the view shows where they really are, and a box selects them.

Live: 40,000 illustrative delivery jobs, binned by the Query API into a density grid. Two fleets show up as two clouds. Hover a cell; drag a box to select those jobs.

The problem it solves

Scatter plots are the natural way to look at two measures together, and they break with real data volumes. Past a few thousand points everything overlaps into a solid blob; past a few hundred thousand the browser struggles to draw it at all. Sampling hides exactly the rare cases people are looking for.

The Density Scatter asks the Query API for counts in a two-dimensional grid and draws the grid, so it shows the true shape of very large tables quickly. In the illustrative delivery data above, two fleets appear as two distinct clouds: e-bikes on short, quick, consistent trips and vans on longer, slower, more variable ones. Colour the same grid by the share of late deliveries and the problem area appears at once, with a clear boundary where the promised time runs out:

Live: the same grid coloured by the share of late deliveries in each cell (cells with at least five jobs).

Where it earns its place

The examples below are illustrative.

Industry X and Y Colour by mean of
Logistics and delivery Distance, delivery time Late flag (late rate), rating
Property and retail Floor area, price Days on market, discount
Insurance and banking Claim or transaction amount, days to settle or hour Fraud flag, complaint flag
Manufacturing and IoT Two sensor readings Defect flag, yield
Digital and telecoms Session length, pages or data used Conversion or churn flag

How to use it in Omniscope

  1. Connect row-level data to a Report block; it can be very large, because only binned counts are queried.
  2. Add a view and choose Density Scatter, then set X axis and Y axis.
  3. Optionally set Colour by mean of a 1/0 outcome to see rates, with Minimum records per cell to hide noisy cells.
  4. Hover cells for counts; drag a box around an interesting region to select those records and inspect them in other views.
  5. Filter by segment, region or period elsewhere in the report and the grid re-bins for that subset.

Why do this in Omniscope

Data and options

Row-level data with two numeric fields; optionally a third to average.

Option What it does
X axis, Y axis The numeric fields
Colour by mean of, Minimum records per cell Rate or average per cell
Grid size, Log colour scale, Trim extreme values Binning and colour
Show marginal histograms Axis distributions

Tested with 1,000,000 records.

Tested

Box-selecting long van trips
Box-selecting long van trips
Running on the Omniscope server
Running on the Omniscope server

Reference

Fields it reads

NameTypeWhat it does
X axisFIELDNumeric field across, e.g. Distance (km)
Y axisFIELDNumeric field up, e.g. Delivery time (minutes)
Colour by mean ofFIELDOptional numeric field: each cell is coloured by its average, e.g. a 1/0 Late flag gives the late rate

Options

NameTypeWhat it does
Grid sizeNUMBERNumber of cells across each axis before rounding to tidy widths (default 80)
Log colour scale for countsTOGGLEShow sparse areas as well as dense ones
Trim extreme valuesTOGGLESet the axis ranges from the quartiles so outliers do not squash the chart
Show marginal histogramsTOGGLEHistograms of X and Y along the axes
Minimum records per cellNUMBERHide cells with fewer records (useful when colouring by a mean; default 1)

Third-party libraries