write a lab report following the instructions below and by using R studio and USGS to make NDVI map.
   R is an open-source programing language for statistical analysis, data processing and
visualization.
INSTALLING R and R Studio
R and R Studio are separate packages. Therefore, as the first step, you will need to install R.
R is the basic package we are using. R Studio is an add-on that make R easier to use for
beginners. I encourage you to learn to use R, especially if you will be taking other statistics
courses, where you may be expected to know how to use it.
These instructions should work for Windows and MAC users for installing R and R Studio.
INSTALLING R:
Go to http://www.r-project.org/, on the left top click “CRAN”
Find a site of your choice. (The one at Texas is close to us, but you can use any of them.) Click
to go to that site.
1
2
Click on your operating system (Windows, MAC, Linux) and follow directions.
If Windows, click on “base” and then on Download R 4.0.4 for Windows. (Note that 4.0.4 is the
current version as this is being written but use whatever shows up as current.)
3
You may need to save the file “R-4.0.4-win.exe,” and then click on it to execute it. When the
dialog box opens, click “RUN.” A Setup Wizard should appear. Keep clicking “Next” (or change
features if you understand them), until it is finished. You should now see an icon on your
desktop, with a large capital “R.”
If Mac, click on “base” and then on Download R-4.0.4.pkg. (Note that 4.0.4 is the current
version as this is being written but use whatever shows up as current.)
You may need to save the file “R-4.0.4.pkg,” and then click on it to install it.
INSTALLING R STUDIO:
Go to http://www.rstudio.com, click on “Download RStudio” and follow the directions for your
operating system.
https://rstudio.com/products/rstudio/
4
Click “DOWNLOAD RSTUDIO DESKTOP”.
5
6
Choose the appropriate version and download it for your system.
Install the R Studio and proceed to next step.
USING R AND R STUDIO
Open R Studio by clicking on the icon.
You’re ready to go!
EXITING R AND R STUDIO
You can exit both at the same time using File → Quit R Studio Or you can type q() at the
command prompt. Note that this is the letter q followed by open and closed parentheses.
7
Install package to R for processing satellite images. Two packages (“rgdal” and “raster”) are
needed.
Open the R Studio
On the right side, click “Package”, install
8
Install “rgdal” and “raster” two packages
In the script windows
Type “
9
library(rgdal)
getGDALVersionInfo()
library(raster)
“
If you are not able to locate the package, you might have old version of the R, please download
and install the new version R, or use other mirror websites.
If no error message pops up, you are succeeded. Congratulations, you are ready for data
processing with R script in three weeks.
10
Course project #3
Mapping spatial distribution of vegetation with Landsat 8
First section – preparation user account
1. Create an account at USGS website for downloading the Landsat 8 images
https://ers.cr.usgs.gov/login?redirectUrl=https://ers.cr.usgs.gov/
Second section – Download the landsat 8 images
2. Open Google Chrome or IE. Google “USGS LandSat”, click “EarthExplorer-USGS”
3. You will see the below website https://earthexplorer.usgs.gov/,
1
4. At the website of https://earthexplorer.usgs.gov/, left column, click “Decimal” option. In the
popup window, then click Add Coordinates of San Diego (32.7 N, 117.2W; 32.7, -117.2). You
may need to create an account to proceed.
5. Choose the dataset as 
