Where to Find a Clean Restaurant in San Francisco

Posted on Feb 9, 2018

The skills the authors demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Introduction

The Department of Public Health in San Francisco conducts unannounced inspections of restaurants at least once a year. It checks food handling, food temperature, personal hygiene, and vermin control and gives restaurants inspection scores. Unlike New York City, where the higher the letter, the worse the score, in San Francisco, the higher inspection score means indicates  more sanitary conditions. My purpose of developing this shiny app is to help the users find clean restaurants in San Francisco.

The inspection data used was obtained from Kaggle.com. The dataset contains the name, address, zip code, phone number and inspection score of each inspected restaurant in San Francisco.

Overview

1. Find clean restaurants by inspection score and emoji

On the first map, I categorized the restaurants by their inspection score and added them to the map. To show the restaurant score at a glance, I opted for emojis. My first idea was to plot restaurants using different colors to represent different categories of inspection score. However, I changed my mind after noticing that users may have their own preconceptions about what colors means. I saw a map online  that  used blue and red to represent clean and unclean. When I first looked at that map, I thought blue markers represented the clean restaurants and red markers represented unclean restaurants. When I realized that the author intended it the other way around, I thought that in order to avoid possible confusion, I would use graphic icons to represent restaurant rankings rather than colors.

The restaurant with an inspection score between 100 and 90 is thumbs-up, meaning that that is a very clean restaurant. When you zoom in on the map, you will see the name, address, score and phone number, in case you plan to make a reservation. I used a smiley face to represent restaurants with score between 89 and 80, which means that this place is clean enough to eat in. For restaurants with score 79 to 70, I used fearful face, meaning that you should probably not go there. For restaurants with score below 70, I used vomiting face, which is pretty intuitive and self-explanatory representation of why you should never go to those restaurants.

2. Find clean restaurants by zip code

On the second map, I grouped the restaurants by their zip code. Knowing what restaurants are available to you is one consideration when moving to a new neighborhood. When you use my app, simply select the zip code; it will show you how many restaurants have thumbs-up, smiley face, fearful face, and vomiting face. In fact, you can get the exact number of restaurants in each category from the info boxes.

3. Top five most and least sanitary foodie streets in San Francisco

On the third map, I plotted the top five most sanitary foodie streets and the five least sanitary foodie streets in San Francisco. To do this, I grouped the restaurants by their street name and took the median of restaurants’ inspection scores for each street. Using this map, it is very easy to find the most sanitary foodie streets and the least sanitary foodie streets. If you were to hang out with your friends in San Francisco on a Friday night, you wouldn’t want to go to a street that is full of unclean restaurants, right?

This is my app, if you would like to find a nice, clean restaurant in San Francisco, please use this app.

See my Shiny App here.

About Author

Xiaoyu Yang

Xiaoyu received his Ph.D. in Pharmaceutical Sciences from North Dakota State University. For his research, he designed and conducted a variety of experiments to improve current treatments for pancreatic cancer. He developed his interest in math and statistics...
View all posts by Xiaoyu Yang >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI