Hemed Profile picture
Mapper | IT 🌐|🗺️|🇹🇿

Jan 7, 2023, 21 tweets

Tutorial Thread🧵 on how to create Climate maps using R Language specifically ClimateR🌧️🌤️ package created by Mike Johnson...In this tutorial I'm going to use The Kingdom of Saudi Arabia 🇸🇦#gischat #cartography #GIS #geospatial #Remotesensing #dataviz #R #rspatial #mapping

So At first Climate R is package created specifically to deal with climate illustration ......So in order to get it working you have to Have Remote package already and you have to Install Using the codes below.

So after that were going prepare the Tempreture illustration in which they are three ways of illustrating Mean Tempreture(One map),Annual Tempreture(Mutiple Maps) and Monthly Tempreture.

Before moving to the codes you have to prepare the area of interest usually I use countries shapefile ADM_0(As in Saudi Arabia) but you're not limited to that instead you can prepare map of States within Country or Region within Country....place them to local disk for easy path.

You have to be connected to Internet in order to fetch data online while coding

After that then we venture to the code in which our Main purpose is to Create Mean Tempreture🌤️.....for ten years 2011-2020(you are not limited) hence you download packages that you don't have as illustrated .....and follow the codes below

Within this code there is three things to notice ....the index part which collect the raster into 10 parts as shown above......The Masking part.....and the "YlOrRd" which is used for tempreture but if not satisfied you can replace it with combination below

The Output would be as follows

The on second is Yearly annual Tempreture...in which you follow codes below

The output would be as follows

And finally, the codes to determine mean monthly temperatures from year 2011 to 2020(Notice the change in index part has changed from here to accommodate the twelve months)

Which would result to this output

Now on rainfall 🌧️part parameter changes into "prcp" as shown in code below (Notice the change in brewer.pal in which it has changed to Blues to show Precipitation)

Which would result into this output

And the annual precipitation can be determined by the following codes

Which would result into this output

And finally for Monthly Mean Precipitation the codes are

Which would give out an output as shown below

There is codes for Night Temperature Map(Tmin) .... probably next time we will venture to that ...but in summary change the parameters to tmin and Fun part in code change from Max to Min....thats all for today folks

Again Special credit to Monica Anna Tomaszewska for the help in Github and Mike Johnson for creating this wonderful Package

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling