How to Calculate SPEI and SPI Indices using SPEI Package in RStudio

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 100

  • @arnoldmusungu8070
    @arnoldmusungu8070 2 роки тому +2

    Hallo Fitsum, in your example, it only shows for one latitude point. But in real sense, you will be having multiple altitudes. How do you compute this given varying altitudes?

  • @gashawgessese9688
    @gashawgessese9688 4 роки тому +1

    Hello Fitsum how are you? I am working on preparing SPEI map for multiple stations using R studio, provided that I have monthly precipitation, minimum and maximum temperature for 500 Geographic coordinates?

  • @juancamilotrianamadrid4102
    @juancamilotrianamadrid4102 4 роки тому +3

    Hello Mr. Fitsum, i love your videos they are very useful! I would like to ask you, how can i plot my SPI results, in this video you made it to the SPEI.
    i would aprecciate if you can help me, greetings from Colombia.

  • @WondmagegnTafesse
    @WondmagegnTafesse Рік тому

    Thank you very much for the video, it was extremely helpful. I have a question regarding computing SPEI when dealing with multiple locations. Appreciate if you could provide some guidance on how to do this.

  • @rajamuhammadnaufalbinrajaa3162
    @rajamuhammadnaufalbinrajaa3162 3 роки тому +1

    hellos sir. I want to ask you some questions, how do yo know the value of gamma, beta and alpha for the SPEI calculation? Is the values for the gamma, alpha and beta is the same with SPI? Did you set up the value of gamma, alpha and beta manually in the R studio. Thank you in advance sir

  • @YassirCórdova
    @YassirCórdova Рік тому

    The SPEI can be used for drought indices (SDI). I heard that SPI can be used. Would it be correct to use that?

  • @GOTJISIRICH
    @GOTJISIRICH 5 років тому

    Hello. I have a question. Please ask me.
    How to calculate SPI3, SPI6, SPI9 and SPI12? Thank you.

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому +1

      If you have the same dataset format please use the following functions to get respective index.
      SPI3

    • @GOTJISIRICH
      @GOTJISIRICH 5 років тому

      @@Fitsum_Teshome If I use Precintcon Package. How to calculate SPI3,SPI6,SPI9 and SPI12?

  • @qianhe6963
    @qianhe6963 3 роки тому +1

    Amazing video. Thank you a million. If I have hundreds of stations, how should I do to obtain all the SPEI values?

  • @carlosalejandromorales
    @carlosalejandromorales 2 роки тому

    Thank you very much Mr. Fitsum, I was having trouble understanding the method, but you have helped me a lot.

  • @samirlohani3316
    @samirlohani3316 4 роки тому +1

    can you say how to analyze the data. i am taking 30 yrs data. spi-3-6-12 which is relevant?

  • @annamarijafirere8040
    @annamarijafirere8040 3 роки тому +1

    I do have a question though. How is it possible to extract to SPEI3, SPEI6 data to excel?

  • @laura.taro_
    @laura.taro_ 2 роки тому

    hello! Sir, thank you for the video! But I have a question when i calculated SPEI, i got a -inf instead of results only for 1 year. I ve checked datasheet, and there everything is OK. Why have i gotten -inf? tnx

  • @harshupadhyay3207
    @harshupadhyay3207 2 роки тому

    Hello sir. I have plotted the SPI graph using plot(spi(ts(data$prcp, frequency = 12, start = c(1957,1)), scale = 1)) to get years on the time axis of the graph. But I noticed that there are also some grey lines in between the blue and red lines. Are these grey lines normal? Also, I have obtained 1-month SPI values which are exactly equal to zero for about 10 months in the same year and this has happened in multiple years. I wanted to ask if this is possible? Thank you.

  • @mahsumbozdogan7109
    @mahsumbozdogan7109 Рік тому

    Hi. I get this warning when I type the formula:
    [1] "Calculating the Standardized Precipitation Evapotranspiration Index (SPEI) at a time scale of 3. Using kernel type 'rectangular', with 0 shift. Fitting the data to a Gamma distribution. Using the ub-pwm parameter fitting method. Checking for missing values (`NA`): all the data must be complete. Using the whole time series as reference period. Input type is vector. No time information provided, assuming a monthly time series."
    Can you help me please?
    Thanks.

    • @mphatsosubili5653
      @mphatsosubili5653 9 місяців тому

      i am also getting the same error, did you manage to get it fixed? if yes, how?

  • @ЕрболатМуканов-х3и
    @ЕрболатМуканов-х3и 5 років тому +4

    Hello Mr. Fitsum, your videos are very useful! I would like to ask you,could you make video about statistical downscaling in R (package ClimDown) and how to prepare data for such kind of analysis in different format (netcdf and so on). Thank you in advance!!!

    • @shoaibali3992
      @shoaibali3992 5 років тому +1

      hello Ерболат Муканов, have you got any video about statistical downscaling in R? i am also looking for this but not yet obtained.

  • @temesgenfekadie519
    @temesgenfekadie519 Рік тому

    HOW CAN I CALCULATE THE COMBINED DROUGHT INDEX by R studio and how can down-scaled data !! thank you !!

  • @farahnusrat5639
    @farahnusrat5639 5 років тому +1

    Hi. Do you work with landsat or sentinel images? Can you please upload video about processing these images and analysis with python? Thank you.

  • @ghamandimalla9840
    @ghamandimalla9840 2 роки тому

    How do I calculate SPEI in R for varying latitudes ? For example, in lat = 7.3, I have many latitudes. How do I include all those ?

  • @hdrserkendiz2682
    @hdrserkendiz2682 2 роки тому

    Hi. How should we follow the spei calculation of the multi-station? can you show it with an R code? thanks.

  • @MengistuGelasso
    @MengistuGelasso 4 місяці тому

    Thanks so much for your breif explanation!

  • @behnamkhorrami594
    @behnamkhorrami594 3 роки тому

    Thank you . Could you pls tell us how we can get SPEI package?

  • @zhanassylteleubay2003
    @zhanassylteleubay2003 3 роки тому

    Thank you so much! I am curious If it is possible to calculate SPI and SPEI easily in raster format. Please, could you share If you know some tools/softwares for that?

    • @danielcantor6166
      @danielcantor6166 3 роки тому

      Yes, it is possible. You can load and transform raster data into a dataframe, but it is kinda complicated. Dplyr can help a lot.

    • @zhanassylteleubay2003
      @zhanassylteleubay2003 3 роки тому

      @@danielcantor6166 Thank you for your reply. Could you please explain what should I do with dplyr? Maybe you have some manuals. My mail is zhanassyl.kz@gmail.com

  • @abderrahmaneghenim5684
    @abderrahmaneghenim5684 4 роки тому

    Please, how to calculate PCD and PCP on basis of monthly data with Rstudio. Thanks

  • @afifatalukder5427
    @afifatalukder5427 2 роки тому

    Can you please tell me how can I make a spatial plot of SPEI

  • @bunmimudashiru8634
    @bunmimudashiru8634 4 роки тому

    is it possible to obtain spei scale of zero, tried in R studio, I didn't get it

  • @beatriceadoyo1946
    @beatriceadoyo1946 2 роки тому

    Exactly what I needed. Thank you!

  • @kaushikkharghoria6398
    @kaushikkharghoria6398 4 роки тому

    Which
    R version you used?

  • @annamarijafirere8040
    @annamarijafirere8040 3 роки тому

    This was unbelievably useful!

  • @mahmoudhamdy-tm7ho
    @mahmoudhamdy-tm7ho 4 роки тому

    thank you it's really helpful and I would be grateful if you can send some links for Rstudio

  • @nebabfs
    @nebabfs 4 роки тому

    good job man....it is very helpfull

  • @annamarijafirere8040
    @annamarijafirere8040 3 роки тому +1

    Hmm, to me it says: Error in as.matrix(Tmin) : object 'Addis' not found

  • @abdulaziz9301
    @abdulaziz9301 5 років тому

    Mr. Fistum can you ask me how to calculate precipitation lost?

  • @moseschisola9690
    @moseschisola9690 5 років тому +1

    Nice Video. But How do I calculate SPI to get results for each year. This procedure gives results per month per year, but I want SPI per year NOT per month. What should I do?

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      Use SPI12

    • @moseschisola9690
      @moseschisola9690 5 років тому

      @@Fitsum_Teshome
      Do you mean that since my hydrological year starts in October and ends in September the following year, I could extract the SPEI values for the month of September in each year to get the SPEI values at annual time scale?
      I want the final output to be like this:
      Year SPEI
      1990 xx
      1991 xx
      1992 xx
      I have seen the SPI package in R gives the results in the above format, but the problem is that I cant use it since it does not calculate SPEI

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      @@moseschisola9690 Yes

  • @jakobklemm2381
    @jakobklemm2381 Рік тому +1

    Is there anyone who has the same problem, that the plot.spei function just doesn't exist?

  • @bashirraihanmony9488
    @bashirraihanmony9488 Місяць тому

    How to extract SPEI data into excel?
    thank you

  • @lakminijayasinghe1312
    @lakminijayasinghe1312 3 роки тому

    can you say how to use netcdf data to find SPEI?

  • @travelwonder
    @travelwonder 7 місяців тому

    Good job done mate!

  • @nurulain1082
    @nurulain1082 4 роки тому

    Hello sir. Thank you for your video. Can I ask if I need to calculate the SPI so my data only consist of the precipitation data. And i uploaded the data set, the spi (file name$PRCP,3) but the outcome is NA. Anyone can help me? Thank you in advance! :)

  • @ahmedkmn6333
    @ahmedkmn6333 5 років тому

    Hi
    In the results, the number appears large, such as
    -9.869182e-01
    How do I get rid of this
    round(spei3_tho,digits=4)
    Error in round(spei3_tho, digits = 4) :
    non-numeric argument to mathematical function

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      This is not a big number
      -9.869182e-01 = -9.869182*10-1
      = -9.869182*0.1 which is -0.986918

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому +1

      E+01 means moving the decimal point one digit to the right, E+00 means leaving the decimal point where it is, and E-01 means moving the decimal point one digit to the left. Example: 1.00E+01 is 10, 1.33E+00 stays at 1.33, and 1.33E-01 becomes 0.133.

    • @ahmedkmn6333
      @ahmedkmn6333 5 років тому

      @@Fitsum_Teshome thanks

  • @shahed4243
    @shahed4243 3 роки тому

    How to install hargreaves function in rstudio?

  • @shubhangiwankhede5800
    @shubhangiwankhede5800 2 роки тому

    Thank you so much

  • @justynak.6737
    @justynak.6737 5 років тому

    I have an error:
    Error: Data must not contain NAs
    > spei3

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      Justyna K. Do you have missing data replaced by NA? If it is so remove it or share your dataset in fitsalem@gmail.com

    • @hernantiarikani18
      @hernantiarikani18 5 років тому +1

      @@Fitsum_Teshome Hello, How to fix the Error in spei(CWBAL, 3) : object 'CWBAL' not found? Thank you

    • @upasanasahoo8067
      @upasanasahoo8067 2 роки тому

      What is the meaning of CWBAL

  • @igorbranco5057
    @igorbranco5057 5 років тому

    How can I add the SPEI results to the precipitation and temperature data table?

    • @IAmShadrackKibet
      @IAmShadrackKibet 5 років тому

      just append it as a column on the data table

  • @dikaduba7558
    @dikaduba7558 5 років тому

    Fistum its really good jobs; perhaps I learn most from you. I really appreciate if you are able to convert time scale from (5, 10,15,20,25) to for an example (1981,1982,..., )so we can clearly identify which year is drought and which year is not, otherwise its little difficult to interpret the results from the graph

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      Check Magarsa's reply

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      For a video example: To plot a graph for SPEI-1 type the following command,
      Plot(spei(ts(Addis$CWBAL,freq=12,start=c(1985,1)),1,ref.start=c(1985,1),ref.end=c(2017,1)))
      "ts" is time series
      "Addis" is station name
      "CWBAL" is climatic water balance (Addis$PRCP-Addis$PET)
      "freq" is frequency which is twelve months

    • @bunmimudashiru8634
      @bunmimudashiru8634 4 роки тому

      @@Fitsum_Teshome, i have been able to plot all my scales 1,3,6 and 12 months, but when i tried plotting using this command to put the numbers in years.. by typing this command
      Plot(spei(ts(standp$CWBAL,freq=12,start=c(1982,1)),1,ref.start=c(1982,1),ref.end=c(2018,1)))
      the error message is
      Error in Plot(spei(ts(standp$CWBAL, freq = 12, start = c(1982, 1)), 1, :
      could not find function "Plot"
      i pray you respond

    • @afiamenchristeleattiogbe7502
      @afiamenchristeleattiogbe7502 2 роки тому

      may it not be "Plot" with a small "p"?

  • @kadirmokrane9848
    @kadirmokrane9848 5 років тому +1

    Nice Work!, But how to add the SPI index to map with legends

  • @thavhanyedzahumbulani3931
    @thavhanyedzahumbulani3931 5 років тому

    Nice Video, How do you change the period from 5,10,15,20 into the data period like 1985, 1986,1987 for instance.
    Thank you

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      I am not clear with your question
      Can you elaborate it more

    • @thavhanyedzahumbulani3931
      @thavhanyedzahumbulani3931 5 років тому +1

      @@Fitsum_Teshome Am asking about the time, is it possible to change years (as your data starts from 1985) to read from 1985 instead of the SPEI to read time in 5 years intarval (5,10,15)?

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      I dont think so

    • @thavhanyedzahumbulani3931
      @thavhanyedzahumbulani3931 5 років тому

      @@Fitsum_Teshome Owk thank you

    • @magarsaabara8682
      @magarsaabara8682 5 років тому +3

      @@thavhanyedzahumbulani3931 Yes it is possible. For example if you want to plot SPEI-1 graph which starts from 1985 and ends in 2017, type like this: plot(spei(ts(name af your data$PRCP-name af your data$PET,freq=12,start=c(1985,1)),1,ref.start=c(1985,1),ref.end=c(2017,1)))

  • @timotiwosmichael5424
    @timotiwosmichael5424 4 роки тому

    How to download Mann-Kendall trend test software program

  • @NguyenVanToan-th1dv
    @NguyenVanToan-th1dv Рік тому

    how to fix
    "Calculating reference evapotranspiration using the Hargreaves method. Using latitude (`lat`) to estimate extraterrestrial radiation. Checking for missing values (`NA`): all the data must be complete. Input type is vector. Assuming the data are monthly time series starting in January, all regular (non-leap) years."

  • @mdmasroor3494
    @mdmasroor3494 5 років тому +1

    Thank you much 🙏💕

  • @unujhjjjjjjjjjjjjj
    @unujhjjjjjjjjjjjjj 4 роки тому

    please upload spei nd spi calculation in netcdf file format?

  • @carlosMA07
    @carlosMA07 5 років тому

    Hi! How can I add dates to the plot?

  • @mohamedrifky9996
    @mohamedrifky9996 5 років тому

    Error in read.table(filename, header = TRUE) :
    'file' must be a character string or connection
    I am getting this error. Can you please help me on this?

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому

      String character but you need to specify column

    • @mohamedrifky9996
      @mohamedrifky9996 5 років тому

      @@Fitsum_Teshome Thanks for your reply.
      Can you tell how we can predict drought using R or Python. Is SPI needed to train and predict drought?

  • @shivanigond3403
    @shivanigond3403 5 років тому

    how can we calculate spi3,spi6,spi9,spi12??

    • @Fitsum_Teshome
      @Fitsum_Teshome  5 років тому +1

      If you have the same dataset format please use the following functions to get respective index.
      SPI3

  • @drissafnane2463
    @drissafnane2463 Рік тому

    Est ce que je peux changer la langue

  • @ahmedkmn6333
    @ahmedkmn6333 5 років тому +1

    thank you

  • @pratyusuhapriyadarshini7143
    @pratyusuhapriyadarshini7143 3 роки тому

    Can i get the excell sheet

  • @pratyusuhapriyadarshini7143
    @pratyusuhapriyadarshini7143 3 роки тому

    Pls give me the excel. Sheet

  • @nkemdilimekpeni4167
    @nkemdilimekpeni4167 4 роки тому +1

    HOW TO CHANGE 5, 10, 15 TO 1985, 1986, 1987

    • @nkemdilimekpeni4167
      @nkemdilimekpeni4167 4 роки тому

      PLS, HOW DO I INTERPRET THE SPEI PLOTS? THANKS

    • @getnetengdaw134
      @getnetengdaw134 Рік тому

      hello sir I try to watch your video, it is good. I would like to ask one question. How to calculate Reconnce Drought Index (RDI) by using Rstudio?

  • @jesusdavidguzmanperez7374
    @jesusdavidguzmanperez7374 3 роки тому

    alguien pudo cambiarle los valores del eje X a años?