Skip to content

Commit 8bf42bc

Browse files
committed
added an extra button in errorbar3 for 100 individuals, advice on how to sort
1 parent 32e8fbd commit 8bf42bc

4 files changed

Lines changed: 155 additions & 31 deletions

File tree

‎docs/activities.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ <h5 class="no-anchor card-title listing-title">
776776
</div>
777777
</div></a>
778778
</div>
779-
<div class="g-col-1" data-index="14" data-categories="QWxsJTIwQWdlcyUyQ0RhdGElMjBTY2llbmNlJTJDRW52aXJvbm1lbnRhbCUyMFNjaWVuY2UlMkNTcHJlYWRzaGVldHM=" data-listing-file-modified-sort="1782321029908" data-listing-reading-time-sort="7" data-listing-word-count-sort="1276">
779+
<div class="g-col-1" data-index="14" data-categories="QWxsJTIwQWdlcyUyQ0RhdGElMjBTY2llbmNlJTJDRW52aXJvbm1lbnRhbCUyMFNjaWVuY2UlMkNTcHJlYWRzaGVldHM=" data-listing-file-modified-sort="1783285850774" data-listing-reading-time-sort="9" data-listing-word-count-sort="1788">
780780
<a href="./projects/errorbar3.html" class="quarto-grid-link">
781781
<div class="quarto-grid-item card h-100 card-left">
782782
<p class="card-img-top">

