Week 2 Assignment: R
Class – for this assignment, you will have the opportunity to practice many of the R concepts introduced. You will also have the opportunity to learn several new R libraries including Leaflet. Read everything I have written here very carefully.
Instructions:
1) First, review my R code. It is a solution that creates an interactive map that offers expansion and User options.
Here is a link to the map generated by the R code: http://drgates.georgetown.domains/US_county_cancer_poll_map.html
Here is a link to the R code: drgates.georgetown.domains/ANLY500/data/ANLY500_LeafletMapCOPY.R Here is a link to the datasets: http://drgates.georgetown.domains/ANLY500/data/
2) Next, *add on* to my code so that the Map retains all of its current properties AND it also offers two
(2) further User options.
To add User options, you will need to find and clean data that has information about counties. You can add locations of powerplants, you can add further disease data, you can add locations of national parks, etc. etc. It is up to you. You will need to determine how to place the data onto the map – such as with lat and long, FIPS, and/or choropleth. My code has examples and explanations.
Notice that right now, the map is a chorpleth map (color-coded counties) with markers – and with pop- up options that show cancer rates for each state (also color-coded). There is also a clickable option that the User can click that will show (and pop-up information about) Land Use. Notice that the Land Use Sites is a check box that the User can choose or not choose. You can expand or contract this map in real- time. For example, you can look just at the state of CO to see land use there.
Examples:
Here, you can see the map and the Land Use Sites is clicked. You can click on any blue marker or on any colored county and a pop-up will offer further information. All blue markers are for land use in that location. They all have a pop-up option. The User can remove all blue markers by unchecking the Land Use Sites option.
Next, here I have unclicked (unselected) the Land Use Sites option, and so you can only see the colored counties (choropleth) for cancer rates. If you click any county, a pop-up will appear with rate information.
Finally, you can pan in and out (expand and contract) the map in real time to view specific states or counties. Here I am looking at CO.
3) Your goal is to understand all the steps first and review the R code and R methods. Next, you will find data that you can add to this map. You should add on using options – so that the User can check the box or not. For example, if you add National Park Locations, you would have a check box that the User can choose to select. If the User checks the box, markers will appear for all national parks. Each marker should have a pop-up that offers information about that park, etc. Because my markers are blue, it is best to choose a different color.
4) Again, you will add two (2) further User options for the map.
The goal of this assignment is for you to see R in action, to learn about new libraries, and to learn to find, clean, manipulate, and work with data. It is important to learn to find data, to clean and prepare data, and to link data together for visualization.
Deliverables:
1) Your R code that will include my code and all that you added on to it. Your code MUST run and must produce an interactive map that has three (3) further User options.
** Where ever you add your code – place COMMENTS around your code with your name and what your code does.
2) My code also generates an html file that allows you to place this map online. It is optional to place your map online using the html file. If you do this, please also include the URL to your map. Again, this is optional.
3) Include any and all datasets that you use (after they are clean). Make sure that you include everything necessary for your code to run. Submitted code must run in R Studio, must generate the interactive map, and must have User options as noted above.
4) Place everything for your code into a zip folder and email the zip folder to the TA and cc me. The title of the email must be Week 2 Assignment. Your name MUST be in the email.
Again, the zip folder must contain EVERYTHING necessary to run your code and the map.
代写CS&Finance|建模|代码|系统|报告|考试
编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习
金融类:统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理
服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导
E-mail:850190831@qq.com 微信:BadGeniuscs 工作时间:无休息工作日-早上8点到凌晨3点
如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。