Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table columns #154

Merged
merged 5 commits into from
Oct 31, 2023
Merged

Update table columns #154

merged 5 commits into from
Oct 31, 2023

Conversation

brianlove
Copy link
Contributor

Update table column definitions to match the latest data, including notes about needed information/data where applicable.

Closes #92

@brianlove brianlove requested a review from jmelot October 20, 2023 15:54
@brianlove brianlove self-assigned this Oct 20, 2023
@github-actions
Copy link

github-actions bot commented Oct 20, 2023

No need for rebasing 👍
behind_count is 0
ahead_count is 5

@github-actions
Copy link

github-actions bot commented Oct 20, 2023

JavaScript Coverage

Summary

Lines Statements Branches Functions
Coverage: 61%
61.77% (299/484) 50.25% (99/197) 63.58% (103/162)
Modified Files • (61%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files61.7750.2563.5861.79 
components56.9250.9356.4556.87 
   CellStat.jsx100100100100 
   HeaderSlider.jsx86.661007585.7159–60
   ListViewTable.jsx82.5360.990.983.05169, 171–174, 200–201, 206–209, 260, 290–304, 321–328, 343, 436, 467, 502, 504–505
static_data83.877587.582.75 
   table_columns.js86.27587.585.18127–129, 163

Update table column definitions to match the latest data

Closes #92
Add column definitions for remaining requested columns, adding notes
about what is still needed (where relevant)
Updated tests to reflect the new selection of initial columns.

Commented out the group selector test since that interface will be
changing substantially in #94 and was impacted by the UI Components
update.
Update row filtering to account for growth columns, which can have
negative values.  Updated column generation to prevent columns with
similar keys from interfering with each other.
@jmelot jmelot force-pushed the 92-adjust-available-columns branch from a6d8b4a to 2b9372f Compare October 30, 2023 16:30
@brianlove brianlove force-pushed the 92-adjust-available-columns branch 3 times, most recently from 0439dc0 to 993c151 Compare October 30, 2023 18:04
Copy link
Member

@jmelot jmelot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, found one small bug

@@ -64,7 +64,7 @@ describe("ListView", () => {
}, 90000);
});

describe('groups', () => {
describe.skip('groups', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why skip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the data update would have necessitated an update to the group selection test here, but that group selection interface will be changing entirely in #156, I opted to just disable the old test.

((_val, row) => {
const data = row.articles.all_publications;
const startVal = data.counts[startArticleIx];
return Math.round((data.counts[endArticleIx] - startVal) / startVal * 1000) / 10;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle 0 startVal

Screenshot 2023-10-31 at 11 17 27 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's one of the questions from #92 (comment):

  • 5-year growth in papers

I can calculate the growth rate, but then we wouldn't have rankings. If we want rankings in this column (and the similar patents column) then this stat should be pre-calculated and included in the data

Related question: how should infinite growth be handled (i.e. 0 papers in the start year, and some number >0 in the end year)? Right now these rows say "Infinity%".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh sorry I missed that. Ok, let's just merge this and I'll come back to it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll pre-calculate this for you and include the rank

@jmelot jmelot merged commit fc3ae94 into version2 Oct 31, 2023
9 checks passed
@jmelot jmelot deleted the 92-adjust-available-columns branch October 31, 2023 16:21
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