Skip to content

Commit

Permalink
Update data.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit30swgoh authored Sep 25, 2024
1 parent ba14dfe commit 6bb509c
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions js/scripts/data.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
// scripts/data.js

// Sample JWST Mission Data (Replace with your actual data)
const jwstData = {
launchDate: "December 25, 2021",
primaryMirrorSize: "6.5 meters",
orbit: "L2 Lagrange point",
instruments: ["NIRCam", "NIRSpec", "MIRI", "FGS/NIRISS"],
scientificGoals: [
"Study the first galaxies formed in the early universe",
"Observe the formation of stars and planetary systems",
"Analyze the atmospheres of exoplanets",
// Add more scientific goals as needed
]
};
// Function to fetch JWST mission data
async function fetchJWSTData() {
try {
const response = await fetch('assets/data/jwst-data.json');
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching JWST data:', error);
return null;
}
}

// Sample Astronomy Statistics (Replace with your actual data)
const astronomyStats = {
years: [2018, 2019, 2020, 2021, 2022], // Years
discoveries: [1200, 1500, 1800, 2000, 2300] // Number of discoveries per year
};
// Function to fetch astronomy statistics
async function fetchAstronomyStats() {
try {
const response = await fetch('assets/data/astronomy-stats.json');
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching astronomy statistics:', error);
return null;
}
}

export { jwstData, astronomyStats };
export { fetchJWSTData, fetchAstronomyStats };

0 comments on commit 6bb509c

Please sign in to comment.