Skip to content

Add state_key column#274

Closed
tordans wants to merge 1 commit intoDatenschule:mainfrom
tordans:add_state_key
Closed

Add state_key column#274
tordans wants to merge 1 commit intoDatenschule:mainfrom
tordans:add_state_key

Conversation

@tordans
Copy link
Copy Markdown

@tordans tordans commented Apr 17, 2026

Add schools.state_key migration; inject from spiders; compose ids via
make_school_id.

Made-with: Cursor
@k-nut
Copy link
Copy Markdown
Member

k-nut commented Apr 20, 2026

@tordans you only care about this for the CSV export, right? If so, I'll change the export to automatically unpack the state key from the ID, that will require far fewer changes :)

@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 20, 2026

@k-nut yes, only CSV. But I can also continue extracting them myself if this is not useful for anyone else...

@k-nut
Copy link
Copy Markdown
Member

k-nut commented Apr 20, 2026

Ok, I've changed the export script to also unpack the state and add it as the last column. You can see a preview here: https://jedeschule.codefor.de/csv-data/jedeschule-data-2026-04-20.csv Does this work for you? If so, I'll keep the change permanently. Always happy to make changes to make it easier for others to consume the data.

@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 22, 2026

Does this work for you? If so, I'll keep the change permanently. Always happy to make changes to make it easier for others to consume the data.

@k-nut yes, that works as well.

Personally I think it is a bit weird do have csv and API with different results, but maybe that is not so important ATM given the current usage and use cases.

@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 22, 2026

I will close this PR now given the different approach.

@tordans tordans closed this Apr 22, 2026
@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 23, 2026

@k-nut one thing about the name: state makes it look like this key is part of the address. However, there might be legitimate cases where a school is operated outside the state boundary, so it has a different address.

@k-nut
Copy link
Copy Markdown
Member

k-nut commented Apr 23, 2026

Ah, that's why you called it state_key 💡 How about we call it source_state or something like that in the export?

@tordans
Copy link
Copy Markdown
Author

tordans commented Apr 23, 2026

How about we call it source_state or something like that in the export?

Yes, sounds good. Could also be something related to the scraper scraper_key.

@tordans tordans deleted the add_state_key branch April 27, 2026 03:31
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