After completing this tutorial, you will be able to:
What you need
You will need a computer with internet access to complete this lesson and the data for week 6 of the course.
Landsat data are often saved using a date that includes the year and the day of year. You can quickly convert day of year to date as follows:
Here is our file name:
Looking at the name, we can see that the data were collected 2016-189. This references the 189th day of the year in 2016.
We can quickly convert this in
# note that R uses a 0 based index for dates only # this means it starts counting at 0 rather than 1 when working with dates as.Date(0, origin = "2016-01-01") ##  "2016-01-01" # note that R uses a 0 based index as.Date(1, origin = "2016-01-01") ##  "2016-01-02" # figure out the date for day 189 as.Date(189, origin = "2016-01-01") ##  "2016-07-08"