more on inconsistent counts between chart and table

04/03/16

Permalink 04:02:09 pm, by sarneil, 193 words, 125 views   English (CA)
Categories: Activity Log; Mins. worked: 300

more on inconsistent counts between chart and table

Doing a bunch more tests with the chart vs table queries. The only difference between the two seems to be the value for GROUP BY clause.
In the chart output it was GROUP BY cg.crime_group_text, YEAR(tf.trial_file_start_date)
In the table output is was GROUP BY `c`.`criminal_id`
So, in the chart output if two records had the same crime_group_text and YEAR, then they'd return only 1 result, whereas there is no chance of a criminal_id being duplicated. For example search for 8 to 14 year olds from 1730 to 1759 returns 14 hits on the chart output and 16 hits on the table output.

I modified includes/classes/Search.php.387 so that both queries use the same GROUP BY value (and ORDER BY as well just if user goes to chart and then to table they get results in same order as if they go straight to table).

At the moment the graphing is failing on the chart, but that's a separate problem I'll have to sort out. It looks like I've got a tentative solution to the problem of inconsistent numbers of results returned by the two queries.

Pingbacks:

No Pingbacks for this post yet...

Capital Trials at the Old Bailey

Simon Devereaux has approximately 10,000 records of people convicted in potentially capital cases between 1710 and 1840 in London heard at the Old Bailey court. This project will create a web-based database which will allow interested researchers and members of the public to compose queries on that data (e.g. women charged with robbery 1710-1720). It must be able to support a range of queries and produce output allowing researchers to identify trends in judicial practice over that time.

Reports

XML Feeds