How ferdesmello/exoplanets-in-the-galaxy-3d works
1. Overall shape
This repository is a data-driven, mostly static visualization project. Its core job is to fetch exoplanet catalog data, transform it into visualization-friendly formats, and publish a browser-based interactive 3D map plus a few derived 2D images.
2. Primary source of truth
The upstream data comes from NASA’s Exoplanet Archive. That external catalog is the authoritative input for exoplanet names, host stars, distances, positions, and discovery methods. The repo does not appear to maintain its own scientific database; it regenerates local outputs from the archive.
3. Data ingestion subsystem
exoplanet_data.py is the retrieval/scraping stage. It builds or updates the text datasets under data/, especially:
- exoplanets_coordinates.txt
- exoplanets_coordinates_l_b.txt
- exoplanets_coordinates_methods.txt
These files are the normalized intermediate layer for the rest of the project.
4. Transformation subsystem
data_transformer.py converts the text outputs into JSON:
- exoplanets_coordinates.json
- exoplanets_coordinates_methods.json
This is the boundary between offline data preparation and the browser-facing visualization. The interactive frontend consumes JSON rather than parsing the raw text tables.
5. Map-generation subsystem
flat_maps.py produces 2D rendered maps of the exoplanet distribution using the coordinate data plus galaxy imagery. It generates face-on and edge-on projections, saved in images/ as rendered JPEGs. This is a separate visualization path from the interactive 3D view.
6. 3D visualization assets
The 3D visualization depends on artifacts created outside normal Python scripts:
- the Mathematica notebook Exoplanets_in_the_Galaxy_3D.nb
- semi-transparent PNG assets such as MW_transparent.png and MW_transparent_small.png
These files are part of the rendering pipeline for the 3D galaxy model, likely acting as visual backdrops or textures rather than data sources.
7. Browser application boundary
index.html is the local and hosted entry point for the interactive experience. It is a static frontend that reads the generated JSON and images from the repository, so the runtime dependency is the browser rather than a backend service.
8. Publishing and runtime model
The project is designed to run as a static site, including local serving via a simple HTTP server and deployment to GitHub Pages. The presence of index.html plus generated assets in the repo indicates there is no application server or database layer.
9. Automated update pipeline
.github/workflows/update.yml drives periodic regeneration of the datasets and derived files. The README indicates monthly updates based on new Exoplanet Archive discoveries, and data/last_update.txt records the last successful refresh time.
10. Data files as architecture artifacts
The data/ directory is not just storage; it is the persistence layer for the pipeline. It contains both intermediate text files and final JSON outputs, allowing the visualization to be rebuilt without re-querying the archive every time.
11. Images as derived presentation layer
The images/ directory holds presentation assets: screenshots, rendered galaxy maps, and the main illustration used in the visualizations. These are treated as build outputs or curated inputs depending on the file, and they are essential to the visual composition of the site.
12. External technologies that materially affect the system
The repo’s architecture spans Python for data processing, Mathematica for generating the 3D-related imagery, and plain HTML/JavaScript in the browser for visualization. GitHub Actions and GitHub Pages provide automation and hosting, while the Exoplanet Archive is the external data dependency that defines refresh cadence and content.
13. End-to-end flow
The main flow is: Exoplanet Archive → Python retrieval (exoplanet_data.py) → local text datasets in data/ → JSON conversion (data_transformer.py) and image generation (flat_maps.py / Mathematica notebook) → static browser visualization in index.html → GitHub Pages publication and monthly automation.
14. What is and is not in the repo
This is not a backend service or a live data API. It is a reproducible visualization pipeline with a static frontend and generated assets, where the important architectural boundary is between offline data preparation and client-side rendering.
Main entry points: update.yml Update workflow · images Rendered images · exoplanets_coordinates.txt Text data · exoplanet_data.py Exoplanet fetcher
Components 13
Data pipeline
Retrieval, normalization, transformation, and rendering stages that build the repo artifacts.
- Exoplanet fetcher · Retrieves and normalizes exoplanet catalog data from the upstream archive into local text datasets.
exoplanet_data.py - Text data · Normalized coordinate and discovery-method tables used as the pipeline's persistence layer.
data/exoplanets_coordinates.txt - JSON data · Final JSON datasets consumed by the static frontend.
data/exoplanets_coordinates.json - JSON builder · Converts the text datasets into browser-ready JSON outputs.
data_transformer.py - Map renderer · Generates 2D face-on and edge-on galaxy maps from the coordinate data.
flat_maps.py - 3D notebook · Notebook used to create or support the 3D galaxy visualization assets.
Exoplanets_in_the_Galaxy_3D.nb
Browser app
Static visualization entrypoint and the assets it consumes.
- Index page · Browser entrypoint for the interactive visualization.
index.html - Rendered images · Generated and curated imagery used by the site, including galaxy backdrops and map renders.
images - Milky Way art · Transparent Milky Way image assets used in the 3D presentation.
images
Automation
Scheduled refresh and hosting for the static site.
- Update workflow · Scheduled automation that regenerates data and derived outputs.
.github/workflows/update.yml - Serve config · Local serving helper for hosting the static site.
server.txt - GitHub Pages · Static hosting destination for the published visualization.
Other components
- Exoplanet Archive · Authoritative upstream catalog for exoplanet and host-star data.
Connections 15
- Exoplanet Archive → Exoplanet fetcher: source data · The upstream catalog is queried to obtain the latest exoplanet records.
- Exoplanet fetcher → Text data: writes · Produces normalized text tables in the data directory.
- Text data → JSON builder: input · Text tables are converted into JSON for browser consumption.
- JSON builder → JSON data: writes · Emits the final JSON datasets used by the frontend.
- Text data → Map renderer: input · Map rendering uses the coordinate tables as its data source.
- Map renderer → Rendered images: writes · Produces rendered 2D map images for the site.
- 3D notebook → Rendered images: creates assets · Notebook-generated visual assets contribute to the 3D presentation layer.
- Milky Way art → Rendered images: stored in · Transparent galaxy imagery lives in the image asset directory.
- JSON data → Index page: consumed by · The static page reads the generated JSON data in the browser.
- Rendered images → Index page: consumed by · Rendered imagery is embedded or referenced by the frontend.
- Update workflow → Exoplanet fetcher: runs · Automation periodically refreshes the pipeline from the upstream archive.
- Update workflow → JSON builder: runs · The workflow rebuilds derived JSON artifacts.
- Update workflow → Map renderer: runs · The workflow regenerates rendered map outputs.
- Update workflow → GitHub Pages: deploys · Automation publishes the static site artifacts to GitHub Pages.
- Serve config → Index page: serves · Local hosting is used to open the static frontend in a browser.