Skip to content

Commit bfb37ef

Browse files
committed
Added nomap option
1 parent dc6b0f7 commit bfb37ef

4 files changed

Lines changed: 26 additions & 8 deletions

File tree

SedimentDataExplorer.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ <h2>Select Chemicals</h2>
237237

238238
<div>
239239
Sample sorting for charts
240+
<input type="radio" name="sorting" id="unsorted" value="unsorted" checked>
241+
<label for="unsorted">Unsorted</label>
240242
<input type="radio" name="sorting" id="longitude" value="longitude">
241243
<label for="longitude">Longitude</label>
242244
<input type="radio" name="sorting" id="latitude" value="latitude">
@@ -261,7 +263,7 @@ <h2>Select Chemicals</h2>
261263
<label for="sand">Weight fraction of sand</label>
262264
<input type="radio" name="sorting" id="gravel" value="gravel">
263265
<label for="gravel">Weight fraction of gravel</label>
264-
<input type="radio" name="sorting" id="normal" value="normal" checked>
266+
<input type="radio" name="sorting" id="normal" value="normal">
265267
<label for="normal">Date of sampling</label>
266268
<input type="radio" name="sorting" id="datelongitude" value="datelongitude">
267269
<label for="datelongitude">Date of sampling then longitude</label>
@@ -320,8 +322,10 @@ <h2>Select Chemicals</h2>
320322
<div id="fileDisplay">
321323
</div>
322324
<div id="sample-info-table-container"></div>
323-
<div id="map" style="height: 800px;"></div>
324-
Radar Popup: <div id="radarPlots"></div>
325+
<div id="everything-maps" style="display: none;">
326+
<div id="map" style="height: 800px;"></div>
327+
Radar Popup: <div id="radarPlots"></div>
328+
</div>
325329
<div id="chartContainer"></div>
326330
<div id="chartsForMapContainer"></div>
327331
<script src="https://rawgit.com/kawanet/msgpack-lite/master/dist/msgpack.min.js"></script>

SedimentDataExplorer.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
subName = subChartNames[i];
7070
subsToDisplay[subName] = false;
7171
}
72-
sortingOptions = ['normal', 'datelatitude', 'datelongitude', 'datetotalarea', 'latitude', 'longitude', 'totalarea', 'silt', 'siltsand', 'sand', 'gravel',
72+
sortingOptions = ['unsorted', 'normal', 'datelatitude', 'datelongitude', 'datetotalarea', 'latitude', 'longitude', 'totalarea', 'silt', 'siltsand', 'sand', 'gravel',
7373
'totalhcsort', 'lmw', 'hmw', 'ices7', 'allpcbs', 'datelmw', 'datehmw', 'dateices7', 'dateallpcbs'];
7474
sortButtonGroups['area'] = [...sortingOptions.filter(option => option.includes('area')), ...subChartNames.filter(option => option.includes('area'))];
7575
sortButtonGroups['PCB data'] = [...sortingOptions.filter(option => option.includes('pcb') || option.includes('ices7'))];/*,
@@ -692,8 +692,20 @@ function importData() {
692692
}
693693
checkboxParameters(suppliedParams, 'selcharts', dataSheetNamesCheckboxes);
694694
checkboxParameters(suppliedParams, 'subcharts', subChartNames);
695-
const noninter = suppliedParams.get('noninter');
696-
if (!noninter) {
695+
const featuresParams = suppliedParams.get('features');
696+
if (featuresParams) {
697+
features = featuresParams.split(',').map(feature => feature.trim()); // Split comma-separated features
698+
if(!features.includes('nomap')) {
699+
const everythingMaps = document.getElementById('everything-maps');
700+
everythingMaps.style.display = 'inline';
701+
}
702+
if(!features.includes('noninter')) {
703+
const everything = document.getElementById('everything');
704+
everything.style.display = 'inline';
705+
}
706+
} else {
707+
const everythingMaps = document.getElementById('everything-maps');
708+
everythingMaps.style.display = 'inline';
697709
const everything = document.getElementById('everything');
698710
everything.style.display = 'inline';
699711
}

sdeCharts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ function displayGorhamTest(sums, sheetName, instanceNo, unitTitle) {
12781278
convas.style.display = "block";
12791279
instanceType[instanceNo] = 'gorham';
12801280
instanceSheet[instanceNo] = sheetName;
1281-
const lmw = ['Acenaphthene', 'Acenaphthylene', 'Anthracene', 'Fluorene', 'C1-Naphthalenes', 'Naphthalene', 'Phenanthrene'];
1281+
const lmw = ['Acenapthene', 'Acenapthylene', 'Anthracene', 'Fluorene', 'C1-Napthalenes', 'Napthalene', 'Phenanthrene'];
12821282
const hmw = ['Benz[a]anthracene', 'Benzo[a]pyrene', 'Chrysene', 'Dibenz[a,h]anthracene', 'Fluoranthene', 'Pyrene'];
12831283
const LMW = {
12841284
ERL: 552,

sdeDataUtilities.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ Array.prototype.sortComplexSamples = function() {
253253
}
254254

255255
// Default case if no valid sort key is provided
256+
// Usorted
256257
return 0;
257258
});
258259
};
@@ -544,7 +545,7 @@ function pahPostProcess(newMeas,dateSampled) {
544545
mmeas = newMeas;
545546
sums = {};
546547
// Goring Test protocol here, but results stored by sample
547-
const lmw = ['Acenaphthene', 'Acenaphthylene', 'Anthracene', 'Fluorene', 'C1-Naphthalenes', 'Naphthalene', 'Phenanthrene'];
548+
const lmw = ['Acenapthene', 'Acenapthylene', 'Anthracene', 'C1-Napthalenes', 'Fluorene','Napthalene', 'Phenanthrene'];
548549
const hmw = ['Benz[a]anthracene', 'Benzo[a]pyrene', 'Chrysene', 'Dibenz[a,h]anthracene', 'Fluoranthene', 'Pyrene'];
549550

550551
for (const chemical in mmeas.chemicals) {
@@ -559,6 +560,7 @@ function pahPostProcess(newMeas,dateSampled) {
559560
//console.log(meas[chemical][sample]);
560561
if (lmw.includes(chemical)) {
561562
const lmwConcentrationSum = mmeas.chemicals[chemical].samples[sample] || 0;
563+
//console.log(chemical,sample,lmwConcentrationSum);
562564
sums[sample].lmwSum += lmwConcentrationSum;
563565
} else if (hmw.includes(chemical)) {
564566
const hmwConcentrationSum = mmeas.chemicals[chemical].samples[sample] || 0;

0 commit comments

Comments
 (0)