<?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 Bertrandlobo on Medium]]></title>
        <description><![CDATA[Stories by Bertrandlobo on Medium]]></description>
        <link>https://medium.com/@bertrandlobo?source=rss-b5f23b667c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DhyZ9YSEfytEnJUt</url>
            <title>Stories by Bertrandlobo on Medium</title>
            <link>https://medium.com/@bertrandlobo?source=rss-b5f23b667c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:11:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bertrandlobo/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[Deploying Data-driven dashboards with Python.]]></title>
            <link>https://medium.com/@bertrandlobo/deploying-data-driven-dashboards-with-python-f459ed08c1a6?source=rss-b5f23b667c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f459ed08c1a6</guid>
            <category><![CDATA[yfinance]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Bertrandlobo]]></dc:creator>
            <pubDate>Tue, 24 May 2022 10:46:17 GMT</pubDate>
            <atom:updated>2022-05-24T10:46:17.616Z</atom:updated>
            <content:encoded><![CDATA[<h4>If there is an idea on your mind and you would like to showcase it through data, Python and Streamlit are an excellent start towards creating a data-driven Dashboard.</h4><p>To install the necessary packages, check the<a href="https://docs.streamlit.io/library/get-started/installation"> Streamlit </a>installation guide and get started. Also, the code for this dashboard can be found in this <a href="https://github.com/Bertrandlobo/webapp1/blob/main/test.py">GitHub Repository.</a></p><p>After the invasion of Russia over Ukraine, energy prices and stocks saw a record high and it can be seen through a simple dashboard. From Pythons yfinance package (Yahoo Finance ), data can be easily fetched and plotted on a dashboard using Python. I selected an Oil giant like Chevron Corporation and fetched data from the exact date when the invasion occurred.</p><ol><li><strong>Stock Opening Price</strong></li></ol><p>Each company listed on the Stock market has a unique ticker symbol, after choosing ‘CVX’ for Chevron Corporation and selecting a start and end period, the stock Opening price can be visualized. I choose dates between 01. February 2022 and 15th March 2022 respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*kuUBmDOFuDRUyL-5PMJL0Q.png" /><figcaption>Stock Opening Prices, Source: Author</figcaption></figure><p>As seen above, oil stock opening prices plunged between 120 and above 160 dollars during the invasion period.</p><p><strong>2. Stock Closing prices</strong></p><p>Similar changes were seen in the stock closing price after Russia invaded Ukraine which surged oil stocks. Seem below is a closing price until 180 dollars in the time period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*801dfjntMtnLevEmyOpgaw.png" /><figcaption>Stock Closing price, Source: Author</figcaption></figure><p><strong>3. Stock Volume</strong></p><p>The stock volume shows a real surge as the volume of stocks hit a record high in the mentioned time period seen below as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*6CoNT8mhlb5JtGI-WqMJMw.png" /><figcaption>Stock Volume, Source: Author</figcaption></figure><p>The deployed dashboard can be seen below as follows</p><p><a href="https://share.streamlit.io/bertrandlobo/webapp1/main/test.py">https://share.streamlit.io/bertrandlobo/webapp1/main/test.py</a></p><h4>Conclusion</h4><p>Streamlit is a great tool with Python to deploy single page or multi-page dashboards. Depending on the need and idea in mind, one can dive deeper into creating more complex dashboards using the above story as a foundation. Keep Learning and Stay Tuned…..!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f459ed08c1a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Land Cover Mapping with Python (part 2 )]]></title>
            <link>https://medium.com/@bertrandlobo/land-cover-mapping-with-python-part-2-9aaed76fb166?source=rss-b5f23b667c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aaed76fb166</guid>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[satellite-technology]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[agriculture]]></category>
            <dc:creator><![CDATA[Bertrandlobo]]></dc:creator>
            <pubDate>Wed, 04 May 2022 09:42:36 GMT</pubDate>
            <atom:updated>2022-05-04T09:42:36.182Z</atom:updated>
            <content:encoded><![CDATA[<p>A guide to building upon the foundation laid in <a href="https://medium.com/@bertrandlobo/accessing-and-plotting-satellite-imagery-part-1-dcc81b467cdf">part 1</a></p><h4>Introduction</h4><p><a href="https://medium.com/@bertrandlobo/accessing-and-plotting-satellite-imagery-part-1-dcc81b467cdf">Part1</a> of this story featured a step by step guide to accessing and downloading Sentinel-2 Satellite Data and plotting it in Python. To jump right into part 2, another dataset of agricultural fields in Munich, Germany is accessed via<a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-04T09%3A39%3A23.802Z"> EO Browser</a>. Various indices in land cover mapping are trained on this dataset in the Jupyter notebook.</p><h4><strong>1. The AOI (Area of Interest )</strong></h4><p>Jumping right into python, the code of this part can be found on this <a href="https://github.com/Bertrandlobo/Machine_Learning_Satellite_Imagery/blob/main/code/Part2-SatelliteImageAnalysis.ipynb">GitHub</a> repository. The 12 bands of the data can be plotted as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSqvVw7pdsSfUH-5Su2YIw.png" /><figcaption>Sentinel-2 band data, Source: Author</figcaption></figure><p>For an RGB (Red, Green, Blue) plot with stretch applied, the following line of code generates it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEc6pA6eLbVapnUGgbS_5g.png" /></figure><h4><strong>2. Land Cover Mapping</strong></h4><p>Various indices like vegetation, soil, moisture, water, and geology can be mapped by training the formulas for each index on the sample dataset. These basic algorithms can then be used for any dataset of choice.</p><p><strong>A. NDVI (Normalized Difference Vegetation Index )</strong></p><p>It is given by the formula and mapped as,</p><p>NDVI =NDVI = ((NIR — Red)/(NIR + Red))<br>where NIR = Near Infrared band , Red= Red band</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*TcDWdXIqPdIWaDrQjo2rkg.png" /><figcaption>NDVI, Source: Author</figcaption></figure><p><strong>B. SAVI (Soil-Adjusted Vegetation Index )</strong></p><p>The formula and plot,</p><p>SAVI = ((NIR — red)/(NIR + Red + L)) * (1 + L)</p><p>where NIR = Near Infrared <br> Red = red band , L = green vegetation cover (Defined)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*pC10SuoGqInEosRNeLMwNQ.png" /><figcaption>SAVI, Source: Author</figcaption></figure><p><strong>C. VARI (Visible Atmospheric resistant index )</strong></p><p>VARI = ((Green — Red)/(Green + Red — Blue))</p><p>where Green = pixel values from band green<br>Red = pixel values from red band, Blue = Values of pixels from blue band</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*Op7sIP8vgoq7Abj6nfeXQg.png" /><figcaption>VARI , Source : Author</figcaption></figure><p><strong>D. MNDWI (Modified Normalized Difference Water Index )</strong></p><p>MNDWI = MNDWI = (Green — SWIR) / (Green + SWIR)<br>Green = pixel values from the green band<br>SWIR = pixel values from the short-wave infrared band</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*RJl-dcr2X4MbX8y-88g8iA.png" /><figcaption>MNDWI, Source: Author</figcaption></figure><p><strong>E. NDMI (Normalized Difference Moisture Index )</strong></p><p>NDMI = (NIR — SWIR1)/(NIR + SWIR1)<br>NIR = pixel values from the near infrared band<br>SWIR1 = pixel values from the short-wave infrared 1 band</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*l2GzQSADKJJ8imislKckxA.png" /><figcaption>NDMI, Source: Author</figcaption></figure><p><strong>F. Geology Indices — Ferrous Minerals and clay minerals</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pOaP1fCJjQJKURIyLSMiw.png" /><figcaption>Ferrous and Clay Minerals , Source : Author</figcaption></figure><h4>Conclusion</h4><p>This story shows the various methods of land cover mapping using Sentinel 2 data. The algorithms used are basic formulas used for agriculture and builds a foundation for further machine learning techniques. Supervised and Unsupervised learning, deep neural networks in agriculture can be of use for precision farming and crop monitoring.</p><h4><strong>References :</strong></h4><p><a href="https://medium.com/@marita.thushari/crop-monitoring-using-satellite-imagery-part-i-an-introduction-70968d36e8a5">Crop Monitoring using Satellite Imagery — Part I — An Introduction.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9aaed76fb166" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessing and Plotting Satellite Imagery (part 1)]]></title>
            <link>https://medium.com/@bertrandlobo/accessing-and-plotting-satellite-imagery-part-1-dcc81b467cdf?source=rss-b5f23b667c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcc81b467cdf</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[satellite-technology]]></category>
            <dc:creator><![CDATA[Bertrandlobo]]></dc:creator>
            <pubDate>Mon, 02 May 2022 09:48:07 GMT</pubDate>
            <atom:updated>2022-05-02T09:48:07.271Z</atom:updated>
            <content:encoded><![CDATA[<p>A step by step guide to accessing and downloading Sentinel-2 Satellite Data and plotting it in Python.</p><h4><strong>Introduction</strong></h4><p>Sentinal-2 satellites provide coverage of the earth once in 5 days with 12 bands at a resolution of 10 metres. Among the vast variety of options to access and download Sentinel -2 data, one of them is via <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a> Sentinel Hub is a part of the European Space Agency&#39;s funding program. Let us dive into the process straight away.</p><p><strong>Step 1: Creating an Account</strong></p><p>To use all the features of <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a> signing up is useful and after logging in, the map of Rome should appear, indicating everything went as planned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4SM1PgKGjjOkfeiTOTpkyw.png" /><figcaption>User Interface of Sentinel Hub EO Browser, Source: <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a></figcaption></figure><p><strong>Step 2: Search criteria and Option Selection</strong></p><p>For this project, data from the Amazon Rainforest is used as a test dataset. To search, firstly write on the top right corner search bar whichever search criteria. Then the map redirects to the area. There are various options to choose from. For example, Data Sources (In this case Sentinel-2 with the advanced search on, L1C, L2A selected with minimum cloud coverage), Date and time of when the user needs exact data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZamRIpkCKlKnrBvSmH_W1w.png" /><figcaption>Search Criteria and Option selection in Source: <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a></figcaption></figure><p>Once the search criteria are selected, one can narrow it down to a particular Area of Interest (AOI) as satellite data can often be large. Polygons and squares can be selected for the AOI along with the satellite coverage models as seen on the right. Then the satellite coverage with various cloud coverage options is seen in the Menu on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qs5Itf4Xgw601-IzA-Zp2g.png" /><figcaption>AOI, Source: <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a></figcaption></figure><p>When the data with minimum cloud cover is chosen, click ‘Visualize’ in green at the bottom. Various Visualization options like True Colour, NDVI, and False colour can be chosen depending on the user&#39;s needs. Some advanced options are also available and one can choose to play around.</p><p><strong>Step 3: Downloading the Dataset</strong></p><p>The right-hand side of the interface features an image download option. Once clicked, move to ‘Analytical’ and choose image format, resolution, and Layers. For the dataset, I use all bands with an NDVI to correlate plots in Python later in Part 2 of this story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVPutg2cdDLOC-p1AHXViw.png" /><figcaption>Downloading Data, Source: <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a></figcaption></figure><h4>Plotting Sentinel-2 Data in Python.</h4><p>Moving straight to the coding part, this tutorial is a basic guide to installing Python packages, reading data and plotting different bands to build a foundation for further analysis like machine learning and neural networks. The code along with data and some output cases can be found in a repository on my <a href="https://github.com/Bertrandlobo/Machine_Learning_Satellite_Imagery">GitHub</a>.</p><p><strong>Step 1: Installing Python Packages.</strong></p><p>The two packages used are earthpy and GDAL. For installing GDAL in macOS, follow this <a href="https://mits003.github.io/studio_null/2021/07/install-gdal-on-macos/">guide</a> or this <a href="https://gist.github.com/kelvinn/f14f0fc24445a7994368f984c3e37724">documentation</a>. After installing type this line of code either in the terminal or in the notebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*vzupPElSzRn4hB4twPEt9w.png" /><figcaption>Source: Author</figcaption></figure><p><strong>Step 2: Importing libraries</strong></p><p>The python libraries used in this project are rasterio, matplotlib, numpy, glob and earthpy, they can be imported with the following lines of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I1QHvMvoWXZTekTLwESnCw.png" /><figcaption>Source: Author</figcaption></figure><p><strong>Step 3: Reading the Data</strong></p><p>The downloaded data can be saved in a directory locally or in the cloud and the path to the directory should be defined to read the data in Python. The following code reads the 12 bands of imagery I downloaded for the Amazon Rainforest. Out [195] is a sign the data has been successfully read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6ukmO2KBU0raJRW002d-w.png" /></figure><p><strong>Step 4: Plotting Bands of Satellite images</strong></p><p>Depending on the user&#39;s needs, single bands can be plotted in Python with the following code. Also, seen are Band 1 and 5 of the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrwHIqC_8dp2GIKhds0VHw.png" /><figcaption>Source: Author</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IgoLTh7nVnHiQaysKOAehQ.png" /></figure><h4>Conclusion</h4><p>This story is a comprehensive guide to accessing and downloading Sentinel-2 data from <a href="https://apps.sentinel-hub.com/eo-browser/?zoom=10&amp;lat=41.9&amp;lng=12.5&amp;themeId=DEFAULT-THEME&amp;toTime=2022-05-01T17%3A30%3A10.162Z">Sentinel Hub EO Browser.</a> Followed by the basic use of Python libraries to read and plot the same data as Part 1 of the Project. Part 2 features using supervised and unsupervised machine learning techniques for land cover mapping and will be published soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcc81b467cdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>