chicago-police-violence / data

Dataset about the personnel, use of force, and complaints in the Chicago Police Department
MIT License
7 stars 0 forks source link

Remove dependency on xlsx2csv #12

Closed trevorcampbell closed 3 years ago

trevorcampbell commented 3 years ago

If I run make parse, I get

mkdir -p parsed
LOG_LEVEL=debug python3 src/parse.py parsed/P0-46360_main.csv raw/P0-46360/10655-FOIA-P046360-TRRdata.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P0-46360_discharges.csv raw/P0-46360/10655-FOIA-P046360-TRRdata.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P0-46360_members.csv raw/P0-46360/10655-FOIA-P046360-TRRdata.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P0-46360_stars.csv raw/P0-46360/10655-FOIA-P046360-TRRdata.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/16-1105.csv raw/16-1105/Kalven_16-1105_All_Sworn_Employees.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P4-41436.csv raw/P4-41436/P441436-current_and_former_CPD_employee_list_run_15_Mar_2018_by_CPD_IT-redacted_1.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P0-52262.csv raw/P0-52262/FOIA_P052262_-_11221-FOIA-P052262-AllSwornEmployeesWithUOA.xlsx
LOG_LEVEL=debug python3 src/parse.py parsed/P0-58155.csv raw/P0-58155/P058155_-_Kiefer.xlsx
xlsx2csv -n "Export Worksheet" raw/18-060-425/case_info_export.xlsx raw/18-060-425/case_info_export.csv
/bin/sh: 1: xlsx2csv: not found
make: *** [Makefile:27: raw/18-060-425/case_info_export.csv] Error 127

Now this is of course happening because I don't have xlsx2csv installed. But if I just run make which I suppose implicitly runs make link, this error doesn't pop up. I imagine that's because the link target doesn't actually use some of the targets from parse.

So then some Qs:

Either way, we should make sure that both make link and make parse work.

Thibauth commented 3 years ago

So the reason I hadn't added xlx2csv as a dependency was that my (hidden) plan was to get rid of this dependency at some point, since what it does can be implemented in about 5 lines with the other Excel dependencies, and I believe it is better to have as few dependencies as possible. This should be fixed soon.

Not completely sure about your other questions, but I believe these are separate issues, so feel free to open issues for them if you believe they are still relevant.