辅导案例-CASA0013

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
Introduction to Programming for Spatial Analysts: CASA0013
Final Assessment: Guidelines and Adjustments

Hi all! We wanted to give a few tips and pointers, and also to suggest a few MINOR ADJUSTMENTS
to Task 5 which we think will make the assessment a bit more straightforward. We’ve been working
through the examples ourselves again, so these are based on our own experiences.

EXAMPLE OUTPUT

We’ve attached a series of sample input files, which should produce the following output.

superSimpleCases.tsv - should produce the output shown below in Figure 1. This is the basic kind of
file the work will be assessed against for a passing mark.

Figure 1 Output associated with superSimpleCases.tsv
sampleCases.tsv - should produce the output shown below in Figure 2. This is the kind of file the
work will be assessed against for merit and distinction.

Figure 2 Output associated with sampleCases.tsv
sampleCases3.tsv - no output, the file is empty; user should know to halt at Task 1. Handling these
kinds of files successfully will contribute toward merit or distinction.

MINOR ADJUSTMENTS TO TASK 5

Below are a few minor modifications to Task 5 which makes it a bit easier (and prettier). In the real
world, sometimes you are forced to handle really weird and ugly workflows, but for now let’s focus
on the important stuff!

• it can be a pain to make sure that you don't export a single, final empty line on your output
file sample_output.txt. So we've added a line to omit any empty lines in sample_output.txt.

if(line.length == 1) continue;

• because of the way we're building the Array of latitude and longitude values, it's much
better to make sure you're adding the elements as numbers from the beginning. Cast them
in the read-in portion.

cs.lat.push(Number(line[0]));
cs.lon.push(Number(line[1]));
cs.count.push(Number(line[2]));

• We've made the bars a bit wider so you can see them more easily.

div.style.width = (x * 10) + "px";

• We've styled the bars a little more, just because they were SO UGLY.

.mybar {height: 30px; margin: 2px; padding: 3px; background-
color: #0000FF; color: #FFFFFF; font-size: 8pt; white-space:
nowrap;}


The adjusted version of code that should go in the final Task is as on the following page (the edited
sections are highlighted in yellow font. If for any reason you need this information in a different
format, please contact us and we’ll make it accessible to you immediately!).



%%html









Barchart of Results


Summary Statistics








51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468