0

There is a MODIS dataset called MCD14ML (collection 5), which contains some information about observed hotspots. In particular, I'm working with a subset of the dataset that is concerned with hotspots in 2003 and in the Australian region. I have downloaded a csv file, and I've attached a screenshot below.

enter image description here

I've imported this csv file into R, and have it as a dataframe. Now, there's another MODIS dataset called MYD13A3 which contains NDVI information for regions.

I would like to construct a model (e.g. GAM) with "type" in the picture above as a response variable, and NDVI as an explanatory variable, with the "type" and NDVI corresponding to each other in the sense that they're both attributes of the same location (in terms of latitude and longitude).

I know how to construct linear models (including GAMs) in general in R, using the mgcv package. Normally, you would have a dataframe with your response variable as one column and your explanatory variables in other columns. The issue is that I don't know how to construct such a dataframe containing the NDVI values for each location. I have downloaded a small subset of the MYD13A3 dataset (as hdf files) using getHdf, but I don't know to extract the NDVI values from them and store them into say a dataframe or variable.

How can I do this?

If there's another, more conventional way of setting NDVI values (from MODIS datasets) as explanatory variables, please let me know.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.