-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MichaelWoodc/degree-required-integrated
Degree required integrated
- Loading branch information
Showing
27 changed files
with
229,768 additions
and
2,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
+-------------+------+--------+---------+-----------+ | ||
| series id | year | period | value | footnotes | | ||
+-------------+------+--------+---------+-----------+ | ||
| CUUR0000SA0 | 2014 | M12 | 234.812 | | | ||
| CUUR0000SA0 | 2014 | M11 | 236.151 | | | ||
| CUUR0000SA0 | 2014 | M10 | 237.433 | | | ||
| CUUR0000SA0 | 2014 | M09 | 238.031 | | | ||
| CUUR0000SA0 | 2014 | M08 | 237.852 | | | ||
| CUUR0000SA0 | 2014 | M07 | 238.250 | | | ||
| CUUR0000SA0 | 2014 | M06 | 238.343 | | | ||
| CUUR0000SA0 | 2014 | M05 | 237.900 | | | ||
| CUUR0000SA0 | 2014 | M04 | 237.072 | | | ||
| CUUR0000SA0 | 2014 | M03 | 236.293 | | | ||
| CUUR0000SA0 | 2014 | M02 | 234.781 | | | ||
| CUUR0000SA0 | 2014 | M01 | 233.916 | | | ||
| CUUR0000SA0 | 2013 | M12 | 233.049 | | | ||
| CUUR0000SA0 | 2013 | M11 | 233.069 | | | ||
| CUUR0000SA0 | 2013 | M10 | 233.546 | | | ||
| CUUR0000SA0 | 2013 | M09 | 234.149 | | | ||
| CUUR0000SA0 | 2013 | M08 | 233.877 | | | ||
| CUUR0000SA0 | 2013 | M07 | 233.596 | | | ||
| CUUR0000SA0 | 2013 | M06 | 233.504 | | | ||
| CUUR0000SA0 | 2013 | M05 | 232.945 | | | ||
| CUUR0000SA0 | 2013 | M04 | 232.531 | | | ||
| CUUR0000SA0 | 2013 | M03 | 232.773 | | | ||
| CUUR0000SA0 | 2013 | M02 | 232.166 | | | ||
| CUUR0000SA0 | 2013 | M01 | 230.280 | | | ||
| CUUR0000SA0 | 2012 | M12 | 229.601 | | | ||
| CUUR0000SA0 | 2012 | M11 | 230.221 | | | ||
| CUUR0000SA0 | 2012 | M10 | 231.317 | | | ||
| CUUR0000SA0 | 2012 | M09 | 231.407 | | | ||
| CUUR0000SA0 | 2012 | M08 | 230.379 | | | ||
| CUUR0000SA0 | 2012 | M07 | 229.104 | | | ||
| CUUR0000SA0 | 2012 | M06 | 229.478 | | | ||
| CUUR0000SA0 | 2012 | M05 | 229.815 | | | ||
| CUUR0000SA0 | 2012 | M04 | 230.085 | | | ||
| CUUR0000SA0 | 2012 | M03 | 229.392 | | | ||
| CUUR0000SA0 | 2012 | M02 | 227.663 | | | ||
| CUUR0000SA0 | 2012 | M01 | 226.665 | | | ||
| CUUR0000SA0 | 2011 | M12 | 225.672 | | | ||
| CUUR0000SA0 | 2011 | M11 | 226.230 | | | ||
| CUUR0000SA0 | 2011 | M10 | 226.421 | | | ||
| CUUR0000SA0 | 2011 | M09 | 226.889 | | | ||
| CUUR0000SA0 | 2011 | M08 | 226.545 | | | ||
| CUUR0000SA0 | 2011 | M07 | 225.922 | | | ||
| CUUR0000SA0 | 2011 | M06 | 225.722 | | | ||
| CUUR0000SA0 | 2011 | M05 | 225.964 | | | ||
| CUUR0000SA0 | 2011 | M04 | 224.906 | | | ||
| CUUR0000SA0 | 2011 | M03 | 223.467 | | | ||
| CUUR0000SA0 | 2011 | M02 | 221.309 | | | ||
| CUUR0000SA0 | 2011 | M01 | 220.223 | | | ||
+-------------+------+--------+---------+-----------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
+-----------+------+--------+-------+-----------+ | ||
| series id | year | period | value | footnotes | | ||
+-----------+------+--------+-------+-----------+ | ||
+-----------+------+--------+-------+-----------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
+-------------+------+--------+---------+-----------+ | ||
| series id | year | period | value | footnotes | | ||
+-------------+------+--------+---------+-----------+ | ||
| SUUR0000SA0 | 2014 | M12 | 134.207 | | | ||
| SUUR0000SA0 | 2014 | M11 | 135.107 | | | ||
| SUUR0000SA0 | 2014 | M10 | 135.891 | | | ||
| SUUR0000SA0 | 2014 | M09 | 136.211 | | | ||
| SUUR0000SA0 | 2014 | M08 | 136.127 | | | ||
| SUUR0000SA0 | 2014 | M07 | 136.392 | | | ||
| SUUR0000SA0 | 2014 | M06 | 136.433 | | | ||
| SUUR0000SA0 | 2014 | M05 | 136.216 | | | ||
| SUUR0000SA0 | 2014 | M04 | 135.771 | | | ||
| SUUR0000SA0 | 2014 | M03 | 135.375 | | | ||
| SUUR0000SA0 | 2014 | M02 | 134.542 | | | ||
| SUUR0000SA0 | 2014 | M01 | 134.017 | | | ||
| SUUR0000SA0 | 2013 | M12 | 133.509 | | | ||
| SUUR0000SA0 | 2013 | M11 | 133.596 | | | ||
| SUUR0000SA0 | 2013 | M10 | 133.876 | | | ||
| SUUR0000SA0 | 2013 | M09 | 134.255 | | | ||
| SUUR0000SA0 | 2013 | M08 | 134.098 | | | ||
| SUUR0000SA0 | 2013 | M07 | 133.919 | | | ||
| SUUR0000SA0 | 2013 | M06 | 133.900 | | | ||
| SUUR0000SA0 | 2013 | M05 | 133.626 | | | ||
| SUUR0000SA0 | 2013 | M04 | 133.421 | | | ||
| SUUR0000SA0 | 2013 | M03 | 133.558 | | | ||
| SUUR0000SA0 | 2013 | M02 | 133.204 | | | ||
| SUUR0000SA0 | 2013 | M01 | 132.137 | | | ||
| SUUR0000SA0 | 2012 | M12 | 131.770 | | | ||
| SUUR0000SA0 | 2012 | M11 | 132.208 | | | ||
| SUUR0000SA0 | 2012 | M10 | 132.892 | | | ||
| SUUR0000SA0 | 2012 | M09 | 132.988 | | | ||
| SUUR0000SA0 | 2012 | M08 | 132.430 | | | ||
| SUUR0000SA0 | 2012 | M07 | 131.731 | | | ||
| SUUR0000SA0 | 2012 | M06 | 131.956 | | | ||
| SUUR0000SA0 | 2012 | M05 | 132.154 | | | ||
| SUUR0000SA0 | 2012 | M04 | 132.284 | | | ||
| SUUR0000SA0 | 2012 | M03 | 131.905 | | | ||
| SUUR0000SA0 | 2012 | M02 | 130.953 | | | ||
| SUUR0000SA0 | 2012 | M01 | 130.438 | | | ||
| SUUR0000SA0 | 2011 | M12 | 129.844 | | | ||
| SUUR0000SA0 | 2011 | M11 | 130.196 | | | ||
| SUUR0000SA0 | 2011 | M10 | 130.373 | | | ||
| SUUR0000SA0 | 2011 | M09 | 130.635 | | | ||
| SUUR0000SA0 | 2011 | M08 | 130.351 | | | ||
| SUUR0000SA0 | 2011 | M07 | 129.983 | | | ||
| SUUR0000SA0 | 2011 | M06 | 129.846 | | | ||
| SUUR0000SA0 | 2011 | M05 | 129.999 | | | ||
| SUUR0000SA0 | 2011 | M04 | 129.483 | | | ||
| SUUR0000SA0 | 2011 | M03 | 128.585 | | | ||
| SUUR0000SA0 | 2011 | M02 | 127.363 | | | ||
| SUUR0000SA0 | 2011 | M01 | 126.778 | | | ||
+-------------+------+--------+---------+-----------+ |
Binary file removed
BIN
-2.34 KB
apicache/0c28bbdde90ce46c40c2adaf87f7339ec19a729dcb00249ff42f41f8dc1f8142
Binary file not shown.
Binary file removed
BIN
-1.32 KB
apicache/3153446787d457631aa6ec636af843866c871f5f56b09283e0246b7b9b7addba
Binary file not shown.
Binary file removed
BIN
-7.3 KB
apicache/51852b6e6c8ad5c02d87b0d5c643324a490c00b02cb5151c3423567416b6418a
Binary file not shown.
Binary file removed
BIN
-67.9 KB
apicache/6c747ab03ef6057844368f3b049a1404d70481ded4bac6d14a1eb12f2c9177dd
Binary file not shown.
Binary file removed
BIN
-1.12 KB
apicache/7f19f9d02421f697179c40f256cc2bc26874d465db53e709c6554e645592b0a1
Binary file not shown.
Binary file removed
BIN
-31.1 KB
apicache/9f4738a9683ad8317eccf68a9f0ac99733ad245f8591f27775196ff85281262f
Binary file not shown.
Binary file removed
BIN
-4.82 KB
apicache/c8cfa01cfa3d31d40333531ef714e97d7a0ded341ad1ee57a084cb1ede53f371
Binary file not shown.
Binary file removed
BIN
-6.46 KB
apicache/e87d1f5aa0e9fc68dbb97d738cde91273e2ed3281fc390f8420535e7b0548f79
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// Backup from 10/25 before adding jobs table | ||
const jobslist = document.getElementById('jobslist'); | ||
const searchBar = document.getElementById('searchBar'); | ||
const mainCategory = document.getElementById('mainCategory'); | ||
let jobData = []; | ||
|
||
// Event listener for the search bar | ||
searchBar.addEventListener('keyup', (e) => { | ||
const searchString = e.target.value.toLowerCase(); | ||
const searchWords = searchString.split(' ').filter(word => word.length > 0); | ||
|
||
if (searchWords.length === 0) { | ||
displayJobs(jobData.flatMap(category => { | ||
return Object.entries(category.jobs).map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
})); | ||
return; | ||
} | ||
|
||
const filteredJobs = jobData.flatMap(category => { | ||
return Object.entries(category.jobs) | ||
.filter(([jobTitle, job]) => { | ||
const jobTitleMatch = searchWords.some(word => jobTitle.toLowerCase().includes(word)); | ||
const linksMatch = job.links.some(link => | ||
searchWords.some(word => | ||
link.url.toLowerCase().includes(word) || | ||
link.category.toLowerCase().includes(word) | ||
) | ||
); | ||
return jobTitleMatch || linksMatch; | ||
}) | ||
.map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
}); | ||
|
||
displayJobs(filteredJobs); | ||
}); | ||
|
||
// Function to load jobs data | ||
const loadJobs = async () => { | ||
try { | ||
const res = await fetch('jobs.json'); // Adjust the path if necessary | ||
jobData = await res.json(); // Load all categories and jobs | ||
displayJobs(jobData.flatMap(category => { | ||
return Object.entries(category.jobs).map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
})); | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}; | ||
|
||
const displayJobs = (jobs) => { | ||
let lastCategory = ''; | ||
const htmlString = jobs.map(({ main_category, jobTitle, job }) => { | ||
const isNewCategory = main_category !== lastCategory; | ||
lastCategory = main_category; | ||
|
||
const linksHtml = job.links.map(link => { | ||
return ` | ||
<li class="link"> | ||
<span class="category">${link.category}</span> | ||
<a href="${link.url}" target="_blank">${link.url}</a> | ||
</li> | ||
`; | ||
}).join(''); | ||
|
||
const videosHtml = job.videos.map(video => { | ||
const videoId = extractVideoId(video.url); | ||
const thumbnailUrl = `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`; | ||
|
||
return ` | ||
<div class="video-wrapper" data-video-id="${videoId}" style="margin-bottom: 20px;"> | ||
<img src="${thumbnailUrl}" class="video-thumbnail" alt="Video thumbnail" style="cursor: pointer;" /> | ||
</div> | ||
`; | ||
}).join(''); | ||
|
||
// Display degree required in a separate text box next to the job title | ||
return ` | ||
${isNewCategory ? `<h2 class="main-category">${main_category}</h2>` : ''} | ||
<div class="job-section"> | ||
<h3 class="job-title">${jobTitle}</h3> | ||
<span class="degree-box">Degree Required: ${job.degree_required}</span> <!-- Degree info in a separate box --> | ||
<ul class="links-list">${linksHtml}</ul> | ||
<div class="videos-container">${videosHtml}</div> | ||
</div> | ||
`; | ||
}).join(''); | ||
|
||
jobslist.innerHTML = htmlString; | ||
updateMainCategory(jobs); | ||
|
||
// Add event listeners for lazy loading videos | ||
document.querySelectorAll('.video-thumbnail').forEach(thumbnail => { | ||
thumbnail.addEventListener('click', function() { | ||
const videoWrapper = this.closest('.video-wrapper'); | ||
const videoId = videoWrapper.dataset.videoId; | ||
|
||
const iframe = document.createElement('iframe'); | ||
iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=1`; | ||
iframe.setAttribute('frameborder', '0'); | ||
iframe.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'); | ||
iframe.setAttribute('allowfullscreen', true); | ||
iframe.setAttribute('loading', 'lazy'); | ||
|
||
videoWrapper.innerHTML = ''; // Clear the thumbnail | ||
videoWrapper.appendChild(iframe); | ||
}); | ||
}); | ||
}; | ||
|
||
// Function to update the main category display | ||
const updateMainCategory = (jobs) => { | ||
const firstJob = jobs[0]; | ||
if (firstJob) { | ||
mainCategory.textContent = firstJob.main_category; | ||
} else { | ||
mainCategory.textContent = ''; // Clear the main category if no jobs | ||
} | ||
}; | ||
|
||
// Function to extract the YouTube video ID from the URL | ||
const extractVideoId = (url) => { | ||
const urlParams = new URLSearchParams(new URL(url).search); | ||
return urlParams.get('v') || url.split('/').pop(); | ||
}; | ||
|
||
// Load jobs data when the page is ready | ||
document.addEventListener('DOMContentLoaded', loadJobs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
// 10/25/24 backup | ||
const jobslist = document.getElementById('jobslist'); | ||
const searchBar = document.getElementById('searchBar'); | ||
const mainCategory = document.getElementById('mainCategory'); | ||
let jobData = []; | ||
|
||
// Event listener for the search bar | ||
searchBar.addEventListener('keyup', (e) => { | ||
const searchString = e.target.value.toLowerCase(); | ||
const searchWords = searchString.split(' ').filter(word => word.length > 0); | ||
|
||
if (searchWords.length === 0) { | ||
displayJobs(jobData.flatMap(category => { | ||
return Object.entries(category.jobs).map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
})); | ||
return; | ||
} | ||
|
||
const filteredJobs = jobData.flatMap(category => { | ||
return Object.entries(category.jobs) | ||
.filter(([jobTitle, job]) => { | ||
const jobTitleMatch = searchWords.some(word => jobTitle.toLowerCase().includes(word)); | ||
const linksMatch = job.links.some(link => | ||
searchWords.some(word => | ||
link.url.toLowerCase().includes(word) || | ||
link.category.toLowerCase().includes(word) | ||
) | ||
); | ||
return jobTitleMatch || linksMatch; | ||
}) | ||
.map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
}); | ||
|
||
displayJobs(filteredJobs); | ||
}); | ||
|
||
// Function to load jobs data | ||
const loadJobs = async () => { | ||
try { | ||
const res = await fetch('jobs.json'); // Adjust the path if necessary | ||
jobData = await res.json(); // Load all categories and jobs | ||
displayJobs(jobData.flatMap(category => { | ||
return Object.entries(category.jobs).map(([jobTitle, job]) => ({ | ||
main_category: category.main_category, | ||
jobTitle, | ||
job | ||
})); | ||
})); | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}; | ||
|
||
const displayJobs = (jobs) => { | ||
let lastCategory = ''; | ||
const htmlString = jobs.map(({ main_category, jobTitle, job }) => { | ||
const isNewCategory = main_category !== lastCategory; | ||
lastCategory = main_category; | ||
|
||
const linksHtml = job.links.map(link => { | ||
return ` | ||
<li class="link"> | ||
<span class="category">${link.category}</span> | ||
<a href="${link.url}" target="_blank">${link.url}</a> | ||
</li> | ||
`; | ||
}).join(''); | ||
|
||
const videosHtml = job.videos.map(video => { | ||
const videoId = extractVideoId(video.url); | ||
const thumbnailUrl = `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`; | ||
|
||
return ` | ||
<div class="video-wrapper" data-video-id="${videoId}" style="margin-bottom: 20px;"> | ||
<img src="${thumbnailUrl}" class="video-thumbnail" alt="Video thumbnail" style="cursor: pointer;" /> | ||
</div> | ||
`; | ||
}).join(''); | ||
|
||
// Check if a jobs table exists for the job | ||
const jobsTableHtml = job.jobs_table ? job.jobs_table : ''; | ||
|
||
// Display degree required in a separate text box next to the job title | ||
return ` | ||
${isNewCategory ? `<h2 class="main-category">${main_category}</h2>` : ''} | ||
<div class="job-section"> | ||
<h3 class="job-title">${jobTitle}</h3> | ||
<span class="degree-box">Degree Required: ${job.degree_required}</span> | ||
<ul class="links-list">${linksHtml}</ul> | ||
<div class="videos-container">${videosHtml}</div> | ||
<!-- Add the job table if it exists --> | ||
<div class="jobs-table">${jobsTableHtml}</div> | ||
</div> | ||
`; | ||
}).join(''); | ||
|
||
jobslist.innerHTML = htmlString; | ||
updateMainCategory(jobs); | ||
|
||
// Add event listeners for lazy loading videos | ||
document.querySelectorAll('.video-thumbnail').forEach(thumbnail => { | ||
thumbnail.addEventListener('click', function() { | ||
const videoWrapper = this.closest('.video-wrapper'); | ||
const videoId = videoWrapper.dataset.videoId; | ||
|
||
const iframe = document.createElement('iframe'); | ||
iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=1`; | ||
iframe.setAttribute('frameborder', '0'); | ||
iframe.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'); | ||
iframe.setAttribute('allowfullscreen', true); | ||
iframe.setAttribute('loading', 'lazy'); | ||
|
||
videoWrapper.innerHTML = ''; // Clear the thumbnail | ||
videoWrapper.appendChild(iframe); | ||
}); | ||
}); | ||
}; | ||
|
||
// Function to update the main category display | ||
const updateMainCategory = (jobs) => { | ||
const firstJob = jobs[0]; | ||
if (firstJob) { | ||
mainCategory.textContent = firstJob.main_category; | ||
} else { | ||
mainCategory.textContent = ''; // Clear the main category if no jobs | ||
} | ||
}; | ||
|
||
// Function to extract the YouTube video ID from the URL | ||
const extractVideoId = (url) => { | ||
const urlParams = new URLSearchParams(new URL(url).search); | ||
return urlParams.get('v') || url.split('/').pop(); | ||
}; | ||
|
||
// Load jobs data when the page is ready | ||
document.addEventListener('DOMContentLoaded', loadJobs); |
Oops, something went wrong.