If you want to find all the references to specific topics or keywords in the City Charter but don't know which section(s) they are in.
It intakes a list of keywords and a text file of the NYC City Charter. It iterates through each line of text in the NYC City Charter to see if one of the keywords is present. If it finds one of the keywords, it records the Chapter and Section number in a table. The final output is inventory.csv
a list of all Chapter and Section numbers that contain your keyword. This will allow you to then do targeted reading of only those sections, instead of the entire document.
- Install python 3
- Install pandas
- Clone the github repository to you computer and navigate inside of it
- Update the keywords in the script according to your needs
- Run the script
python find_sections_with_keywords.py