document.addEventListener('DOMContentLoaded', function() { // Initialize members const members = [ { name: "Surajit", role: "Project Lead" }, { name: "Sahil", role: "Data Analyst" }, { name: "Emmanual", role: "Researcher" }, { name: "Ranajit", role: "Developer" } ]; // Render members const membersContainer = document.getElementById('members-container'); renderMembers(); function renderMembers() { membersContainer.innerHTML = ''; members.forEach(member => { const memberHTML = `
${member.name}

${member.name}

${member.role}

`; membersContainer.insertAdjacentHTML('beforeend', memberHTML); }); } // Shuffle members document.getElementById('shuffle-members').addEventListener('click', function() { members.sort(() => Math.random() - 0.5); renderMembers(); }); // Initialize data visualizations initVisualizations(); function initVisualizations() { // Employment Growth Chart const employmentCtx = document.createElement('canvas'); employmentCtx.id = 'employmentChart'; document.querySelector('main').insertBefore(employmentCtx, document.getElementById('members-container').parentNode.nextSibling); new Chart(employmentCtx, { type: 'line', data: { labels: ['1950', '1960', '1970', '1980', '1990', '2000', '2010', '2020'], datasets: [{ label: 'Tertiary Sector Employment (%)', data: [20, 25, 32, 38, 42, 48, 55, 63], borderColor: 'rgba(79, 70, 229, 1)', backgroundColor: 'rgba(79, 70, 229, 0.1)', borderWidth: 2, fill: true, tension: 0.4 }] }, options: { responsive: true, plugins: { title: { display: true, text: 'Growth of Tertiary Sector Employment (1950-2020)' } } } }); // Digital Divide Chart const digitalDivideCtx = document.getElementById('digitalDivideChart').getContext('2d'); new Chart(digitalDivideCtx, { type: 'radar', data: { labels: ['Infrastructure', 'Affordability', 'Skills', 'Usage', 'Quality'], datasets: [ { label: 'Developed Countries', data: [90, 85, 88, 92, 87], backgroundColor: 'rgba(79, 70, 229, 0.2)', borderColor: 'rgba(79, 70, 229, 1)', borderWidth: 2, pointBackgroundColor: 'rgba(79, 70, 229, 1)' }, { label: 'Developing Countries', data: [45, 50, 40, 55, 35], backgroundColor: 'rgba(236, 72, 153, 0.2)', borderColor: 'rgba(236, 72, 153, 1)', borderWidth: 2, pointBackgroundColor: 'rgba(236, 72, 153, 1)' } ] }, options: { responsive: true, scales: { r: { angleLines: { display: true }, suggestedMin: 0, suggestedMax: 100 } } } }); // Tourism Chart const tourismCtx = document.getElementById('tourismChart').getContext('2d'); new Chart(tourismCtx, { type: 'bar', data: { labels: ['Jaipur', 'Mediterranean', 'Mountain Resorts', 'Historic Towns'], datasets: [{ label: 'Annual Visitors (millions)', data: [1.2, 45, 12, 8.5], backgroundColor: [ 'rgba(79, 70, 229, 0.7)', 'rgba(99, 102, 241, 0.7)', 'rgba(129, 140, 248, 0.7)', 'rgba(165, 180, 252, 0.7)' ], borderColor: [ 'rgba(79, 70, 229, 1)', 'rgba(99, 102, 241, 1)', 'rgba(129, 140, 248, 1)', 'rgba(165, 180, 252, 1)' ], borderWidth: 1 }] }, options: { responsive: true, scales: { y: { beginAtZero: true } } } }); // Sector Employment Chart const sectorCtx = document.getElementById('sectorChart').getContext('2d'); new Chart(sectorCtx, { type: 'doughnut', data: { labels: ['Tertiary', 'Primary', 'Secondary', 'Quaternary', 'Quinary'], datasets: [{ data: [45, 20, 25, 7, 3], backgroundColor: [ 'rgba(79, 70, 229, 0.7)', 'rgba(16, 185, 129, 0.7)', 'rgba(245, 158, 11, 0.7)', 'rgba(236, 72, 153, 0.7)', 'rgba(20, 184, 166, 0.7)' ], hoverOffset: 4 }] }, options: { responsive: true, plugins: { legend: { position: 'right', } } } }); } // Activity card click handlers document.querySelectorAll('.activity-card').forEach(card => { card.addEventListener('click', function() { const category = this.getAttribute('data-category'); showDetailPanel(category); }); }); // Close detail panel document.getElementById('close-detail').addEventListener('click', function() { document.getElementById('detail-panel').classList.remove('show'); }); function showDetailPanel(category) { const detailPanel = document.getElementById('detail-panel'); const detailContent = document.getElementById('detail-content'); let content = ''; switch(category) { case 'tourism': content = `

Tourism

Tourism is travel undertaken for purposes of recreation rather than business. It has become the world's single largest tertiary activity in total registered jobs (250 million) and total revenue (40% of the total GDP).

Popular Destinations

Tourist Attractions

`; break; case 'medical': content = `

Medical Tourism in India

India has emerged as the leading country of medical tourism in the world. World class hospitals located in metropolitan cities cater to patients all over the world.

Key Statistics

About 55,000 patients from U.S.A. visited India in 2005 for treatment.

Benefits

`; break; case 'quaternary': content = `

Quaternary Activities

Quaternary activities involve the collection, production and dissemination of information or even the production of information. These activities center around research, development and may be seen as an advanced form of services involving specialised knowledge and technical skills.

Examples

`; break; case 'quinary': content = `

Quinary Activities

These are the activities that are highly specific and specialized. They include high level decision-makers, administrators, government officials, research scientists, etc. They are also known as gold collar professions.

Outsourcing

It means contracting out or giving work to an outside agency to improve efficiency and to reduce cost. It is termed as offshoring when work is transferred to overseas location.

BPO & KPO

BPO stands for Business Process Outsourcing while KPO stands for Knowledge Process Outsourcing which involves skilled workers and enables companies to create additional business opportunities.

`; break; } detailContent.innerHTML = content; detailPanel.classList.add('show'); feather.replace(); } });