minkimcello / landscape3

Landscape 3.0
0 stars 0 forks source link

Create plugin for cncf stats #16

Closed minkimcello closed 2 months ago

minkimcello commented 6 months ago

landscape2 has a stats page. It looks like the stats are generated in this rust script but I don't think our stats page needs to include all the stats that they generate (at least for now).

We can start with distribution my maturity and distribution by category, subcategory:

Projects Tab
Members Tab

With the stats that we generate, we have the data available to also create this Projects graph:

Screenshot 2024-01-10 at 3 20 14 PM

But MUI v4 doesn't offer a graph so we'd have to search for a separate react library. I don't know if it's worth spending time looking into it. The sketches above I think is enough for this issue.

I think we'll want to create a new script in landscape-yaml-parser to create the stats (similar to the way they're doing it) and call it in github actions alongside the other functions (see #15). And once the stats are generated in its own file, we can just read off of it in the plugin via app-config. :warning: Looks like most of the stats we need are already in landscape_stats.json:

But it doesn't include all the stats we need. We'll need to modify generateStats to include parent category information in the subcategory breakdown. So instead of

  {
    "subcategoryBreakdown": {
      "subcategory-A": 1,
      "subcategory-B": 2,
      "subcategory-C": 4,
    }
  }

it'll be

  {
    "subcategoryBreakdown": {
      "parentCategory-A": {
        "subcategory-A": 1,
      },
      "parentCategory-B": {
        "subcategory-B": 2,
        "subcategory-C": 4,
      },
    }
  }

Checklist

minkimcello commented 5 months ago

@aq1e I updated the issue with more details. Let's do this one together? Do you want to modify generateStats and I'll start creating the plugin. I'll create the tabs/routes and wire it up to read data from config and from there you can make it look pretty. In the sketches I kept it similar to what's in landscape2's stats page but you can get creative and take it in a different direction if you'd like.