CityFinder is a comprehensive tool designed to simplify the home-finding process. It empowers users to compare cities based on key metrics such as current property prices, crime rates, school quality, and property value appreciation rates. With CityFinder, users can make well-informed decisions tailored to their personal preferences and needs.
CityFinder offers two approaches for data utilization:
Step 1: Web Scraping
Utilize the web scraping script available here, which leverages Python's BeautifulSoup to collect data from NeighborhoodScout and Greatschool. Populate the provided Excel file in the repository with the city names for which you wish to gather data.
Step 2: ETL City Data
Transfer the extracted data to your server using Pentaho Data Integration. Run the transformation files available here.
Simply use the SQL dump file located in the Data folder to load pre-existing data into your connected database.
To set up CityFinder locally, follow these steps:
-
Clone the repository:
git clone https://github.com/YoungSong99/city-finder-web-app.git cd cityfinder
-
Install dependencies:
bundle install
-
Set up the database:
a. Create the database:
rails db:create
b. Create the necessary PostgreSQL extensions:
psql -d city_finder_development -c "CREATE EXTENSION IF NOT EXISTS cube;" psql -d city_finder_development -c "CREATE EXTENSION IF NOT EXISTS earthdistance;"
- Creating the cube and earthdistance extensions in PostgreSQL is necessary to calculate distances between the user's workplace and cities.
- Using
IF NOT EXISTS
in the SQL commands prevents errors if the extensions are already present.
c. Run migrations:
rails db:migrate
-
Set Up Environment Variables:
- Create a .env file in the root directory of your project.
- Add the following environment variables to the .env file:
# Secret Key for your application SECRET_KEY=YOUR_SECRET_KEY # Mapbox API Key MAPBOX_ACCESS_TOKEN=YOUR_ACCESS_TOKEN # Mailtrap Credentials MAILTRAP_USERNAME=YOUR_USERNAME MAILTRAP_PASSWORD=YOUR_PASSWORD
- Services:
- Mapbox: Sign up for Mapbox to get your access token.
- Mailtrap: Sign up for Mailtrap to get your username and password.
-
Run the application:
rails server
-
Start the Rails server:
rails server
-
Open your browser and navigate to http://localhost:3000 Follow the on-screen instructions to use the application
For detailed information on API endpoints, and usage examples, please visit our API Documentation page in the project wiki.
Encountered a bug or issue? We’ve got you covered:
- Bugs & Issues: Please report any bugs or issues by opening a GitHub Issue.
- Common Issues and FAQs: This page covers frequently asked questions and troubleshooting tips to help you resolve problems quickly.
- Questions & Suggestions: Have a question or an idea for improvement? Share your thoughts with the community in our Discussions section .
We welcome contributions to CityFinder! To contribute, please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
CityFinder is distributed under the MIT License. See the LICENSE file for more information.
If you have any questions or suggestions for improvement, feel free to contact me on LinkedIn