{"id":17710,"date":"2019-12-02T22:34:50","date_gmt":"2019-12-03T03:34:50","guid":{"rendered":"http:\/\/studentwork.prattsi.org\/infovis\/?p=17710"},"modified":"2019-12-04T15:41:38","modified_gmt":"2019-12-04T20:41:38","slug":"mapping-nyc-restaurant-grades-by-household-income","status":"publish","type":"post","link":"https:\/\/studentwork.prattsi.org\/infovis\/visualization\/mapping-nyc-restaurant-grades-by-household-income\/","title":{"rendered":"Mapping NYC restaurant grades by household income"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Introduction<\/h4>\n\n\n\n<p>While browsing through the NYC OpenData website, I came across a <a href=\"https:\/\/data.cityofnewyork.us\/Health\/DOHMH-New-York-City-Restaurant-Inspection-Results\/43nn-pn8j\">dataset<\/a> that contains NYC\u2019s restaurants inspection grades. As someone that that is very fond of eating out at restaurants, I thought that this would be the perfect dataset for me to work with. The dataset includes the restaurant\u2019s name, address, type of cuisine, grade, notes of reason for grade, and other interesting characteristics. The data in the dataset is constantly updated and only active restaurants are included.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Materials<\/h4>\n\n\n\n<p>To create this map, I used <a href=\"https:\/\/carto.com\">Carto<\/a>, which is a cloud-based web mapping tool.<\/p>\n\n\n\n<p>The dataset I acquired is from this <a href=\"https:\/\/www.data.ny.gov\">NYC OpenData<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/openrefine.org\">OpenRefine<\/a> for data cleaning.<\/p>\n\n\n\n<p>Dataset from Professor Chris Sula, containing estimated average household income of NYC residents based on census tract data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method and Process<\/h4>\n\n\n\n<p>The process for creating this map was quite simple. The first thing that I needed to do was to clean my dataset. I uploaded the data into OpenRefine and deleted any restaurant that did not have a grade. I also found that there was an additional grade that was not listed on NYC OpenData description of the dataset. This grade was \u201cG\u201d and there were five restaurants with this grade that were also removed. The dataset&#8217;s description explicitly mentions that this dataset is compiled from several large administrative data system so it may contain some illogical values or errors.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2642\" height=\"1612\" src=\"https:\/\/i1.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?fit=840%2C513&amp;ssl=1\" alt=\"\" class=\"wp-image-17711\" srcset=\"https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?w=2642&amp;ssl=1 2642w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?resize=300%2C183&amp;ssl=1 300w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?resize=768%2C469&amp;ssl=1 768w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?resize=1024%2C625&amp;ssl=1 1024w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?resize=800%2C488&amp;ssl=1 800w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?resize=295%2C180&amp;ssl=1 295w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?w=1680 1680w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.16.58-PM.png?w=2520 2520w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption> Fig. 1: Screen shot of cleaned dataset uploaded to Carto<\/figcaption><\/figure>\n\n\n\n<p>The next step was to upload the dataset into Carto. I found Carto is be incredibly user-friendly while adjusting colors, pop-ups and layers. After uploading my file, I was able to adjust the colors of each grade for the restaurants as well as adding the ability to click on a restaurant and see the information about it. For the color choice for the grades, I used the same colors that are currently being used with NYC restaurant inspections for grades A, B, C, and Z. For grade P, I used red because this grade represents a restaurant that opened after previously failing inspection. For N, I used white since it has not been graded as of yet. After adjusting the color and the legend, I felt that the map did not reveal anything particularly interesting.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1750\" height=\"1718\" src=\"https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?fit=840%2C824&amp;ssl=1\" alt=\"\" class=\"wp-image-17712\" srcset=\"https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?w=1750&amp;ssl=1 1750w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?resize=300%2C295&amp;ssl=1 300w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?resize=768%2C754&amp;ssl=1 768w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?resize=1024%2C1005&amp;ssl=1 1024w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?resize=800%2C785&amp;ssl=1 800w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?resize=183%2C180&amp;ssl=1 183w, https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-02-at-9.22.51-PM.png?w=1680 1680w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption>Fig. 2: Map representing NYC restaurant inspection results<\/figcaption><\/figure>\n\n\n\n<p>I discussed with Professor Sula about examining the map with an additional layer to account for socio-economic status and he provided me an additional dataset. This dataset included average estimated household income for NYC resident based on census tract data. The dataset does not include estimates for areas such as parks or cemeteries so some areas may have restaurants but not household income. I uploaded this dataset and decided to use a color scheme gradient from light green to darker, where light green represented areas with lower household income and darker green represented areas with high household income.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Results<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-cartodb\"><div class=\"wp-block-embed__wrapper\">\n<iframe width='100%' height='520px' frameborder='0' src='https:\/\/devinsingh.carto.com\/viz\/6efc743c-6494-4d31-b57a-0899cdf8b2c0\/embed_map' allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen><\/iframe>\n<\/div><figcaption>Fig. 3: Map of NYC restaurant grades by average household income.<\/figcaption><\/figure>\n\n\n\n<p>The idea of examining restaurant grades by household income is definitely interesting, but I do think that due to the number of restaurants that are being examined, it can be difficult to pull trends out. The two most apparent trends that I have observed are:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Most NYC restaurants have a grade of A.<\/li><li>Manhattan has the densest population of restaurants.<\/li><\/ol>\n\n\n\n<p>Another observation would be that, simply due to the spread across restaurants with different grades in all areas, I would say that household income does not directly affect restaurant inspection grade. However, that it just a general claim based on what I\u2019m seeing on the current map.&nbsp;<\/p>\n\n\n\n<p>To view this map click <a href=\"https:\/\/devinsingh.carto.com\/builder\/6efc743c-6494-4d31-b57a-0899cdf8b2c0\/embed\">here.<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reflection<\/h4>\n\n\n\n<p>I enjoyed creating this map significantly more than I expected and I\u2019m a slightly disappointed that I was not able to pull out any trends as I would\u2019ve liked to. I think that this is project that I would like to dig deeper into. It would be incredibly useful to filter the map by different grade levels or income ranges. Additionally, maybe looking at different cuisine types in different areas or grades by cuisine type could reveal some intriguing findings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction While browsing through the NYC OpenData website, I came across a dataset that contains NYC\u2019s restaurants inspection grades. As someone that that is very fond of eating out at restaurants, I thought that this would be the perfect dataset for me to work with. The dataset includes the restaurant\u2019s name, address, type of cuisine,&hellip;<\/p>\n","protected":false},"author":616,"featured_media":17720,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[341,1],"tags":[111,69,31,507,508],"coauthors":[476],"class_list":["post-17710","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-maps","category-visualization","tag-carto","tag-gis","tag-maps","tag-restaurant-inspection-grades","tag-web-mapping"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/studentwork.prattsi.org\/infovis\/wp-content\/uploads\/sites\/3\/2019\/12\/Screen-Shot-2019-12-03-at-1.57.38-PM.png?fit=2126%2C1652&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paBdcV-4BE","_links":{"self":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/17710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/users\/616"}],"replies":[{"embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/comments?post=17710"}],"version-history":[{"count":5,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/17710\/revisions"}],"predecessor-version":[{"id":17795,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/posts\/17710\/revisions\/17795"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/media\/17720"}],"wp:attachment":[{"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/media?parent=17710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/categories?post=17710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/tags?post=17710"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/studentwork.prattsi.org\/infovis\/wp-json\/wp\/v2\/coauthors?post=17710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}