VULCAN VEIL Analyst's AI workbench

Docs · Desktop · Projects

An aoristic map

A burglary found in the morning happened some time in the night, so when it happened is uncertain. Aoristic analysis spreads each crime over the hours between its begin and end time, instead of piling it on the hour it was reported. The data is a library of crimes in Dallas, TX, each with its begin and end time, from the copy of the city's open data that comes with crimepy. A data connection's lakehouse works the same way.

Follow along: download dashboards.zip (4.7 MB) and unzip it. Add the files in its dallas folder to a library, then include the library in a project.

Expand

1. Put the data in a library

Add the data files to a library: each becomes a table in the library's DuckDB file, with a profile the assistant reads. Here, Dallas crime: the city's crimes, each with the begin and end of the time it may have happened in, and the city's outline. A data connection's lakehouse works the same way. Then include it in a project with the Explorer's + Library.

The Dallas crime library with its tablesExpand

2. Let the assistant work

Open the project and press Sandbox locked. Turn on Accept assistant edits automatically, so it can write the dashboard's files, and Assistant-run Python, so it can look at the data first.

The Sandbox panel with Assistant-run Python and Accept assistant edits automatically onExpand

3. Ask for the dashboard

Say what to show and from which data. Here: "Make an aoristic map from the Dallas crime library for the crimes whose time is uncertain (burglary, larceny, motor vehicle theft, and vandalism): a line plot by hour of day with a line for each day of the week, an hour of day by day of week heat map I can click, a way to choose which of those crimes to include, and a map of where they happened weighted by the hours I pick. Title it Aoristic map." The dashboards skill gives the assistant the method and a whole example to work from.

The assistant looking at the data before it writes the dashboardExpand

4. Read what it made

It writes the page (an HTML file with its styles and its JavaScript) in a folder under dashboards. After each write the app opens the page in its tab and sends the assistant what failed and a picture of how it looks, so it fixes what it sees before it finishes. Then it says what each part shows.

The assistant's summary of the dashboard it wroteExpand

5. Open the dashboard

The page is index.html in the Explorer. It opens as a live dashboard: the page runs its SQL on the DuckDB file in the app, so the data never leaves this computer.

The dashboard open in the projectExpand

6. Undock it

Press the arrow on the file's tab to move the dashboard into a window of its own, then maximize it or drag it to another screen.

The dashboard in its own maximized windowExpand

7. Choose the crimes

Tick the crimes to include: the lines, the heat map, and the map show only those ticked.

The aoristic map for some of the crimesExpand

8. Click an hour

Click a cell of the heat map to pick that hour of that day, then look at the map: it shows where those crimes happened, each counting the share of its window that falls in that hour.

The map weighted for one hour of one dayExpand

Good to know

  • Each crime counts 1 in all, spread evenly over its window: one stolen between 8 pm and 8 am counts 1/12 in each of those hours. A crime whose window is longer than a week counts the same in every hour of the week, as crimepy's aoristic functions do.
  • A table with only the time a crime was reported has no window to spread over. The skill then counts crimes at that hour and says so.
  • Each run is a little different: the assistant writes its own page each time, so yours will not look exactly like this one.
  • The dashboard is drawn on this computer, in a sandboxed page that reads only the project's files, the app's own copies of D3, Leaflet, and DuckDB, and Esri's map tiles. It cannot send anything anywhere.
  • With a data connection, the page opens the connection's lakehouse by its name, and the connection's scheduled update keeps it fresh: Reload shows the new data.
  • After the assistant writes the page, the app opens it in its tab, tells the assistant what failed or drew nothing, and, for a model that reads images, sends it a picture of the tab. The picture is the app's own screenshot of its window, cut to the dashboard: nothing else on the screen is in it.
  • The crimes come from the City of Dallas's open data, as crimepy carries them.