DISCUSS: feat: add product categories dataset #263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Maybe that's a stupid idea, but I put some efforts in thoughts about how to display product categories more authentically.
Breaking change : This PR introduces a new column in the
line-colors.csv
and is therefore conflicting to any further change. Additionally, clients might need to adjust their parsing implementation.Here is my proposal. See the changes to the README as documentation.
I already populated some sample data. Some basics such as high-speed operators who usually use a rather simple combination of operators vs. category branding as well as some more complex mapping such as S-Bahn branding in Austria with many, many different operators, logos and networks (source: Traewelldroid/traewelldroid#467). In both cases, I found the mapping of the product brand to the operator/line data rather easy and pretty intuitive.
In general, I would propose to stick as close as possible to Wikidata, @MrKrisKrisu might appreciate this. For the new dataset, Wikidata is the source of truth ; all additional data fields are only optional and should be left empty unless Wikidata is not complete or misleading (e.g. about the abbreviation and the logo [which sometimes contains the operator or bad dimensions]).
What's missing ? Well, tooling and validation. As of now, this is just data and a format. Before getting it into a beta-ish state, I'll still add tooling to generate a downloadable asset with the raw data, the sources for overrides as well as the icons either fetched from Wikidata or from the manual overrides.My idea behind is that clients might not wanna query Wikidata for each line but simply have a single asset to download an match offline. That's why #91 - yet another database, yes.TODO
svgcleaner
has been run over manual icon overridesHere open to discuss, I'm looking forwards for opinions and ideas of maybe how to improve it further.
Preview :
Fixes: #256