This code is going to be used to scrape the UCPD Daily Incident page at a pre-determined frequency and store the incidents on a generic JSON data-store.
Added an address_correction function that clears up a lot of ambiguities for address searching. I still haven't been able to get the cross street problem fixed, but I'm gonna save that for a later time.
Checklist before requesting a review
[x] The code runs successfully.
(ucpd-incident-scraper-py3.11) michaelp@MacBook-Air-18 ucpd-incident-scraper % make correct_location
python -m incident_scraper correct-location
[nltk_data] Downloading package wordnet to
[nltk_data] /Users/michaelp/nltk_data...
[nltk_data] Package wordnet is already up-to-date!
API queries_quota: 60
1425 E. Midway Pl. (Public Way) changed to 1425 E. Midway Plaisance (Public Way)
1130 E. Midway Pl. (Park District Skating Rink) changed to 1130 E. Midway Plaisance (Park District Skating Rink)
819 E. Midway Pl. (Public Way) changed to 819 E. Midway Plaisance (Public Way)
...
Area of Midway Pl. and S. Ellis Ave. changed to Area of Midway Plaisance and S. Ellis Ave.
1111 E. Midway Pl. (Winter Garden) changed to 1111 E. Midway Plaisance (Winter Garden)
1005 E. Midway Pl. (Park Dist. Property) changed to 1005 E. Midway Plaisance (Park Dist. Property)
1130 E. Midway Pl. (Skating Rink) changed to 1130 E. Midway Plaisance (Skating Rink)
78 of 16819 had their address updated.
78 addresses were updated.
Waiting up to 5 seconds.
Sent all pending logs.
Describe your changes
Added an
address_correction
function that clears up a lot of ambiguities for address searching. I still haven't been able to get the cross street problem fixed, but I'm gonna save that for a later time.Checklist before requesting a review