Skip to content

Add country code#85

Merged
pablobm merged 3 commits intomainfrom
country-code
Mar 18, 2025
Merged

Add country code#85
pablobm merged 3 commits intomainfrom
country-code

Conversation

@pablobm
Copy link
Copy Markdown
Collaborator

@pablobm pablobm commented Mar 18, 2025

This is the one other property that is trivial to add.

Open question

Should this be Option<String> or just String? In other words: should the DB column be nullable? Looking at the source data, it looks like all entries have it, so we could make it not nullable. However it's worth considering if this could come to bite us in the future, if new entries are added that don't have this detail.

After this

There are the following that should be possible to add, just not as trivially:

  • countryName: it's not in the source data, but we could map it from the country code through a manually curated list.
  • city: this looks like it can be obtained by travelling up the parent_station_id, but this has tradeoffs and different ways to do it.

I'll create separate tickets for those.

@pablobm pablobm requested review from marcoow and oliverbarnes March 18, 2025 17:34
Copy link
Copy Markdown
Collaborator

@oliverbarnes oliverbarnes left a comment

Choose a reason for hiding this comment

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

I think Option is fine

@oliverbarnes
Copy link
Copy Markdown
Collaborator

(part of #84)

@pablobm pablobm merged commit 74781a0 into main Mar 18, 2025
3 checks passed
@pablobm pablobm deleted the country-code branch March 18, 2025 19:53
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