<?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 Giuseppe Macrì on Medium]]></title>
        <description><![CDATA[Stories by Giuseppe Macrì on Medium]]></description>
        <link>https://medium.com/@gmacri?source=rss-e52bdd907e00------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vmvLebMFS3Ybm_1W.</url>
            <title>Stories by Giuseppe Macrì on Medium</title>
            <link>https://medium.com/@gmacri?source=rss-e52bdd907e00------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 06:27:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gmacri/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[Kepler.gl: Export Map]]></title>
            <link>https://medium.com/vis-gl/kepler-gl-export-map-c3c0804e55b8?source=rss-e52bdd907e00------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3c0804e55b8</guid>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[keplergl]]></category>
            <dc:creator><![CDATA[Giuseppe Macrì]]></dc:creator>
            <pubDate>Tue, 23 Jul 2019 05:13:20 GMT</pubDate>
            <atom:updated>2019-07-23T05:13:20.851Z</atom:updated>
            <content:encoded><![CDATA[<p>Developed by Uber and contributed to the LF Urban Computing Foundation, <a href="https://kepler.gl/">Kepler.gl</a> is an open source geospatial analysis tool for large-scale data sets.</p><p>I previously posted two articles where I described some of the application features. Both articles are the following:</p><ul><li><a href="https://medium.com/vis-gl/animating-40-years-of-california-earthquakes-e4ffcdd4a289">Animating 40 years of California earthquakes</a></li><li><a href="https://medium.com/vis-gl/kepler-gl-dropbox-map-save-share-b4a41a75715b">Kepler.gl + Dropbox = Save and share your maps</a></li></ul><p>In this article we are going to describe the <strong>export map </strong>feature in<a href="https://kepler.gl/"> Kepler.gl</a>.</p><h3>Let’s create a simple map</h3><p>In order to export our map, you first need to create a map. <a href="https://kepler.gl/">Kepler.gl website</a> has some predefined maps:</p><ul><li>visit <a href="https://kepler.gl/demo/earthquakes">Kepler.gl earthquake demo</a></li></ul><p>The new map will look like the screenshot below, showing all California earthquakes over the past 40 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pRz9-CUi2pLukHptH3sZQ.png" /><figcaption>California Earthquake Map</figcaption></figure><p>Once you are happy with the map and all the layers you can create on it (<a href="https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/a-introduction.md">user guide</a>), let’s move on to exporting the current visualization by clicking on the share button (top left corner),</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgiib-mg-cYWruz9pqf_jg.png" /><figcaption>Highlighted Share Button</figcaption></figure><p>upon clicking the <strong>Share</strong> button, you will be provided with a list of options as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QPir4i0niw07Eq6VPfaymg.png" /><figcaption>Export Options</figcaption></figure><p>Click on <a href="https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#export-map"><strong>Export Map</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ye0GHFG4ackVFrm483gEUQ.png" /></figure><p>After clicking on Export Map, <a href="https://kepler.gl/">Kepler.gl</a> will show a modal dialog where you can select the format of your exported map. As shown in the following screenshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l3vH3B9p6g2rHmyX1jjdJg.png" /><figcaption>Export modal dialog</figcaption></figure><p><a href="https://kepler.gl/">Kepler.gl</a> provides two different options:</p><ul><li>HTML: create a single HTML file of your map with data and configuration.</li><li>JSON: create a JSON file with your current map data and config. You can later load it back to kepler.gl</li></ul><h3>Export Map as HTML</h3><p>The default export map option is HTML, see HTML export modal dialog image. As part of HTML export options, you can provide a Mapbox token to be saved in the HTML file.</p><p>If you don’t provide a Mapbox token, Kepler.gl will use a temporary one which can expire later. We recommend to use your own Mapbox token.</p><p>If you don’t have an access token when you export the map, you can always <a href="https://docs.mapbox.com/help/how-mapbox-works/access-tokens/">create a new token</a> and <a href="https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#how-to-update-an-exported-map-token">update the generated HTML</a> file later one when necessary.</p><p>Data and configuration will be inlined in the single HTML file. You can use it as a static page and share it with other people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qEUWpQSCPZ28aG-RxFTHZA.gif" /><figcaption>Export to html</figcaption></figure><blockquote>The generate HTML file can be pretty big since it contains all map data.</blockquote><h3>Export Map as JSON</h3><p>JSON is the second available option to export your map. Once you click on JSON button, Kepler.gl will show the following modal window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EH5qLh4fOcCz-Fd1pZbnHw.png" /><figcaption>Export JSON Map</figcaption></figure><p>The lower part of the modal dialog shows the current map configuration.</p><blockquote><em>The map configuration is coupled with loaded datasets; each part of the configuration will contain a </em><strong><em>dataId</em></strong><em> which will refer to one of the loaded datasets.</em></blockquote><p>Once you click on Export, Kepler.gl will create a JSON file containing both map configuration and data. The newly generated file can be used to recreate our original map. See below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4wDwWu6IKl1GFXWZbkv6Q.gif" /><figcaption>Export to JSON</figcaption></figure><blockquote>The generate JSON file can be pretty big since it contains all map data.</blockquote><h3>Conclusions</h3><p>In this post we reviewed the Kepler.gl export map functionality to create an HTML or JSON file.</p><p>HTML export can be really useful if you want a static representation of our map to include on your website, share it with other users or visualizing it offline on our computer.</p><p>JSON is a lean representation of our map and the file can be stored in a CDN, share with other people and load it later to reproduce the exact same map.</p><p>Exporting map and data is part of the core abilities Kepler.gl provides and we are continuing working on improving and adding new features.</p><p>If you want to know more about Kepler.gl export features, check the <a href="https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md">user guides</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3c0804e55b8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vis-gl/kepler-gl-export-map-c3c0804e55b8">Kepler.gl: Export Map</a> was originally published in <a href="https://medium.com/vis-gl">vis.gl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kepler.gl + Dropbox = Map Save & Share]]></title>
            <link>https://medium.com/vis-gl/kepler-gl-dropbox-map-save-share-b4a41a75715b?source=rss-e52bdd907e00------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4a41a75715b</guid>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[mapbox]]></category>
            <category><![CDATA[keplergl]]></category>
            <category><![CDATA[dropbox]]></category>
            <dc:creator><![CDATA[Giuseppe Macrì]]></dc:creator>
            <pubDate>Mon, 22 Apr 2019 22:46:19 GMT</pubDate>
            <atom:updated>2019-04-23T22:35:53.551Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/vis-gl/animating-40-years-of-california-earthquakes-e4ffcdd4a289">In my previous post</a>, I covered how to use<a href="https://kepler.gl/"> Kepler.gl</a> to display the location and magnitude of California earthquakes during the last 40 years.</p><p>In this post, I will cover new Kepler.gl functionality which allows users to save and share maps using<a href="https://www.dropbox.com/"> Dropbox</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBmNniQOazuWK9lDpJasxA.gif" /><figcaption>Dropbox integration</figcaption></figure><h3>Background</h3><p>After launching Kepler.gl, we received a lot of feedback from users about the way they use the tool and what they would like to see in the future.</p><p>While going through feedback from users, we noticed an interesting trend where users were asking for functionalities to save and share their maps with other users.</p><p>As a workaround to the lack of the cloud storing feature, Kepler.gl has always provided the ability to export map (configuration and/or data) to CSV/JSON files.</p><p>We began looking into possible options to store user maps but with the strict requirement that users must always be in control of their data and data should always be living on users’ browser or cloud accounts without using any back-end services to handle operations.</p><h3>Sharing a Map</h3><p>Users are able to create beautiful maps with Kepler.gl and they want to share them with other users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AvKdYgDnzG5drqiJ" /><figcaption>Multi Maps</figcaption></figure><p>Until now, sharing maps was really tricky because there was no ability to store data and configuration in the same file. To workaround this limitation, users had to share Kepler.gl by exporting the map configuration and sharing both files (data and configuration) with other users.</p><p>Kepler.gl should provide the ability to easily share maps with other people without having to worry about downloading and re-uploading files; at the same time, the application must be aware of users’ data privacy. As a reminder, the Kepler.gl data policy is as follows:</p><blockquote><em>Kepler.gl is a client-side application with no server backend; data lives only on your machine/browser and no information or map data is sent to any server.</em></blockquote><p>Having the Kepler.gl data policy in mind, we had to come up with a solution that did not use a backend side component and gave users control over their own data..</p><p>After reviewing a few options, we implemented the Map Saving functionality using Dropbox as cloud storage. Read below for details on how to use the new feature.</p><h3>Let’s map it!</h3><p>Now, we have introduced all actors in this picture, let’s actually start working on a new map and take advantage of new save and share functionality:</p><ul><li>Create a<a href="https://www.dropbox.com/register"> Dropbox account</a> if you do not have one already.</li></ul><ol><li>Once you have your Dropbox login credentials, visit<a href="https://kepler.gl/"> Kepler.gl</a> and click <strong>Get Started</strong> to create a new map. For the sake of this tutorial, we are going to use one of the provided samples to generate a map and save it. Click <strong>Try Sample Data</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJ8J_CItBbZjSaFRgyaVTQ.png" /><figcaption>Add sample data to map</figcaption></figure><ul><li>Once all samples are loaded, click <strong>NYC Taxi Trips </strong>(or a different example/your own custom data).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JktIsuA2F4izqoqhQJlngQ.png" /><figcaption>NYC taxi</figcaption></figure><ul><li>Now that we have a spectacular view of NYC taxi trips, and are ready to share, we click the <strong>Share</strong> button. The button will provide a list of share/export options. Click <strong>Share Public Url</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hAcNTglakNCQU96T0gsD0w.png" /></figure><ul><li>The saving modal dialog provides a list of third-party storage options (currently only Dropbox). Click <strong>Dropbox Login</strong> (if you have already logged into Dropbox through Kepler.gl you will see <strong>Upload</strong>).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jW2-Rj0JQFiBBLVwABuS6g.png" /><figcaption>Saving options</figcaption></figure><ul><li>Kepler.gl will now open a new modal window which allows users to log into their<a href="https://www.dropbox.com/developers/reference/oauth-guide"> Dropbox account safely using OAuth</a>. Once successfully logged in, the new window will automatically close and the <strong>Dropbox Login</strong> button will turn into <strong>Upload</strong>.</li><li>Click <strong>Upload</strong> and Kepler.gl will start uploading your newly created map into your Dropbox Account. When the operation is complete, you can see your newly saved map URLs (kepler.gl permalink and map raw file).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbHF0J9oXXNUYNx6j9prHg.png" /></figure><p>Now, your map is saved and you can share other people or social media.</p><h3>Conclusions</h3><p>Saving and sharing will save time when you create and share maps with other users. Users can also build on top of their existing works without starting from scratch.</p><p>We are always looking for feedback in order to improve Kepler.gl and cover new use cases.</p><p>Feel free to check out the <a href="https://github.com/uber/kepler.gl/wiki/Kepler.gl-2019-Roadmap">Kepler.gl roadmap</a> and if you have new ideas or recommendations feel free to create a<a href="https://github.com/uber/kepler.gl/issues"> new Github issue</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4a41a75715b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vis-gl/kepler-gl-dropbox-map-save-share-b4a41a75715b">Kepler.gl + Dropbox = Map Save &amp; Share</a> was originally published in <a href="https://medium.com/vis-gl">vis.gl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Animating 40 years of California Earthquakes]]></title>
            <link>https://medium.com/vis-gl/animating-40-years-of-california-earthquakes-e4ffcdd4a289?source=rss-e52bdd907e00------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4ffcdd4a289</guid>
            <category><![CDATA[mapbox]]></category>
            <category><![CDATA[keplergl]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[webgl]]></category>
            <category><![CDATA[maps]]></category>
            <dc:creator><![CDATA[Giuseppe Macrì]]></dc:creator>
            <pubDate>Tue, 29 May 2018 08:23:37 GMT</pubDate>
            <atom:updated>2019-05-14T02:45:03.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hMw2ZPdGu91MBqsy." /><figcaption><em>Figure 1. California and surrounding earthquakes since 1967</em></figcaption></figure><p>Many years ago in college, I decided to take a Computer Graphics class. One of the assignments during the class was to create a visualization using any type of scientific data.</p><h3>Data</h3><p>One day, while reading the news, I noticed a small earthquake had happened in California. I decided that earthquake data would make for an interesting visualization.</p><p>I chose to use data from the Northern California Earthquake Data Center (<a href="http://ncedc.org/">NCEDC</a>) , an organization that has measured and made available all California earthquake records from 1967 to the present. Back in the day I used <a href="https://www.opengl.org/">OpenGL</a> to build the earthquake visualization and it looks “kind of” good (fortunately I wasn’t able to find screenshots).</p><p>Several years passed, technology improved, and I found myself wanting to recreate this visualization with a modern visualization tool, specifically <a href="http://kepler.gl/">Kepler.gl</a>, a WebGL based app developed by the mad geniuses at Uber.</p><p>Creating the earthquake visualization was significantly easier and quicker this time around.</p><h4>Creating the dataset</h4><p>I was able to retrieve earthquake records from <a href="https://www.opengl.org/">NCEDC</a> which had not abandoned it’s 50 year mission of capturing earthquake data. It provides an API (<a href="http://service.ncedc.org/">http://service.ncedc.org/</a>) to fetch earthquake records in the following format:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d83f7b82f969fe150e5297b74408df7/href">https://medium.com/media/3d83f7b82f969fe150e5297b74408df7/href</a></iframe><p>There is an enormous amount of seismic data available through this API, not all of which counts as something we might consider an earthquake. Fortunately the API allows users to filter by parameters such as magnitude.. This is my final query:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc9e5819e5676d1f53b08a017f236d56/href">https://medium.com/media/dc9e5819e5676d1f53b08a017f236d56/href</a></iframe><p>Using the above query I created an earthquake dataset of (~55000) by filtering it to contain only 2.5+ magnitude earthquakes. I downloaded it as a <a href="https://raw.githubusercontent.com/uber-web/kepler.gl-data/master/earthquakes/data.csv">CSV file</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yYYQoiUo5_tMGx2-." /><figcaption><em>Figure 2. The earthquake csv contains latitude, longitude magnitude and time of each earthquake</em></figcaption></figure><h3>Display</h3><p>The <a href="http://ncedc.org/">NCEDC</a> recordset was well shaped for visualization with <a href="http://kepler.gl/">Kepler.gl</a> and didn’t require and manipulation.</p><p>Each row contained:</p><ul><li>Latitude</li><li>Longitude</li><li>Magnitude</li><li>Magtype</li><li>Etc…</li></ul><p>Without adjusting parameters this is what kepler.gl displayed immediately after loading in my CSV (Figure 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_IDdFBGvADlXHXBo." /><figcaption><em>Figure 3. After drag and drop in the csv, kepler.gl automatically detected points in the dataset and create a point layer</em></figcaption></figure><p>I was impressed that the application was able to automatically detect geo fields, the `<strong>Latitude</strong>` and `<strong>Longitude</strong>` columns, in my dataset particularly since kepler.gl is entirely browser-based — nothing is sent to remote services. The visualization of all ~55000 data points showed up in just a few seconds without crashing the browser.</p><h4>Customization</h4><p>At this point, I thought “this is nice but I need to gather more information about the dataset.” I decided to adjust kepler.gl layer configuration to increase the clarity of the results.</p><p>kepler.gl can customize several attributes of your visualization, e.g. point radius/color, so I began by updating the properties of “artwork”. After few really attempts, I decided to customize my point layer based on the magnitude of each single earthquake. At each point, the layer radius and color would be determined based on the <strong>magnitude</strong> of the particular earthquake, Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*tvxBYCE2TsaYHLAmCwhhKg.png" /><figcaption><em>Figure 4. Adjust </em>colors/radius options of the point layer</figcaption></figure><p>And after updating few settings I was able to create the following visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*27dOh-_jwAQVPXRP." /><figcaption>Figure 5. Display earthquakes using radius and color based on magnitude value</figcaption></figure><p>The new created visualization is very intuitive and provide a quick and easy way to spot stronger earthquakes in the dataset.</p><p>With only few minutes of actually using kepler.gl I was able to replicate the work I did back in college with greater clarity and a significantly more professional aesthetic.</p><p>Most importantly, by looking at the above map, you can spot big earthquakes and understand their distribution.</p><h4>Filters</h4><p>After I was satisfied with the color palette and various settings, I decided to start using some filters.</p><p>kepler.gl has the ability to filter on each column of loaded dataset, for this dataset, possible options were lat, long, and timestamp. I decided to create a filter using the timestamp when the earthquake occurred, Figure 6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RiJXA7SyOhKkXypG5vCBWA.png" /><figcaption>Figure 6. Adding a time filter by the DateTime field</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*Y_MxJvYKbMbM2oS5." /><figcaption>Figure 7. Click on the clock icon to enlarge the filter add pin it to the bottom of the screen</figcaption></figure><p>While using time stamp as a filter, kepler.gl performed a domain analysis on the specified property values and generated a histogram to better understand the value spectrum — so I did not have to squint at the map and guess about the optimal distribution.</p><p>By clicking on the clock icon on the right top of the filter item panel, shown in Figure 6, the application shows a timeline panel that can be used to scrub through earthquakes over time, shown in Figure 8. This enables a deep understanding of how the data changes over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*_6DhzVlF0y1KRR0b." /><figcaption>Figure 8. Enable time playback</figcaption></figure><h3>Conclusions</h3><p>After spending several hours working on large dataset in kepler.gl I was struck by the app’s performance in terms of data loading, data manipulation, map interactions and filtering.</p><p>The smart functionality that automatically detects columns is unbelievably useful not just in terms of saving time, but also for detecting insights in the dataset which otherwise may be unknown and/or taken to time to be discovered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4ffcdd4a289" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vis-gl/animating-40-years-of-california-earthquakes-e4ffcdd4a289">Animating 40 years of California Earthquakes</a> was originally published in <a href="https://medium.com/vis-gl">vis.gl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>