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

🎉 Explorers in the Data Catalog #4100

Merged
merged 14 commits into from
Nov 8, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Oct 31, 2024

This became a much larger refactor than I thought it would, but I couldn't in good conscience add a bunch of forks to the already large indexExplorerViewsToAlgolia script without composing things a little more sensibly.

Changes

  • Separates record generating functions and the indexing scripts into multiple files (e.g. baker/algolia/utils/charts.ts and baker/algolia/indexChartsToAlgola.ts)
  • Refactored Explorer View indexing to add available entities, and support for CSV-based and Grapher-based charts
    • The best way to make sense of this is to start at the bottom of explorerViews.ts and go up from there
    • In summary: Get basic explorer metadata from the DB, get extra metadata from the GitCMS, prepare a "base record" for each view, enrich each base record depending on what type of view it is (indicator/grapher/csv, finalize them with a few extra processing steps
  • Adds a new indexExplorerViewsAndCharts script/index which uses the ChartHit interface (plus a new "type" enum)
    • Explorer view scores are scaled to the same range as chart scores
  • Adds support for explorer views in the data catalog
    • This probably needs a little more love now - I haven't gone over the code again since I wrote it (I think the rest of the code is ready to review, if you're feeling keen, Marcel)

@owidbot
Copy link
Contributor

owidbot commented Nov 1, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-data-catalog-explorers-algolia

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-11-01 00:27:06 UTC
Execution time: 1.15 seconds

@ikesau ikesau requested a review from marcelgerber November 2, 2024 03:15
@ikesau ikesau marked this pull request as ready for review November 2, 2024 03:33
@ikesau ikesau force-pushed the explorer-lerna-package branch 2 times, most recently from 27b84f1 to caba23c Compare November 5, 2024 15:45
@ikesau ikesau force-pushed the data-catalog-explorers-algolia branch from 830267f to 9c8d313 Compare November 5, 2024 15:54
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Really nice work here, ike!

I left a few small comments here and there, but overall this seems great.

Copy link
Member

Choose a reason for hiding this comment

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

Wow, this is really nicely done! And, also, a lot of effort!

@ikesau ikesau force-pushed the data-catalog-explorers-algolia branch from 9c8d313 to 7b805bf Compare November 6, 2024 20:30
@ikesau ikesau force-pushed the explorer-lerna-package branch from caba23c to 493a5e3 Compare November 6, 2024 20:30
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Good now, except for that you're getting an import error

@ikesau ikesau force-pushed the data-catalog-explorers-algolia branch 3 times, most recently from 9109052 to d83c236 Compare November 8, 2024 14:21
@ikesau ikesau force-pushed the explorer-lerna-package branch from 493a5e3 to 1a0110b Compare November 8, 2024 14:55
@ikesau ikesau force-pushed the data-catalog-explorers-algolia branch from d83c236 to c510e3c Compare November 8, 2024 15:22
@ikesau ikesau force-pushed the explorer-lerna-package branch from 1a0110b to 3d61b31 Compare November 8, 2024 15:22
@ikesau ikesau merged commit f04ea06 into explorer-lerna-package Nov 8, 2024
13 of 15 checks passed
@ikesau ikesau deleted the data-catalog-explorers-algolia branch November 8, 2024 16:05
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.

3 participants