Skip to content

Commit

Permalink
Update star distance units
Browse files Browse the repository at this point in the history
  • Loading branch information
paubel committed Jan 31, 2024
1 parent e4d83c2 commit 744e3c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
5 changes: 2 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,14 @@ d3.json("stars-sort.json").then(function (stars) {
(star) => star.distance > 10 && star.distance <= 100
);
break;
case "Distance 100 to 1000 ly":
case "Distance 100 to 1 kly":
filteredStars = stars.filter(
(star) => star.distance > 100 && star.distance <= 1000
);
break;
case "Distance > 1000 ly":
case "Distance > 1 kly":
filteredStars = stars.filter((star) => star.distance > 1000);
break;

case "App. mag. < 0.6":
filteredStars = stars.filter((star) => star.apparentMagnitude <= 0.6);
break;
Expand Down
26 changes: 26 additions & 0 deletions stars-sort.json
Original file line number Diff line number Diff line change
Expand Up @@ -2001,5 +2001,31 @@
"age": 5.6e9,
"mass": 0.2036,
"type": "red dwarf"
},
{
"name": "WD 0343+247",
"temperature": 4197,
"luminosity": 0.000048,
"spectralClass": "DX13",
"radius": 0.011,
"constellation": "Taurus",
"distance": 129,
"apparentMagnitude": 19.0,
"age": 11.49e9,
"mass": 0.553,
"type": "white dwarf"
},
{
"name": "Methuselah star",
"temperature": 5787,
"luminosity": 4.82,
"spectralClass": "G0IV-V m-5",
"radius": 2.04,
"constellation": "Libra",
"distance": 200.5,
"apparentMagnitude": 7.205,
"age": 12e9,
"mass": 0.81,
"type": "subgiant"
}
]

0 comments on commit 744e3c5

Please sign in to comment.