<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/using-r-and-satellite-data-to-identify-marine-bioregions/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.milanor.net/blog/r-satellite-data-to-identify-marine-bioregions/"> MilanoR</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p align="justify">R is a powerful statistical and programming language. Despite its reputation of being hard to learn, it is more and more used in different areas of research and has become an essential tool in oceanography and marine ecology. For instance, R is specifically used to read, process and represent <i>in situ</i> oceanographic data through the use of specific packages (e.g. <i>oce</i>) or more generally, to manage satellite data in order to produce high temporal and spatial resolution maps useful to synoptically explore and monitoring vast areas of the world oceans.</p>
<p align="justify">In this post we briefly describe a practical use of R in conjunction with satellite data to identify marine bioregions of the Labrador Sea (an arm of the North Atlantic Ocean between the Labrador Peninsula and Greenland) with different patters in the phytoplankton seasonal cycle (<a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/Phytoplankton">https://en.wikipedia.org/wiki/Phytoplankton</a>). Phytoplankton, are microscopic plants that occupy the lowest level of the marine food chain. Their presence in the surface water is revealed because of their chlorophyll-a and other photosynthetic pigments, which changes the color of ocean waters. Nowadays, satellite ocean color sensors are routinely used to estimate the concentrations of chlorophyll-a and other parameters in the surface water of the oceans. All this data are freely available for research and educational purposes.</p>
<p align="justify">The approach used for the identification of the bioregions is therefore based on the use of the chlorophyll-a concentration, an index for phytoplankton biomass. The Globcolour project (<a target="_blank" rel="nofollow" href="http://www.globcolour.info/">http://www.globcolour.info</a>), which combines data from several satellites to reduce spatial and temporal gaps, provides a set of different satellite parameters including estimates of chlorophyll-a. The data are provided at several temporal (daily images, 8-day composite images and monthly averages) and spatial (1 km, 25 km, 100 km) resolutions and stored into NetCDF (<a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/NetCDF">https://en.wikipedia.org/wiki/NetCDF</a>) files, a format that include metadata information in addition to the data sets. In our case, among other information, each file contains latitude and longitude values to identify each pixel on the grid. For our purpose we downloaded 8-day composite images (about one image every week, from the year 1998 to 2015) with a spatial resolution of 25 km. To work with NetCDF files we used the R package <i>ncdf4, </i>which replaces the former <i>ncdf</i> package.</p>
<p align="justify">Once the time series have been downloaded and unzipped (.nc files), to reach our objective several steps were needed:</p>
<ol>
<li>
<p align="justify">By using the functions <i>nc_open</i> and <i>ncvar_get</i> contained in the R package <i>ncdf4, </i>the .<i>nc</i> files were opened and the chlorophyll-a values <span lang="en-US">(pixels) </span>extracted together with the spatial coordinates and date.</p>
</li>
</ol>
<ol start="2">
<li>
<p align="justify">Subsequently, by assigning to each pixel the corresponding values of latitude and longitude, id-pixel (i.e. each pixel was numbered) and id-date (i.e. year, month and day of the year) a large data frame was created. Basically, within the data frame each pixel was identified uniquely.</p>
</li>
</ol>
<ol start="3">
<li>
<p align="justify">A 8-day climatological time series of chlorophyll-a concentrations was created by averaging over the period 1998-2015 each pixel within the area of interest (i.e. averaging all the first weeks, all the second weeks, etc.).</p>
</li>
</ol>
<ol start="4">
<li>
<p align="justify">The resulting time series was normalized (<a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/Feature_scaling">https://en.wikipedia.org/wiki/Feature_scaling</a>) in order to scale values between 0 and 1.</p>
</li>
</ol>
<ol start="5">
<li>
<p align="justify">On the normalized climatology previously obtained (see point 3 and 4), a cluster analysis was carried out to identify marine regions of similarity (clusters).</p>
</li>
</ol>
<p align="justify">To perform the cluster analysis we used the function <i>k-means</i> (package <i>stats</i>). The Calinski-Harabasz index was used to evaluate the optimal number of clusters. However, more detailed information about the procedure previously described can be found in D’Ortenzio and Ribera d’Alcalà 2009 and Lacour et al. 2015.</p>
<p align="justify">The final outcome of this analysis is shown in the figure below.</p>
<p align="justify"><a target="_blank" rel="nofollow" href="https://i0.wp.com/www.milanor.net/blog/wp-content/uploads/2017/01/bioregions_figure.jpg"><img sizes="(max-width: 3307px) 100vw, 3307px" alt="bioregions-satellite-data_figure" class="wp-image-2561" src="https://i0.wp.com/www.milanor.net/blog/wp-content/uploads/2017/01/bioregions_figure.jpg?resize=456%2C260" data-recalc-dims="1"></a></p>
<p align="justify">As we can see two main areas were identified: the bioregion 1 (the yellow area) located north of about 60°N and the bioregion 2 (green area) located south of 60°N. The two bioregions present a different climatological phytoplankton biomass cycle (bloom). In the northern part (bioregion 1) of the Labrador Sea the bloom starts earlier (around day 102 – dashed line in the figure) and it is more intense (more than 1.75 mg/m<sup>3</sup>). Conversely, in the southern part (bioregion 2) the bloom starts later (day 128) and it is less intense (less than 1.75 mg/m<sup>3</sup>). Note that, for simplicity, the bloom onset (represented by the dashed line and usually used as a warning bell for possible changes in trophic interactions and biogeochemical processes) was identified as the time when the chlorophyll-a concentration increases to the threshold of 1.0 mg/m<sup>3</sup>. Finally, the figure was created by using three R packages<span lang="en-US">:</span> <i>rasterVis</i>, <i>ggplot2</i> and <i>gridExtra</i>.</p>
<p align="justify">Overall, the simple example used here has shown how the concomitant use of statistical methods implemented through the use of R and satellite data can help to characterize vast oceanic areas and thus to better illustrate ecosystems functioning and possibly their response to environmental changes.</p>
<p align="justify"><b>References</b>:</p>
<p align="justify">D’Ortenzio F., Ribera d’Alcalà M. (2009) On the trophic regimes of the Mediterranean Sea: a satellite analysis. Biogeosciences, 6, 139-148</p>
<p align="justify">Lacour, L., Claustre H., Prieur L., D’Ortenzio F. (2015), Phytoplankton biomass cycles in the North Atlantic subpolar gyre: A similar mechanism for two different blooms in the Labrador Sea, Geophysical Research Letters, 42</p>
</div>
<p>The post <a target="_blank" rel="nofollow" href="http://www.milanor.net/blog/r-satellite-data-to-identify-marine-bioregions/">Using R and satellite data to identify marine bioregions</a> appeared first on <a target="_blank" rel="nofollow" href="http://www.milanor.net/blog">MilanoR</a>.</p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.milanor.net/blog/r-satellite-data-to-identify-marine-bioregions/"> MilanoR</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/BKUdPYj5ElE"></a></div>