‎docs/projects/errorbar3.html‎

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,12 @@ <h2 id="toc-title">On this page</h2>
151151
<ul class="collapse">
152152
<li><a href="#task-calculate-the-average-size-and-the-error-on-the-mean" id="toc-task-calculate-the-average-size-and-the-error-on-the-mean" class="nav-link" data-scroll-target="#task-calculate-the-average-size-and-the-error-on-the-mean">Task: Calculate the average size and the error on the mean</a></li>
153153
</ul></li>
154-
<li><a href="#two-new-species-snozzwanglers-and-hornswagglers" id="toc-two-new-species-snozzwanglers-and-hornswagglers" class="nav-link" data-scroll-target="#two-new-species-snozzwanglers-and-hornswagglers">Two new species: Snozzwanglers and Hornswagglers</a>
154+
<li><a href="#compare-results-with-your-classmates" id="toc-compare-results-with-your-classmates" class="nav-link" data-scroll-target="#compare-results-with-your-classmates">Compare results with your classmates</a>
155155
<ul class="collapse">
156-
<li><a href="#advice" id="toc-advice" class="nav-link" data-scroll-target="#advice">Advice</a></li>
156+
<li><a href="#advice-sort-the-data-by-column-a" id="toc-advice-sort-the-data-by-column-a" class="nav-link" data-scroll-target="#advice-sort-the-data-by-column-a">Advice: Sort the data by column A</a></li>
157+
<li><a href="#analyze-the-larger-data-set" id="toc-analyze-the-larger-data-set" class="nav-link" data-scroll-target="#analyze-the-larger-data-set">Analyze the larger data set</a></li>
157158
</ul></li>
159+
<li><a href="#two-new-species-snozzwanglers-and-hornswagglers" id="toc-two-new-species-snozzwanglers-and-hornswagglers" class="nav-link" data-scroll-target="#two-new-species-snozzwanglers-and-hornswagglers">Two new species: Snozzwanglers and Hornswagglers</a></li>
158160
<li><a href="#other-resources" id="toc-other-resources" class="nav-link" data-scroll-target="#other-resources">Other resources</a></li>
159161
</ul></li>
160162
</ul>
@@ -235,6 +237,29 @@ <h3 class="anchored" data-anchor-id="task-calculate-the-average-size-and-the-err
235237
</ul>
236238
</section>
237239
</section>
240+
<section id="compare-results-with-your-classmates" class="level2">
241+
<h2 class="anchored" data-anchor-id="compare-results-with-your-classmates">Compare results with your classmates</h2>
242+
<p>Once you have measured the mean and the error on the mean for both the male and females in the sample of 8 individuals, compare to your classmates. How similar or different are their results from yours? Does everyone agree on whether males or females are larger? How much larger are they finding?</p>
243+
<p>Here is another button where you can download data for a larger sample of Vermicious Knids (100 individual).</p>
244+
<div style="text-align: center; margin: 1.5rem 0;">
245+
<p><button id="download-knids2-btn">Download Vermicious Knids Data (100 individuals)</button></p>
246+
</div>
247+
<section id="advice-sort-the-data-by-column-a" class="level3">
248+
<h3 class="anchored" data-anchor-id="advice-sort-the-data-by-column-a">Advice: Sort the data by column A</h3>
249+
<p>It is possible to take a spreadsheet with 100 rows and to go one by one and separate all the males in the data and the females in the data for analysis, but it would take a long time. This is a situation that happens a lot with spreadsheets. There is data in particular rows that you are interested in, but these rows are not all together. For these situations the answer is to “sort” the data according to the value in one of the columns. In this case we want to sort by male or female, and that information is in Column A. So we want to sort by Column A.</p>
250+
<p style="text-align: right;">
251+
<b>Spreadsheet skill: Sort</b><br> When you need to re-arrange a table of data in a spreadsheet according to the value<br> in a specific column, then look for the option to “sort” the data
252+
</p>
253+
<p>Highlight the data by holding shift and clicking on the A of Column A and the B of Column B.</p>
254+
<p>In Google sheets, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and look for “Sort sheet” and an option should allow you to “Sort sheet by Column A”. You can sort ascending or descending. Either will do.</p>
255+
<p>In Excel, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and just click “Sort Ascending” or “Sort Descending”. Either will do.</p>
256+
<p>Look closely to find the row where the female data ends and the male data begins. When you calculate the average for the female and the average for the male, as well as the error on the mean, the range of the female data and the male data will be important to keep track of.</p>
257+
</section>
258+
<section id="analyze-the-larger-data-set" class="level3">
259+
<h3 class="anchored" data-anchor-id="analyze-the-larger-data-set">Analyze the larger data set</h3>
260+
<p>Now that you know how to sort the data into male and female, how does your analysis of this data compare to your earlier conclusions?</p>
261+
</section>
262+
</section>
238263
<section id="two-new-species-snozzwanglers-and-hornswagglers" class="level2">
239264
<h2 class="anchored" data-anchor-id="two-new-species-snozzwanglers-and-hornswagglers">Two new species: Snozzwanglers and Hornswagglers</h2>
240265
<p>There are now three new species: Vermicious Knids, Snozzwanglers and Hornswagglers. Obviously these are all fictional names. You can click on the link below to open up a new window where you can download data about these species. The species are not related so the average size difference between male and female should be treated separately for each species.</p>
@@ -248,11 +273,6 @@ <h2 class="anchored" data-anchor-id="two-new-species-snozzwanglers-and-hornswagg
248273
<li>How much bigger or smaller are male or female individuals on average?</li>
249274
<li>What is the minimum number of individuals that you would recommend be measured in order to feel like the conclusions about the average size were not being affected by having a small number of measurements.</li>
250275
</ul>
251-
<section id="advice" class="level3">
252-
<h3 class="anchored" data-anchor-id="advice">Advice</h3>
253-
<p>There are a couple of ways to accomplish these tasks. Generally the biggest challenge will be dealing with the larger datasets and separating the male rows from the female rows.</p>
254-
<p>One way (but not the only way) to separate the male rows from the female rows would be to highlight all the data and click “Sort” and then select a Sort on Column A because Column A will be where it says M or F.</p>
255-
</section>
256276
</section>
257277
<section id="other-resources" class="level2">
258278
<h2 class="anchored" data-anchor-id="other-resources">Other resources</h2>
@@ -267,21 +287,21 @@ <h2 class="anchored" data-anchor-id="other-resources">Other resources</h2>
267287
}
268288
}
269289

