Skip to content

tlgamar/mars-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mars Habitability Index

This repo now contains a Python backend plus a TypeScript frontend for a Mars habitability website.

The backend does three jobs:

  1. Downloads official Mars datasets from NASA/PDS and ASU TES product pages.
  2. Normalizes them onto a shared 1 degree by 1 degree global grid.
  3. Computes a heuristic habitability score and writes the result to JSON for the frontend.

Data sources

The pipeline is wired to fetch these official sources:

  • NASA PDS MOLA MEGDR topography (megt90n000cb.img + label) via the Mars Orbital Data Explorer product page
  • NASA PDS TES special products for global albedo and thermal inertia
  • ASU TES mineral maps in ENVI format for hydrated-mineral and surface-dust signals

The score is intentionally framed as a heuristic rather than a scientific claim. It uses topography, albedo, thermal inertia, hydrated-mineral abundance, and dust cover as broad proxy layers.

Backend setup

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Build the processed dataset:

python3 -m backend.app.pipeline build

That command writes:

  • backend/data/processed/mars_habitability.json
  • frontend/public/data/mars_habitability.json

Run the API:

uvicorn backend.app.api:app --reload

Useful endpoints:

  • GET /api/health
  • GET /api/mars-habitability
  • POST /api/pipeline/rebuild

Frontend setup

cd frontend
npm install
npm run dev

The Vite dev server proxies /api/* to http://127.0.0.1:8000.

Project layout

backend/app/          Python API, downloaders, parsers, and scoring logic
backend/data/raw/     Download cache for source files
backend/data/processed/
frontend/             React + TypeScript client
tests/                Lightweight unit tests for scoring and grid transforms

Notes

  • The TES thermal inertia layer has partial latitude coverage, so the score includes a per-cell confidence field.
  • The pipeline downloads tens of megabytes of source data the first time it runs.
  • Generated data files are ignored by Git by default.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors