Skip to content

Commit c2f5744

Browse files
Update readme
1 parent e667d79 commit c2f5744

File tree

2 files changed

+21
-74
lines changed

2 files changed

+21
-74
lines changed

README.md

Lines changed: 21 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,32 @@
1-
# TypeScript Next.js example
1+
# Gaia Explorer
2+
[Project live - hosted on Github Pages](https://pierre-aurele-martin.github.io/gaia-explorer/)
3+
## Thanks to:
4+
[Material-ui](https://github.com/mui-org/material-ui)
5+
[Spacekit](https://github.com/typpo/spacekit) (check it out!)
6+
[Algolia React InstantSearch](https://github.com/algolia/react-instantsearch)
27

3-
This is a really simple project that shows the usage of Next.js with TypeScript.
8+
## Data
9+
The data used in the demo are a ridiculously tiny part of [Gaia Early Data Release 3](https://www.cosmos.esa.int/web/gaia/early-data-release-3). Science with 1 billion objects in three dimensions. I only represented 7000+ objects.
410

5-
## Deploy your own
11+
The representation of space objects are mostly inaccurate as I'm no physicist. If you'd like to help me get it straight, [just reach out](https://twitter.com/PierreAurele)
612

7-
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
13+
You can find the sample I used in the `/public/data` folder.
814

9-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-typescript&project-name=with-typescript&repository-name=with-typescript)
15+
## Spacekit
16+
I'm using [Spacekit](https://github.com/typpo/spacekit) for the space rendering. I had to tweak it so all orbits are ELLIPTICAL as I was not able to render the other types. Same for the data with `has_photocenter_motion === NULL`, I had to filter them because they were all without any orbit. Might be the point of this key, might be not. Again, any help to understand is welcome [Twitter](https://twitter.com/PierreAurele) or **Pull Request** :)
1017

11-
## How to use it?
18+
You can find the data mapping between Gaia data and Spacekit in `/hooks/useSpacekit.ts`
1219

13-
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
20+
## Run
21+
To deploy on Github Pages:
1422

15-
```bash
16-
npx create-next-app --example with-typescript with-typescript-app
17-
# or
18-
yarn create next-app --example with-typescript with-typescript-app
19-
```
23+
npm run deploy
2024

21-
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
25+
To buid locally:
2226

23-
## Notes
27+
npm run dev
2428

25-
This example shows how to integrate the TypeScript type system into Next.js. Since TypeScript is supported out of the box with Next.js, all we have to do is to install TypeScript.
29+
I'm using [Nextjs](https://github.com/vercel/next.js/), check out the repo for more options, it offer a lot of deployment options :)
2630

27-
```
28-
npm install --save-dev typescript
29-
```
30-
31-
To enable TypeScript's features, we install the type declarations for React and Node.
32-
33-
```
34-
npm install --save-dev @types/react @types/react-dom @types/node
35-
```
36-
37-
When we run `next dev` the next time, Next.js will start looking for any `.ts` or `.tsx` files in our project and builds it. It even automatically creates a `tsconfig.json` file for our project with the recommended settings.
38-
39-
Next.js has built-in TypeScript declarations, so we'll get autocompletion for Next.js' modules straight away.
40-
41-
A `type-check` script is also added to `package.json`, which runs TypeScript's `tsc` CLI in `noEmit` mode to run type-checking separately. You can then include this, for example, in your `test` scripts.
42-
43-
44-
45-
options.position [x,y,z] [ra, dec, barycentric_distance]
46-
// scale [1,1,1]
47-
particleSize (number) radius (on va l'utiliser comme ça pour l'instant)
48-
orbitPathSettings: {
49-
leadDurationYears
50-
trailDurationYears
51-
stepSizeYears
52-
}
53-
ephem: {
54-
a: semimajor axis // semimajor_axis
55-
e: eccentricity // eccentricity
56-
i: inclination // inclination
57-
epoch: epoch in JD // radial_velocity
58-
period: Period in days // orbit_period
59-
ma: mean anomaly // mag_g ???
60-
// n: mean motion // mag_bp ???
61-
// L: longitude // ???
62-
om: Longigude of ascending node // longitude_ascending_node
63-
w: Perihelion // periastron_date
64-
wBar: Longitude of Perihelion // periastron_argument
65-
GM: Standard gravitational parameter
66-
unit: deg | rad // rad
67-
}
68-
ecliptic: {
69-
lineColor // random
70-
displayLines: true
71-
}
72-
73-
1 -> 1: Stellar 2: Galaxy
74-
7294000 -> HTMIndex level12
75-
0 -> Variability
76-
0 -> Multiple system
77-
0912 -> ?
78-
50000 -> Objectnumber in region
79-
80-
1
81-
7294000
82-
0
83-
0
84-
4939
85-
10000
31+
To parse local data and indexing to Algolia - it's very basic and was meant for my own use:
32+
`node parser.js`

public/data/GoodGDR3 copy.xlsx

-12.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)