<?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 Sasha Kayola on Medium]]></title>
        <description><![CDATA[Stories by Sasha Kayola on Medium]]></description>
        <link>https://medium.com/@sashakayola?source=rss-763c8f7afce3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*YaRTQNo35XyK7Xm6KTTS0A.jpeg</url>
            <title>Stories by Sasha Kayola on Medium</title>
            <link>https://medium.com/@sashakayola?source=rss-763c8f7afce3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:59:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sashakayola/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[Map Layering using Mapbox GL JS + deck.gl + React]]></title>
            <link>https://medium.com/@sashakayola/map-layering-using-mapbox-gl-js-deck-gl-react-ba0ece89aaef?source=rss-763c8f7afce3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba0ece89aaef</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[deckgl]]></category>
            <category><![CDATA[mapbox]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Sasha Kayola]]></dc:creator>
            <pubDate>Mon, 20 May 2019 02:56:49 GMT</pubDate>
            <atom:updated>2019-05-20T02:59:44.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*4z8zAopPatQ-USj3.jpg" /></figure><p>Recently I worked on a team to build a progressive web app where a large component of the app was navigating users from their current location to a chosen food spot near them. We were able to accomplish this with two tools: Mapbox GL JS and deck.gl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*pSBguW5TVtmeNcaSfwGfnQ.png" /></figure><p>Mapbox GL JS is a Javascript library that uses WebGL to render maps and deck.gl is Uber’s data visualization library that is built on top of Mapbox GL. Using these in conjunction will allow you to display a map with data overlays.</p><p>One catch…Mapbox GL uses HTML canvases for a lot of its functionality. For those of you using React for your front-end, this could be an issue (React was not built to play nice with HTML canvases).</p><p>The app my team worked on used React and so we had to find another work-around if we still wanted to use Mapbox. Conveniently, Uber has another library called React-Map-Gl which serves as a React wrapper around Mapbox GL JS. Even more conveniently, React-Map-Gl integrates well with deck.gl. Phew!</p><p>Now that we know what libraries we are using, let’s start building a simple map. To do this, first npm install both deck.gl and react-map-gl. Create a basic React component and import StaticMap from react-map-gl (StaticMap is a component that will render a plain map; be sure to provide your Mapbox access token and whatever map style you would like. Note that you can create your own style on Mapbox). Next, import DeckGL.</p><pre>import React from “react”;<br>import DeckGL from “deck.gl”;<br>import { StaticMap } from “react-map-gl”;</pre><pre>export <em>class</em> SimpleMap <em>extends</em> React.Component {</pre><pre> render() {<br> }<br>}</pre><p>The next step is to add the DeckGL component which will serve as a wrapper around your static map. As you will see below, you will need to pass in an initialViewState prop to DeckGL which will serve as the starting point for your map. DeckGL will then wrap around the StaticMap component, where you will pass in your access token and map style as mentioned.</p><pre>import React from “react”;<br>import DeckGL from “deck.gl”;<br>import { StaticMap } from “react-map-gl”;</pre><pre>export <em>class</em> LayeredMap <em>extends</em> React.Component {</pre><pre>render() {<br>  return (<br>  &lt;<em>React.Fragment&gt;<br>   </em>&lt;<em>DeckGL<br>    </em>initialViewState={{<br>    longitude: -74.006,<br>    latitude: 40.7128,<br>    zoom: 12<br>    }}<br>    height=”100%”<br>    width=”100%”<br>    controller={true} // allows the user to move the map around<br>   &gt;<br>     &lt;<em>StaticMap<br>       </em>mapStyle=”mapbox://styles/mapbox/streets-v11”<br>       mapboxApiAccessToken=”access_token_here”<br>      /&gt;<br>   &lt;/<em>DeckGL</em>&gt;<br>  &lt;/<em>React.Fragment</em>&gt;<br>  )<br> }<br>}</pre><p>There you have it — a very basic map! If you don’t want to add any layers on your map, stop here. (Note: using DeckGL and StaticMap together is unnecessary if you just want a plain map. Instead, consider using the MapGL component; also from React-Map-GL.)</p><p>Here’s what to do if you want to add a data overlay on your map. As the first step, decide what kind of layer you will need. For my team’s app, we wanted to navigate users from point A to B and so we decided to use PathLayer. Uber’s documentation is fairly extensive and there are a lot of different layers you might want — check out their <a href="https://github.com/uber/deck.gl/tree/master/docs/layers">docs</a> to see which one you need. Once you have decided on the layers you need, remember to npm install and import them.</p><pre>import { PathLayer } from &quot;@deck.gl/layers&quot;;</pre><p>Next, add a layers prop to the DeckGl component to specify the data overlay layers you want on top of your map.</p><pre>&lt;<em>DeckGL<br>  </em>initialViewState={{<br>  longitude: -74.006,<br>  latitude: 40.7128,<br>  zoom: 12<br>  }}<br>  height=”100%”<br>  width=”100%”<br>  controller={true}<br>  layers={layer} // layers here!<br>&gt;</pre><p>Finally, add your layer above the return statement in your React component and the data associated with that layer. As you can see below, for the path layer, I specified an array of coordinates to form my path from point A to point B. Add in whatever data is appropriate for your particular overlay.</p><pre>import React from “react”;<br>import DeckGL from “deck.gl”;<br>import { StaticMap } from “react-map-gl”;<br>import { PathLayer } from &quot;@deck.gl/layers&quot;;</pre><pre>// data needed for overlay here<br>const data = [{<br> name: &quot;random-name&quot;,<br> color: [101, 147, 245],<br> path:[[-74.00578, 40.713067],<br>       [-74.004577, 40.712425],<br>       [-74.003626, 40.713650],<br>       [-74.002666, 40.714243],<br>       [-74.002136, 40.715177],<br>       [-73.998493, 40.713452],<br>       [-73.997981, 40.713673],<br>       [-73.997586, 40.713448],<br>       [-73.99256, 40.713863]]}<br>]</pre><pre>export <em>class</em> LayeredMap <em>extends</em> React.Component {</pre><pre>render() {</pre><pre>// below, add whatever layers you need to overlay on your map<br> <em>const</em> layer = [<br>   new PathLayer({<br>    id: &quot;path-layer&quot;,<br>    data,<br>    getWidth: data <em>=&gt;</em> 7,<br>    getColor: data <em>=&gt;</em> data.color,<br>    widthMinPixels: 7<br>  })<br> ]</pre><pre>return (<br>  &lt;<em>React.Fragment&gt;<br>   </em>&lt;<em>DeckGL<br>    </em>initialViewState={{<br>    longitude: -74.006,<br>    latitude: 40.7128,<br>    zoom: 12<br>    }}<br>    height=”100%”<br>    width=”100%”<br>    controller={true}<br>    layers={layer} // layer here<br>   &gt;<br>     &lt;<em>StaticMap<br>       </em>mapStyle=”mapbox://styles/mapbox/streets-v11”<br>       mapboxApiAccessToken=”access_token_here”<br>      /&gt;<br>   &lt;/<em>DeckGL</em>&gt;<br>  &lt;/<em>React.Fragment</em>&gt;<br>  )<br> }<br>}</pre><p>And there you have it! A map with a data overlay on it. I struggled to find documentation on the exact syntax to use when adding a layer onto a map with deck.gl so hopefully this helped you! If you want to check out the project my team and I made, <a href="https://github.com/silverkilo/foody">check out Foody on github</a>! Thanks and please leave claps if you enjoyed :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba0ece89aaef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Consulting Analyst Turned Software Engineer — Why Wanting to Create Isn’t Enough]]></title>
            <link>https://medium.com/@sashakayola/consulting-analyst-turned-software-engineer-why-wanting-to-create-isnt-enough-4a8f97ebc7f2?source=rss-763c8f7afce3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a8f97ebc7f2</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[fullstack-academy]]></category>
            <dc:creator><![CDATA[Sasha Kayola]]></dc:creator>
            <pubDate>Sun, 05 May 2019 04:01:23 GMT</pubDate>
            <atom:updated>2019-05-09T20:25:17.976Z</atom:updated>
            <content:encoded><![CDATA[<h3>Consulting Analyst Turned Software Engineer — Why Wanting to Create Isn’t Enough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*DzEZLjVi38q6AnlPYxTs4Q.jpeg" /></figure><p>About a year ago I came to the conclusion that I wanted to do more than create models and formulas in Excel. Right out of college, I joined a consulting firm where I worked as an analyst helping clients with various executive compensation issues. I worked on 5–10 client projects at a time and learned how to work with many people with drastically different personalities and work styles.</p><p>I was learning so much, but somehow I wasn’t satisfied.</p><p>Now, around the same time I realized that Excel wasn’t as exciting as I had hoped, my coworker told me that he was taking an online Python class just for fun. As the sort of person who often has FOMO (fear of missing out), I decided I too wanted to take a coding class. I already knew basic Python and Java from my two CS classes in college, so I decided to try my hand at learning Javascript on Codecademy. This is when my programming journey began.</p><p>What started off as casual learning became almost…addictive. I noticed I enjoyed the times when I was coding more than the times I was actually doing work. I started going on Codewars for fun and solving random problems. I made a really simple guessing game with Javascript and DOM manipulation.</p><p>This is when I hypothesized why I wasn’t satisfied at my job as an analyst. Maybe it’s because I wasn’t creating anything! All those app ideas I had jotted down in my phone’s notes — I wanted to make them come to life. I didn’t want to just spend all my time plugging away at Excel formulas. Now, you might be thinking, ‘but Sasha, analysts <em>analyze </em>data, they don’t <em>create</em>’. This is true — I was hired above all else to take data, reorganize it into models and Powerpoint slides, and present it back to clients with patterns and conclusions.</p><p>But isn’t this what all apps do? Think about Yelp for example. They take data on various restaurants, organize that data, make it look pretty, and voila!</p><p>Reframing it in that way, I <strong>was</strong> creating in my job. I was taking data, manipulating it with Excel formulas, and making easily digestible models that our clients could understand.</p><p>So…if I was creating at my job, why was I still unsatisfied? Why did I still find more joy from solving Codewars questions and learning Javascript online?</p><p>The answer is simple really: I liked the challenge.</p><p>I realized I enjoyed thinking through coding problems and having that ‘aha!’ moment when I finally thought of a solution. I enjoyed knowing absolutely nothing and through hours of thinking finally understanding how a programming concept like recursion worked (let’s be real, this took me weeks to truly understand). This excitement I had when problem solving is what ultimately led to me to enroll as a student at Fullstack Academy.</p><p>I only have a few weeks left at Fullstack where I am currently working on a final team project. My team has been very ambitious with what we can achieve in these next few weeks. But this is what fuels me — this challenge is why I dedicated myself to making a career switch. If there’s anything I have learned throughout my coding journey, it’s to embrace the struggles and love the challenges!</p><p>If you are interested in tagging along on my coding journey, please follow me or reach out directly on <a href="https://www.linkedin.com/in/sashakayola/">LinkedIn</a> with any questions about my journey, Fullstack Academy, or programming in general :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a8f97ebc7f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>