File size: 11,852 Bytes
7a31e27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8954cb6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a31e27
 
8954cb6
7a31e27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
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 = `
                <div class="member-card">
                    <img src="http://static.photos/people/200x200/${members.indexOf(member)+1}" alt="${member.name}">
                    <h3>${member.name}</h3>
                    <p>${member.role}</p>
                </div>
            `;
            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 = `
                    <h2 class="text-2xl font-bold text-indigo-700 mb-4">Tourism</h2>
                    <p class="mb-4">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).</p>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-4">
                        <div>
                            <h3 class="font-semibold text-lg mb-2">Popular Destinations</h3>
                            <ul class="list-disc pl-5 space-y-1">
                                <li>Jaipur, India (November–February)</li>
                                <li>Mediterranean Coast</li>
                                <li>Mountain resorts for winter sports</li>
                            </ul>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-2">Tourist Attractions</h3>
                            <ul class="list-disc pl-5 space-y-1">
                                <li>Climate</li>
                                <li>Landscape</li>
                                <li>History and Art</li>
                                <li>Culture and Economy</li>
                            </ul>
                        </div>
                    </div>
                `;
                break;
            case 'medical':
                content = `
                    <h2 class="text-2xl font-bold text-indigo-700 mb-4">Medical Tourism in India</h2>
                    <p class="mb-4">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.</p>
                    <div class="mb-4">
                        <h3 class="font-semibold text-lg mb-2">Key Statistics</h3>
                        <p>About 55,000 patients from U.S.A. visited India in 2005 for treatment.</p>
                    </div>
                    <div>
                        <h3 class="font-semibold text-lg mb-2">Benefits</h3>
                        <ul class="list-disc pl-5 space-y-1">
                            <li>Cost-effective treatments</li>
                            <li>High-quality medical care</li>
                            <li>Reduced waiting times</li>
                            <li>Opportunity to combine treatment with tourism</li>
                        </ul>
                    </div>
                `;
                break;
            case 'quaternary':
                content = `
                    <h2 class="text-2xl font-bold text-indigo-700 mb-4">Quaternary Activities</h2>
                    <p class="mb-4">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.</p>
                    <div>
                        <h3 class="font-semibold text-lg mb-2">Examples</h3>
                        <ul class="list-disc pl-5 space-y-1">
                            <li>Information technology services</li>
                            <li>Research and development</li>
                            <li>Financial planning services</li>
                            <li>Consulting services</li>
                        </ul>
                    </div>
                `;
                break;
            case 'quinary':
                content = `
                    <h2 class="text-2xl font-bold text-indigo-700 mb-4">Quinary Activities</h2>
                    <p class="mb-4">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.</p>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div>
                            <h3 class="font-semibold text-lg mb-2">Outsourcing</h3>
                            <p>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.</p>
                        </div>
                        <div>
                            <h3 class="font-semibold text-lg mb-2">BPO & KPO</h3>
                            <p>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.</p>
                        </div>
                    </div>
                `;
                break;
        }

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