270-
let lines = [];
271-
let allM = true;
272-
let allF = true;
290+
let lines = [];
291+
let mCount = 0;
292+
let fCount = 0;
273293

274-
while (allM || allF) {
294+
while (mCount < 3 || fCount < 3) {
275295
lines = [];
276-
allM = true;
277-
allF = true;
296+
mCount = 0;
297+
fCount = 0;
278298

279299
for (let i = 0; i < 8; i++) {
280300
const gender = Math.random() < 0.5 ? 'M' : 'F';
281301
if (gender === 'M') {
282-
allF = false;
302+
mCount++;
283303
} else {
284-
allM = false;
304+
fCount++;
285305
}
286306

287307
const size = generateVermiciousKnidSize(gender);
@@ -307,6 +327,42 @@ <h2 class="anchored" data-anchor-id="other-resources">Other resources</h2>
307327
URL.revokeObjectURL(url);
308328
}, 0);
309329
});
330+
331+
document.getElementById('download-knids2-btn').addEventListener('click', () => {
332+
function generateVermiciousKnidSize(gender) {
333+
if (gender === 'M') {
334+
return (Math.random() - 0.5) * 30 + 100;
335+
} else { // Female
336+
return (Math.random() - 0.5) * 30 + 110;
337+
}
338+
}
339+
340+
let lines = [];
341+
342+
for (let i = 0; i < 100; i++) {
343+
const gender = Math.random() < 0.5 ? 'M' : 'F';
344+
const size = generateVermiciousKnidSize(gender);
345+
const formattedSize = size.toFixed(0);
346+
lines.push(`${gender},${formattedSize}`);
347+
}
348+
349+
const outputText = lines.join('\n');
350+
const blob = new Blob([outputText], { type: 'text/csv;charset=utf-8' });
351+
const url = URL.createObjectURL(blob);
352+
const a = document.createElement('a');
353+
354+
const timestamp = new Date().toISOString().slice(11, 19).replace(/:/g, '-');
355+
a.href = url;
356+
a.download = `vermicious_knids_dataset_${timestamp}.csv`;
357+
358+
document.body.appendChild(a);
359+
a.click();
360+
361+
setTimeout(() => {
362+
document.body.removeChild(a);
363+
URL.revokeObjectURL(url);
364+
}, 0);
365+
});
310366
</script>
311367

312368

