Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Homework 1: STA465/2016

Homework 1 is due on Friday, January 27th by the beginning of class. The homework assignment is worth 25 points in total.

Question 1 (10 pts)

Use the‘World’data set available in the R package tmap.

Question 1.1

What type of spatial object is the‘World’data set? What is the CRS?

Question 1.2

Using the projection argument of tm_shape(), create maps of the World data set with two other projections. State what aspect(s) are preserved with the projections you use.  Comment on the visual differences and biases across the three maps.

Question 1.3

The ‘World’ data set contains a column labeled HPI” that stands for Happy Planet Index.  Information

about this metric can be found here: http://happyplanetindex.org Make a four panel map that plots: HPI, life expectancy, footprint and inequality.

Question 2 (10 pts)

Altitude data for the USA can be obtained using the raster R package:

usa_elev  <-  raster ::getData( 'alt ' ,  country= 'USA ' ,  level=1)

Select the altitude data for Oahu, Hawaii, only.

Question 2.1

Make the altitude data for Oahu into a spatial object with geometry type points. Include R code used and output of the data set to show that it is in fact now a spatial object. Do not forget to select a CRS.

Question 2.2

Using a basemap of your choosing, plot the altitude points onto a map of Oahu. Allow the points to change colors by altitude. Include R code used.

Question 2.3

Convert the spatial object into a raster, and plot the raster. Include R code and show that the object is now a raster.

Question 2.4

Download the data for organic matter at https://gis.ctahr.hawaii.edu/SoilAtlas#downloads.  What soil or-

ders of organic matters exist at altitudes of > 500 m?  Make a map of the organic matter soil orders for altitudes > 500 m. Include R code.

Question 3 (5 pts)

Question 3.1

Using the R packages tmap or mapview, make the plot in Question 1.4 interactive.

Question 3.2

Using the R packages tmap or mapview, make the plot in Question 2.2 interactive.