Toronto’s DineSafe Data Exploration

python
toronto
dinesafe
Author

Myles Braithwaite

Published

February 21, 2023

Exploration of Toronto’s DineSafe data set.

import pandas as pd
import numpy as np
df = pd.read_json("./data/dinesafe.json")
df.tail()
_id Rec # Establishment ID Inspection ID Establishment Name Establishment Type Establishment Address Establishment Status Min. Inspections Per Year Infraction Details Inspection Date Severity Action Outcome Amount Fined Latitude Longitude
46122 46123 46123 10577643 NaN Zhong Wei Company Food Depot 200 SILVER STAR BLVD, Unit-312 Pass 1 None None None None None NaN 43.80946 -79.29437
46123 46124 46124 10429136 104975907.0 iQ FOOD CO. Restaurant 181 BAY ST Pass 2 FAIL TO ENSURE EQUIPMENT SURFACE SANITIZED AS ... 2022-05-20 M - Minor Notice to Comply None NaN 43.64748 -79.37849
46124 46125 46125 10429136 105035491.0 iQ FOOD CO. Restaurant 181 BAY ST Pass 2 None 2022-09-08 None None None NaN 43.64748 -79.37849
46125 46126 46126 10696752 105055780.0 iQx Restaurant 55 AVENUE RD Pass 2 FOOD PREMISE NOT MAINTAINED WITH FOOD HANDLING... 2022-10-14 M - Minor Notice to Comply None NaN 43.67121 -79.39441
46126 46127 46127 10770910 105092374.0 ÉCOLE SECONDAIRE TORONTO OUEST- SNP Student Nutrition Site 330 LANSDOWNE AVE Pass 1 Fail to ensure completion of food handling tra... 2022-12-21 NA - Not Applicable Notice to Comply None NaN 43.65239 -79.44124
df[~df["Inspection ID"].notnull()]
_id Rec # Establishment ID Inspection ID Establishment Name Establishment Type Establishment Address Establishment Status Min. Inspections Per Year Infraction Details Inspection Date Severity Action Outcome Amount Fined Latitude Longitude
54 55 55 10431055 NaN 112-GARRISON CREEK FLAT GRILL Hot Dog Cart 1 BLUE JAYS WAY Pass 2 None None None None None NaN 43.64168 -79.39012
58 59 59 10417459 NaN 117-CORKTOWN FRESH BURGER Food Take Out 1 BLUE JAYS WAY Pass 2 None None None None None NaN 43.64168 -79.39012
74 75 75 10566372 NaN 132-OLD SPADINA AVENUE KOSHER Food Take Out 1 BLUE JAYS WAY Pass 2 None None None None None NaN 43.64168 -79.39012
98 99 99 10464953 NaN 1810 DANFORTH AVENUE SOCIAL CLUB Restaurant 1810 DANFORTH AVE Pass 1 None None None None None NaN 43.68467 -79.31856
167 168 168 10541993 NaN 219- THE URBAN KITCHEN Food Take Out 1 BLUE JAYS WAY Pass 1 None None None None None NaN 43.64168 -79.39012
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
45692 45693 45693 10587723 NaN YOUNG'S MILK Food Store (Convenience/Variety) 1546 WARDEN AVE Pass 1 None None None None None NaN 43.76319 -79.30151
45696 45697 45697 10252386 NaN YOUR CONVENIENCE Food Store (Convenience/Variety) 2192 GERRARD ST E Pass 1 None None None None None NaN 43.68394 -79.30146
46005 46006 46006 10186651 NaN ZAM ZAM FOODS Bakery 22 MELHAM CRT, Unit-6 Pass 1 None None None None None NaN 43.81127 -79.23989
46014 46015 46015 10601017 NaN ZAV COFFEE SHOP & GALLERY Restaurant 2048 DANFORTH AVE Pass 1 None None None None None NaN 43.68565 -79.31399
46122 46123 46123 10577643 NaN Zhong Wei Company Food Depot 200 SILVER STAR BLVD, Unit-312 Pass 1 None None None None None NaN 43.80946 -79.29437

700 rows × 17 columns

Made by Myles Braithwaite with ❤️ in Toronto.