<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sivan Gilead on Medium]]></title>
        <description><![CDATA[Stories by Sivan Gilead on Medium]]></description>
        <link>https://medium.com/@sivangilead?source=rss-3893781aadcc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*J767aN6gz5kKwbydj-GAQA.jpeg</url>
            <title>Stories by Sivan Gilead on Medium</title>
            <link>https://medium.com/@sivangilead?source=rss-3893781aadcc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 02:02:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sivangilead/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deck.gl, Uber’s Visualization Framework]]></title>
            <link>https://medium.com/@sivangilead/deck-gl-ubers-visualization-framework-1d960ddf9fe5?source=rss-3893781aadcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d960ddf9fe5</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Sivan Gilead]]></dc:creator>
            <pubDate>Sun, 12 Aug 2018 15:21:15 GMT</pubDate>
            <atom:updated>2020-06-17T14:21:17.431Z</atom:updated>
            <content:encoded><![CDATA[<p>Deck.gl, open sourced by Uber is a WebGL-powered data visualization framework that allows you to render a stack of visual overlays, usually over 3D surface layer maps.</p><p>It is a JavaScript library that runs on your browser that renders visualizations using the GPU.</p><p>In general you want to use this library when you are handling large sets of data in an interactive way.</p><h4>Implementing the map:</h4><p>When I started searching for location data online I came across the terms “Latitude” and “Longitude”. I had a slight idea of what these meant but I wasn’t completely sure. A quick google search led me to the following image:</p><blockquote><em>Want to read this story later? Save it in </em><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=blog&amp;utm_campaign=noteworthy&amp;utm_content=eid7"><em>Journal</em></a><em>.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*YqWTXq8DXQhewz3N2ho4Kg.gif" /></figure><p>The earth is divided into two sets of lines: Longitude lines and Latitude lines. Longitude lines stretch from the North Pole down to the South Pole. Latitude lines stretch in parallel to the Equator. Using these two sets of lines you can describe any point on earth with two numbers: a Longitude coordinate and a Latitude coordinate.</p><p>I came across an interesting dataset of NYC crime data from the NYC Open Data website: <a href="https://data.cityofnewyork.us/Public-Safety/NYC-crime/qb7u-rbmr/data">https://data.cityofnewyork.us/Public-Safety/NYC-crime/qb7u-rbmr/data</a></p><p>The data is available at the following URL as a CSV file: <a href="https://data.cityofnewyork.us/resource/57mv-nv28.csv">https://data.cityofnewyork.us/resource/57mv-nv28.csv</a></p><p>A link in the NYC Open Data website led me to find an API where you can filter and transform this data. This is called Socrata Open Data API or <a href="https://dev.socrata.com/docs/queries/">SODA</a> for short. With Socrata you can add SQL-like query parameters on the url. Here is a table that demonstrates the various query parameters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zRiv1JuVX23HwmuYVsaXA.png" /></figure><p>By experimenting with different parameters I managed to get a csv of lat/lng coordinates of Grand Larceny incidents in NYC that occurred after 2017–01–01:</p><p><a href="https://data.cityofnewyork.us/resource/57mv-nv28.csv?$select=longitude,latitude&amp;$where=ofns_desc=%27GRAND%20LARCENY%27%20AND%20cmplnt_fr_dt%3E%272017-01-01%27&amp;$limit=50000">https://data.cityofnewyork.us/resource/57mv-nv28.csv?$select=longitude,latitude&amp;$where=ofns_desc=%27GRAND%20LARCENY%27%20AND%20cmplnt_fr_dt%3E%272017-01-01%27&amp;$limit=50000</a></p><p>In the library examples you can find a map that shows us the road accidents in London: <a href="https://github.com/uber/deck.gl/tree/6.0-release/examples/website/3d-heatmap">https://github.com/uber/deck.gl/tree/6.0-release/examples/website/3d-heatmap</a></p><p>We will fork this repository and use the 3d-heatmap as a template and plug in our new data.</p><p>In order to get this to work we will need to change a few things:</p><ol><li>Generate a new mapbox token from here: <a href="https://www.mapbox.com/install/">https://www.mapbox.com/install/</a></li><li>Change the INITIAL_VIEW_STATE to show us NYC instead of England. These are the parameters I used:</li></ol><pre>export const INITIAL_VIEW_STATE = {<br>  longitude: -73.958917,<br>  latitude: 40.731437,<br>  zoom: 11.5,<br>  minZoom: 9,<br>  maxZoom: 15,<br>  pitch: 20.5,<br>  bearing: 0<br>};</pre><p>The longitude and latitude is a point in Manhattan. The zoom parameters needed to be changed because the default view was zoomed out too far.</p><p>3. I changed the following parameters in the_renderLayers() function:</p><p>3.1. I lowered the hexagon radius from 1000 to 20.</p><p>3.2. I decreased the maximum elevationRange from 3000 to 250. It was difficult to see the map when the hexagon’s were very tall.</p><p>3.3 I added colorDomain: [0, 50] which makes the red colors (higher incidents) stand out more.</p><p>And there you have it. This is what the map looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YMrnoW1qezA032gpaM9Q5w.png" /><figcaption>NYC Grand Larceny incidents after Jan 1, 2017</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ybB0oMzSQaLRPoIIO-AbA.png" /><figcaption>The same view zoomed on Midtown Manhattan</figcaption></figure><p>By looking at this map its easy to see that Koreatown suffers from the most Grand Larceny incidents. Hell’s Kitchen is another neighborhood with a fair amount of crime. This visualization helps us extract those insights. It might not have been that easy to do that by looking at the data directly.</p><p><strong>You can view the visualization here:</strong> <a href="https://crime-map-nyc.herokuapp.com/">https://crime-map-nyc.herokuapp.com/</a></p><p><strong>Github Link:</strong> <a href="https://github.com/sivangilead/crimeMap">https://github.com/sivangilead/crimeMap</a></p><p>📝 Save this story in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://usejournal.com/newsletter/noteworthy-in-tech/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d960ddf9fe5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>