‎docs/search.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@
15231523
"href": "projects/errorbar3.html#two-new-species-snozzwanglers-and-hornswagglers",
15241524
"title": "Error bars and animal sizes",
15251525
"section": "Two new species: Snozzwanglers and Hornswagglers",
1526-
"text": "Two new species: Snozzwanglers and Hornswagglers\nThere are now three new species: Vermicious Knids, Snozzwanglers and Hornswagglers. Obviously these are all fictional names. You can click on the link below to open up a new window where you can download data about these species. The species are not related so the average size difference between male and female should be treated separately for each species.\n\nClick here to download data about all three species in a new tab\n\nIn the link above, you can specify how many individuals of a particular species that you would like. But in real life it would be quite an effort to find 10,000 examples of a brand new species. So think about how many examples you might actually need.\nHere are some questions to answer for all three species:\n\nWhich is larger on average? Male or female?\nHow much bigger or smaller are male or female individuals on average?\nWhat is the minimum number of individuals that you would recommend be measured in order to feel like the conclusions about the average size were not being affected by having a small number of measurements.\n\n\nAdvice\nThere are a couple of ways to accomplish these tasks. Generally the biggest challenge will be dealing with the larger datasets and separating the male rows from the female rows.\nOne way (but not the only way) to separate the male rows from the female rows would be to highlight all the data and click “Sort” and then select a Sort on Column A because Column A will be where it says M or F."
1526+
"text": "Two new species: Snozzwanglers and Hornswagglers\nThere are now three new species: Vermicious Knids, Snozzwanglers and Hornswagglers. Obviously these are all fictional names. You can click on the link below to open up a new window where you can download data about these species. The species are not related so the average size difference between male and female should be treated separately for each species.\n\nClick here to download data about all three species in a new tab\n\nIn the link above, you can specify how many individuals of a particular species that you would like. But in real life it would be quite an effort to find 10,000 examples of a brand new species. So think about how many examples you might actually need.\nHere are some questions to answer for all three species:\n\nWhich is larger on average? Male or female?\nHow much bigger or smaller are male or female individuals on average?\nWhat is the minimum number of individuals that you would recommend be measured in order to feel like the conclusions about the average size were not being affected by having a small number of measurements."
15271527
},
15281528
{
15291529
"objectID": "projects/errorbar3.html#other-resources",
@@ -2343,5 +2343,12 @@
23432343
"title": "Building Inspector",
23442344
"section": "Why these sensors?",
23452345
"text": "Why these sensors?\n\nCarbon dioxide (CO2) is a harmless gas that we exhale. It is useful to measure CO2 because it tells us about how many people have been breathing in a room and how good the ventilation is. This indicates the risk for transmission of airborne viruses like COVID-19 and the common cold. Read more in the CO2 information Google Slide Deck\nPM2.5 is a type of particle pollution. PM2.5 means “particulate matter” with diameters less than 2.5 micrometers. Because these particles are so tiny, they can be easily inhaled and may even enter the bloodstream, which can have an impact on health over time. In classrooms, it may come from outdoor pollution like car exhaust as well as from heating systems, chalk, and drywall and cement wear. You can read more about PM2.5 from the Environmental Protection Agency\nNoise can be considered a form of pollution. In the classroom, noise may originate from student chatter, nearby traffic, or loud HVAC systems. Over time, high noise pollution can contribute to stress related illnesses, high blood pressure, hearing loss, and lost productivity. High noise levels can interfere with learning as students have trouble hearing the teacher, concentrating, and remembering as discussed in this report. If an area has high noise levels, it may be possible to reduce the noise levels with acoustic tiles on the walls or ceiling or by adding carpet."
2346+
},
2347+
{
2348+
"objectID": "projects/errorbar3.html#compare-results-with-your-classmates",
2349+
"href": "projects/errorbar3.html#compare-results-with-your-classmates",
2350+
"title": "Error bars and animal sizes",
2351+
"section": "Compare results with your classmates",
2352+
"text": "Compare results with your classmates\nOnce you have measured the mean and the error on the mean for both the male and females in the sample of 8 individuals, compare to your classmates. How similar or different are their results from yours? Does everyone agree on whether males or females are larger? How much larger are they finding?\nHere is another button where you can download data for a larger sample of Vermicious Knids (100 individual).\n\nDownload Vermicious Knids Data (100 individuals)\n\n\nAdvice: Sort the data by column A\nIt is possible to take a spreadsheet with 100 rows and to go one by one and separate all the males in the data and the females in the data for analysis, but it would take a long time. This is a situation that happens a lot with spreadsheets. There is data in particular rows that you are interested in, but these rows are not all together. For these situations the answer is to “sort” the data according to the value in one of the columns. In this case we want to sort by male or female, and that information is in Column A. So we want to sort by Column A.\n\nSpreadsheet skill: Sort When you need to re-arrange a table of data in a spreadsheet according to the value in a specific column, then look for the option to “sort” the data\n\nHighlight the data by holding shift and clicking on the A of Column A and the B of Column B.\nIn Google sheets, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and look for “Sort sheet” and an option should allow you to “Sort sheet by Column A”. You can sort ascending or descending. Either will do.\nIn Excel, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and just click “Sort Ascending” or “Sort Descending”. Either will do.\nLook closely to find the row where the female data ends and the male data begins. When you calculate the average for the female and the average for the male, as well as the error on the mean, the range of the female data and the male data will be important to keep track of.\n\n\nAnalyze the larger data set\nNow that you know how to sort the data into male and female, how does your analysis of this data compare to your earlier conclusions?"
23462353
}
23472354
]

0 commit comments

Comments
 (0)