From ebe74b640adaed5382046a49b1c2d6a48b31ebfd Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sat, 14 Jan 2023 22:03:57 +1100 Subject: Add img_dist and img_disp db tables Having separate event counts for events with images resolves some redundant server querying, and makes event count indicators moree representative. --- backend/hist_data/README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'backend/hist_data/README.md') diff --git a/backend/hist_data/README.md b/backend/hist_data/README.md index c947aa6..50108e0 100644 --- a/backend/hist_data/README.md +++ b/backend/hist_data/README.md @@ -27,6 +27,10 @@ This directory holds files used to generate the history database data.db. - `event_disp`:
Format: `id INT, scale INT, unit INT, PRIMARY KEY (id, scale)`
Maps events to scales+units they are 'displayable' on (used to make displayed events more uniform across time). +- `img_dist`:
+ Like `dist`, but only counts events with images. +- `img_disp`:
+ Like `events_disp`, but only counts events with images. - `images`:
Format: `id INT PRIMARY KEY, url TEXT, license TEXT, artist TEXT, credit TEXT`
Holds metadata for available images @@ -84,3 +88,6 @@ Some of the scripts use third-party packages: 1. Additional events can be described in `picked/events.json`, with images for them put in `picked` (see the README for details). 1. Can run `gen_picked_data.py` to add those described events to the database. + +## Generation Event Image Display Data +1. Run `gen_disp_data.py img`, which adds the `img_dist` and `img_disp` tables. -- cgit v1.2.3