diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-12-28 19:46:34 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-12-28 19:46:34 +1100 |
| commit | db9321ca32f283f7fd59e2e8b5f8a695c66fce98 (patch) | |
| tree | 656e6ae784773029c28d9dcf75ed308d41b6dd7a /backend/hist_data/README.md | |
| parent | 6b8d7fcda5dc884086bfb5df914e3f13dca5ac3c (diff) | |
Use scale-associated event scores for uniform spread
Add 'dist' and 'scores' db tables
Add 'scale' server query parameter (and remove 'excl')
Disregard event-end when querying database
Diffstat (limited to 'backend/hist_data/README.md')
| -rw-r--r-- | backend/hist_data/README.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/hist_data/README.md b/backend/hist_data/README.md index bfecc1e..1a832ef 100644 --- a/backend/hist_data/README.md +++ b/backend/hist_data/README.md @@ -27,9 +27,15 @@ This directory holds files used to generate the history database data.db. - `event_imgs`: <br> Format: `id INT PRIMARY KEY, img_id INT` <br> Assocates events with images -- `descs` <br> +- `descs`: <br> Format: `id INT PRIMARY KEY, wiki_id INT, desc TEXT` <br> Associates an event's enwiki title with a short description. +- `dist`: <br> + Format: `scale INT, unit INT, count INT, PRIMARY KEY (scale, unit)` <br> + Maps scale units to event counts. +- `scores`: <br> + Format: `id INT, scale INT, score INT, PRIMARY KEY (id, scale)` <br> + Maps events to score values for each scale (used to show events by popularity and uniformity across scale). # Generating the Database @@ -76,3 +82,6 @@ Some of the scripts use third-party packages: ## Remove Events Without Images/Descs 1. Run `reduce_event_data.py` to remove data for events that have no image/description. + +## Generate Distribution and Score Data +1. Run `gen_score_data.py`, which add the `dist` and `scores` tables. |
