By Sahil Raj
A recommendation system that provides recommendations based on nearest location, specialty, and rating provided by users.
This project contains a Jupyter Notebook that recommends a cook to users based on the nearest location, specialty required, and rating of the cook given by other users. This recommendation uses two datasets namely cook.csv and ratings.csv for model building.
There are two Python scripts namely getLocation.py which shows how latitude and longitude data is generated using the geopy library and get_csv_file.py which generates a CSV file named output.csv which is generated as a ratings dataset. get_csv_file.py uses numpy and pandas libraries to create a dataset.
Note: The dataset does not depict real-life data and is a result of the merging of multiple datasets and the generation of datasets using programming tools.
1. Extract the zipped file given below.
2. Open the extracted folder.
3. Open the file named "recommend.ipynb" on Jupyter Notebook or Google Collaboratory or any other preferred platform.
4. Modify the address and specialty values in the last cell of the notebook as required.
5. Execute each of the cells given in the notebook.
6. See the recommendation at the end of last cell.
recommend.ipynb
This file involves the following steps:
getLocation.py
This file uses the geopy library to provide longitude and latitude data from the given location as text.
The `geolocator`
is an object of the Nominatim
class from the `geopy.geocoders`
module, which allows you to use the OpenStreetMap Nominatim API to convert an address into latitude and longitude.
get_csv_file.py
In this script, we are using `np.random.randint`
to generate random integers. The `np.arange`
function is used to generate a sequence of increasing integers. Finally, the data frame is saved to a CSV file using `df.to_csv`.
Submitted by Sahil Raj (rajsahilcoder)
Download packets of source code on Coders Packet
Comments