WIP: Make proj-addre one-to-many data and load into database. #497
… the file from disk, but in the future this can be the class that checks for newly uploaded data in an online folder that admins can put data into - Adds a function to the base_project.py apiconn that uses the split address function to create a csv file of the one-to-many project to addresses. - Moves the split address function out of ingestion and into tools, since it's not used only in ingestion - Fixes bug in the MarApiConn - adds a method to query api using address string instead of generic string. Helps eliminate false positives. - Changes references to find_location to instead be find_addr_string to eliminate false positives TODO - Starts to add the one-to-many mapping to the create_project_subsidy_csv method for the dhcd and dchousing data sets. This is not complete so it instead breaks this code. Need to load the newly created prescat_addr.csv file into the database first and then resume coding this method.
- in the section of the DHCD and DCHousing apiconn that makes the _subsidy and _project tables, it also makes an _addre table - Entity resolution in that section that checks for an existing NLHIC_id in the database now uses the _addre table, checking first for an exact address match, then looking for a fuzzy match for that address in the mar, and looking for an exact mar_id match; if neither address or mar_id matches, it assumes it's new. If any of the addresses match any of the addresses in the existing database table, it assumes the whole project matches - Adds the optional parameters to all of the ApiConn objects so that we can consistently pass database_choice to __init__, whether or not it is used - Small fix to how address splitting occurs to solve error - @jkwening would be good to check logic.