From 55ffd41c5a9257ea44afc3b6a44499359790c3fb Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sat, 1 Oct 2022 13:58:17 +1000 Subject: Add conversions for wikidata time data --- backend/hist_data/wikidata/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 backend/hist_data/wikidata/README.md (limited to 'backend/hist_data/wikidata/README.md') diff --git a/backend/hist_data/wikidata/README.md b/backend/hist_data/wikidata/README.md new file mode 100644 index 0000000..35dad34 --- /dev/null +++ b/backend/hist_data/wikidata/README.md @@ -0,0 +1,28 @@ +This directory holds files obtained/derived from [Wikidata](https://www.wikidata.org/). + +# Downloaded Files +- `latest-all.json.bz2`
+ Obtained from (on 23/08/22). + Format info can be found at . + +# Other Files +- `gen_events_data.py`
+ Used to generate a database holding event information from the dump. +- `offsets.dat`
+ Holds bzip2 block offsets for the dump. Generated and used by + gen_events_data.py for parallel processing of the dump. +- `events.db`
+ Generated by `gen_events_data.py`.
+ Has one table `events`: + - Columns: `id INT, title TEXT, start INT, start_upper INT, end INT, end_upper INT, fmt INT, ctg TEXT` + - Contains a Wikidata ID, Wikipedia title, start and end dates, and an event category. + - If `start_upper` is not NULL, `start` and `start_upper` denote an uncertain range of start times. + And similarly for 'end' and 'end_upper'. + - `fmt` indicates format info for `start`, `start_upper`, `end`, and `end_upper`. + - If 1, they denote a Julian date (with 0.5 removed to align with midnight). + This allows simple comparison of events with day-level precision, but only goes back to 4713 BCE. + - If 2, same as 1, but dates are preferably displayed using the Gregorian calendar, not the Julian calendar. + For example, William Shakespeare's birth appears 'preferably Julian', but Samuel Johnson's does not. + - If 3, same as 1, but 'end' and 'end_upper' are 'preferably Gregorian'. + For example, Galileo Galilei's birth date appears 'preferably Julian', but his death date does not. + - If 0, they denote a number of years CE (if positive) or BCE (if negative). -- cgit v1.2.3