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

DISCUSS: feat: add product categories dataset #263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheOneWithTheBraid
Copy link
Contributor

@TheOneWithTheBraid TheOneWithTheBraid commented Jan 2, 2025

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

  • Build tooling to generate a single asset file with the data, the sources, the Wikidata properties and the manual overrides
  • Build tooling to validate and check the new dataset
    • Validate order
    • Every manual override icon must have attribution in the icon-sources.json
    • Ensure either a Wikidata P1813 or an override shortName is present
    • Ensure either a Wikidata P154 or an override iconName, a corresponding SVG and attribution is present
    • Ensure there are no references to nonexisting brands are stated in line-colors.csv
    • Add CI job ensuring svgcleaner has been run over manual icon overrides
  • Build sample website using this data

Here open to discuss, I'm looking forwards for opinions and ideas of maybe how to improve it further.

Preview :

Sample Website preview

Fixes: #256

@marhei marhei added the needs-discussion This issue / pull request needs to be discussed. label Jan 2, 2025
@TheOneWithTheBraid TheOneWithTheBraid force-pushed the braid/product-brands branch 14 times, most recently from a6d76b9 to d965299 Compare January 3, 2025 11:17
@TheOneWithTheBraid TheOneWithTheBraid marked this pull request as ready for review January 3, 2025 11:29
@TheOneWithTheBraid TheOneWithTheBraid force-pushed the braid/product-brands branch 2 times, most recently from d7201f9 to 5a15020 Compare January 3, 2025 11:46
@jeyemwey
Copy link
Contributor

jeyemwey commented Jan 3, 2025

Hi, thank you for all your work and dedication to bring this project forward. I understand that you have put in a lot of work for the proposal and have integrated a validation tool already.

Sadly, from a trademark-rights perspective, I find it exceptionally hard to store, host and use the brand logos without explicit consent from the rights holders. It makes it maybe too easy for implementers to make apps look official when they aren't (which is one of the main riskfactors of any trademark argument: to have entities appear as someone that they aren't).

As a represent of the Träwelling org, I would warn you to be very cautious when continuing with this probe.

@TheOneWithTheBraid
Copy link
Contributor Author

Sadly, from a trademark-rights perspective, I find it exceptionally hard to store, host and use the brand logos without explicit consent from the rights holders. It makes it maybe too easy for implementers to make apps look official when they aren't (which is one of the main riskfactors of any trademark argument: to have entities appear as someone that they aren't).

Yeah, I guess that's the main issue. That's why I'd consider Wikidata as primary source of truth rather than collecting the information on ones' own - in order to avoid trademark (or in some cases copyright) issues.

I personally see no danger in providing the data - it's just a mapping from identifies used in HAFAS to Wikidata items and/or URLs ; in any case along with corresponding owner information as well as in case applicable licensing information.

My initial intention was to basically get S-Bahn logos properly displayed per region - which due to the far use might be less problematic - maybe one could revert it to that state rather than actually including mainline brands with respective trademarks as well.

@TheOneWithTheBraid TheOneWithTheBraid changed the title DISCUSS: feat: add product brand dataset DISCUSS: feat: add product categories dataset Jan 3, 2025
Signed-off-by: The one with the braid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion This issue / pull request needs to be discussed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collect public transport category theming per operator branding aside of line data
3 participants