Skip to content

Update view_charts.py - #1507

Merged
ccbogel merged 1 commit into
ccbogel:masterfrom
Salomon-Mazatlan:cosas-de-charts-2
Aug 21, 2026
Merged

Update view_charts.py#1507
ccbogel merged 1 commit into
ccbogel:masterfrom
Salomon-Mazatlan:cosas-de-charts-2

Conversation

@Salomon-Mazatlan

Copy link
Copy Markdown
Contributor
  • Word cloud: fetchone() -> fetchall(); all coded segments are now included, not just the first one per code.
  • Cumulative case bar charts: missing on in two code_av joins (SQL error with case/file filter).
  • case_text joins now use a distinct subquery (12 queries) to avoid duplicated counts.
  • Case heatmap: SELECT distinct fid (2 queries), same reason.
  • Volume bar/pie charts: ifnull(sum(...), 0) in 12 queries; codes with no codings no longer show as empty rows.
  • Hierarchy charts: or counter < 5000 -> and in 4 functions (removes ~5000 idle iterations and possible freezes).
  • Minor: missing space in ?and fid.

Note on cases: when a case has several portions assigned from the same file, charts counted each coding once per portion (e.g. 3 codings reported as 6). Fixed with distinct. One historical behavior remains: case-based charts count all codings in the whole file without checking that the segment falls within the portion assigned to the case (pos0-pos1 in case_text); if a case covers only part of a file, counts may include codings outside it. Worth a separate issue.

@ccbogel
ccbogel merged commit 7b074d2 into ccbogel:master Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants