From: Dan White Date: Sat, 24 Dec 2022 05:53:38 +0000 (-0600) Subject: update analysis X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=b8275dd1929c80147c62e0752f462d4ffc968620;p=scheduling-bazaar-data.git update analysis --- diff --git a/observations_analysis.sqbpro b/observations_analysis.sqbpro index f793538..77a9813 100644 --- a/observations_analysis.sqbpro +++ b/observations_analysis.sqbpro @@ -1,13 +1,4 @@ -
INSERT OR REPLACE INTO times_index - SELECT id, strftime("%s", start), strftime("%s", end) -FROM observations -WHERE strftime("%s", start) <= strftime("%s", end);CREATE VIRTUAL TABLE times_index - USING rtree(id, start, end);select observer, count(vetted_status) from observations -WHERE vetted_status = "unknown" -GROUP BY observer -ORDER BY observer;select ground_station, norad_cat_id, count(id) from observations -GROUP BY ground_station, norad_cat_id -ORDER BY ground_station, count(id);create index if not exists gs_norad +
create index if not exists gs_norad_index on observations(ground_station, norad_cat_id); create index if not exists gs_index @@ -21,7 +12,26 @@ on observations(observer); create index if not exists observer_gs_index on observations(observer, ground_station); -select observer, ground_station, count(id) from observations +CREATE VIRTUAL TABLE IF NOT EXISTS times_index +USING rtree(id, start, end); + +INSERT OR REPLACE INTO times_index +SELECT id, strftime("%s", start), strftime("%s", end) +FROM observations +WHERE strftime("%s", start) <= strftime("%s", end); +select observer, count(vetted_status) from observations +WHERE vetted_status = "unknown" +GROUP BY observer +ORDER BY observer;select ground_station, norad_cat_id, count(id) from observations +GROUP BY ground_station, norad_cat_id +ORDER BY ground_station, count(id);select observer, ground_station, count(id) from observations GROUP BY observer, ground_station ORDER BY observer, count(id) DESC, ground_station; +select ground_station, observer, count(id) from observations +GROUP BY ground_station, observer +ORDER BY ground_station, count(id) DESC, observer; +-- WIP: how many different observers have used each GS? +select ground_station, count(*) from observations +GROUP BY ground_station, observer +ORDER BY count(distinct observer) DESC, ground_station;