<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/new-rwind-release-on-cran-v1-0-2/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://allthiswasfield.blogspot.com/2018/07/new-rwind-v102-release-on-cran.html"> long time ago...</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>Hi there!</div>
<div></div>
<div>Just a few lines to inform you about the new release of rWind R package (v1.0.2). This version have several new features. Here you have an example of one of them, the function wind.dl_2 to download time series of wind data. In this example we create a bunch of PNG files to be converted later into a GIF of wind speed of east Asia region.</div>
<div></div>
<div>Enjoy!</div>
<div></div>
<div><a rel="nofollow" href="https://i1.wp.com/3.bp.blogspot.com/-PZn7RkUlld8/Wz1TJiFLYxI/AAAAAAAAAQU/yrBXGGCRjVkdS3oaOMB5TuKlrN7LEwelQCLcBGAs/s1600/wind.gif?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/3.bp.blogspot.com/-PZn7RkUlld8/Wz1TJiFLYxI/AAAAAAAAAQU/yrBXGGCRjVkdS3oaOMB5TuKlrN7LEwelQCLcBGAs/s400/wind.gif?resize=450%2C600&ssl=1" data-original-width="450" width="450" data-original-height="600" data-recalc-dims="1"></a></div>
<div></div>
<div></div>
<div></div>

<p></p>
<pre><code> # We will create a gif of wind speed for east Asia during the end of June (2018)  <br>   <br> # First, we should load the packages that we will use. Use install.packages() to   <br> # download and install the new version of rWind (v1.0.2)  <br>   <br> install.package(&quot;rWind&quot;)  <br>   <br> library(rWind)  <br>   <br> library(fields)  <br> library(shape)  <br> library(rworldmap)  <br> library(lubridate)  <br>   <br> # Now, we use lubridate package to create a sequence of dates/times (each three  <br> # hours)  <br>   <br> dt &lt;- seq(ymd_hms(paste(2018,6,25,00,00,00, sep=&quot;-&quot;)),  <br>      ymd_hms(paste(2018,7,4,21,00,00, sep=&quot;-&quot;)),by=&quot;3 hours&quot;)  <br>   <br> # Now, we use the new function wind.dl_2 to download the whole time series of  <br> # wind data. We use the &quot;dt&quot; object created with lubridate to provide the input   <br> # to wind.dl_2. Since it's a large area and many days, it could take a while...  <br>   <br> wind_series &lt;- wind.dl_2(dt,90,150,5,40)  <br>   <br> # Next, we can use wind2raster function from rWind package directly over the   <br> # output from wind.dl_2, it has been adapted to work with this lists of wind  <br> # data.  <br>   <br> wind_series_layer &lt;- wind2raster(wind_series)  <br>   <br> # Finally, we will create a bunch of PNG files to be converted later in a GIF  <br>   <br> id&lt;-0  <br> for (i in 1:72) {  <br>  id &lt;- sprintf(&quot;%03d&quot;, i)  <br>  png(paste(&quot;asia&quot;,id,&quot;.png&quot;, sep=&quot;&quot;), width=1000, height=600, units=&quot;px&quot;,  <br>    pointsize=18)  <br>  image.plot(wind_series_layer[[i]]$wind.speed, col=bpy.colors(1000),  <br>        zlim=c(0,18), main =wind_series[[i]]$time[1])  <br>  lines(getMap(resolution = &quot;low&quot;), lwd=3)  <br>  dev.off()  <br> }  <br>   <br></code></pre>
	<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://allthiswasfield.blogspot.com/2018/07/new-rwind-v102-release-on-cran.html"> long time ago...</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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/gTxD_NSQOyE" height="1"></a></div>