Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using SQL, how to solve this? 3.2 Joining and Mapping We will now use of this code and libraries to plot the map of North
Using SQL, how to solve this?
3.2 Joining and Mapping We will now use of this code and libraries to plot the map of North America with various overlays taken from the databases. We'll use the library rworldmap. You may need to install this package with the command rworldmap. Basic usage is as follows: library (sp) library (rworldmap) ## ### Welcome to rworldmap ### ## For a short introduction type : vignette('rworldmap') library (rworldxtra) worldmap = get Map (resolution = "high") Nrth Am = worldmap [which (worldmap$REGION=="North America"),] plot (NrthAm, col="white", bg="lightblue", xlim=c(-140, -55), ylim=c(55,60)) Question 4a, 6 points): Plot the locations on the Canadian map where Population in 2006 is less than the last five digits of your student id number. Make your query and plot your locations as points on your map using data obtained by your SQL query and other plotting tools from last lab. Submit your result as a .pdf file of the plot (remember to title the plot). Hint: after plotting using the above code, you may overlay points with this command: points(x=longitude, y=latitude, col='red', pch=16), where longitude and latitude are vectors of longitudes and latitudes resp. 3.2 Joining and Mapping We will now use of this code and libraries to plot the map of North America with various overlays taken from the databases. We'll use the library rworldmap. You may need to install this package with the command rworldmap. Basic usage is as follows: library (sp) library (rworldmap) ## ### Welcome to rworldmap ### ## For a short introduction type : vignette('rworldmap') library (rworldxtra) worldmap = get Map (resolution = "high") Nrth Am = worldmap [which (worldmap$REGION=="North America"),] plot (NrthAm, col="white", bg="lightblue", xlim=c(-140, -55), ylim=c(55,60)) Question 4a, 6 points): Plot the locations on the Canadian map where Population in 2006 is less than the last five digits of your student id number. Make your query and plot your locations as points on your map using data obtained by your SQL query and other plotting tools from last lab. Submit your result as a .pdf file of the plot (remember to title the plot). Hint: after plotting using the above code, you may overlay points with this command: points(x=longitude, y=latitude, col='red', pch=16), where longitude and latitude are vectors of longitudes and latitudes respStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started