Use the GeoJSON format to include coordinate information.
[x] Add a utils.py file with the following functions:
neighbourhood_mapping_list:
Returns a dictionary where the keys are neighbourhood_id and the values are the corresponding neighbourhood_name.
find_neighbourhood_id(lat, long):
Accepts latitude and longitude as inputs.
Returns the neighbourhood_id that this latitude and longitude belongs to, using the GeoJSON data.
Expected Outcome
All datasets will follow a unified neighborhood naming convention based on the Toronto Police neighborhood data. The utils.py file will make it easy to retrieve neighborhood information and identify the neighborhood for any given latitude and longitude.
Standardize Neighborhood Naming Conventions
Currently, the neighborhood data used across all datasets is inconsistent. To unify the naming conventions, let's follow these steps:
Tasks:
[x] Use Toronto Police neighborhood data.
[x] Add a
utils.py
file with the following functions:neighbourhood_mapping_list
:neighbourhood_id
and the values are the correspondingneighbourhood_name
.find_neighbourhood_id(lat, long)
:neighbourhood_id
that this latitude and longitude belongs to, using the GeoJSON data.Expected Outcome
All datasets will follow a unified neighborhood naming convention based on the Toronto Police neighborhood data. The
utils.py
file will make it easy to retrieve neighborhood information and identify the neighborhood for any given latitude and longitude.Feel free to add additional details if necessary!