-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba14dfe
commit 6bb509c
Showing
1 changed file
with
23 additions
and
19 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 |
---|---|---|
@@ -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 }; |