codeforanchorage / courtbot

Your friendly neighborhood court robot. Provides an api for getting court case information.
https://courtbot.codeforanchorage.org
ISC License
7 stars 10 forks source link

Add code to loader to ignore Header rows in data files #114

Closed brendanbabb closed 2 years ago

brendanbabb commented 2 years ago

Previously there wasn't a header row in the case files, but now we are seeing a header row since 10/26 when the court system went to fix a NULL case number.

Can we add code to ignore the header row if it appears.

brendanbabb commented 2 years ago

New info from Sharon that might change how to fix this, although we only send texts at one point in the day.


If Code for Anchorage will write a more robust data loader, let me introduce you to three new data sets to replace the ones you used before.

https://public.courts.alaska.gov/web/majic/sandbox/acs_mo_cr_case_most_recent_event_1705.csv

https://public.courts.alaska.gov/web/majic/sandbox/acs_mo_cr_case_most_recent_event_0645_addon.csv

https://public.courts.alaska.gov/web/majic/sandbox/acs_mo_cr_case_most_recent_event_1145_addon.csv

By the file name, you can tell they all include minor offense and criminal cases. The numbers represent the military hours when the snapshot is taken. Addon files populate the “is_add_on” flag to show which events are newer since the 1705 hour (5:05pm) the day before, and yet contain the complete set of all future events for criminal and minor offense cases. The “is_add_on” flag in the 1705 file will always be false.

All three files can be used independent of each other. Column headers are self-explanatory.

I think you will find these three new data sets more valuable.