{"id":22206472,"url":"https://github.com/ravi-aratchige/spacefarer","last_synced_at":"2026-04-10T11:31:21.445Z","repository":{"id":187568783,"uuid":"657758402","full_name":"ravi-aratchige/spacefarer","owner":"ravi-aratchige","description":"What type of astronaut would you be?","archived":false,"fork":false,"pushed_at":"2023-08-11T11:38:41.000Z","size":10878,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T21:36:00.869Z","etag":null,"topics":["astronaut","astronauts","flask","jupyter","jupyter-notebook","machine-learning","numpy","pandas","python","scikit-learn","space","tailwind","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravi-aratchige.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-23T19:30:43.000Z","updated_at":"2023-08-10T22:11:56.000Z","dependencies_parsed_at":"2025-01-30T04:32:56.161Z","dependency_job_id":null,"html_url":"https://github.com/ravi-aratchige/spacefarer","commit_stats":null,"previous_names":["ravi-aratchige/spacefarer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravi-aratchige/spacefarer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravi-aratchige%2Fspacefarer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravi-aratchige%2Fspacefarer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravi-aratchige%2Fspacefarer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravi-aratchige%2Fspacefarer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravi-aratchige","download_url":"https://codeload.github.com/ravi-aratchige/spacefarer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravi-aratchige%2Fspacefarer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31641114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astronaut","astronauts","flask","jupyter","jupyter-notebook","machine-learning","numpy","pandas","python","scikit-learn","space","tailwind","tailwindcss"],"created_at":"2024-12-02T18:11:54.776Z","updated_at":"2026-04-10T11:31:21.424Z","avatar_url":"https://github.com/ravi-aratchige.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spacefarer :rocket:\n\n\u003cimg src=\"./assets/banner.png\"\u003e\n\nEver wondered what role you would play if you were a cosmic voyager, adventuring through space with your resourceful crew members?\n\nSpacefarer uses machine learning to determine what type of astronaut you would be, based on your responses to a series of questions about your personality.\n\n\u003cimg src=\"./assets/home.png\"\u003e\n\nYou can be one of the following types of astronauts:\n\n1. **Navigator** - steers and guides the spacecraft in the vast depths of space.\n2. **Communicator** - maintains contact with stations and other spacecrafts.\n3. **Explorer** - ventures boldly into uncharted realms and territories.\n4. **Commander** - leading the spacecraft, its crew and their operation.\n5. **Scientist** - conducting research and unraveling the mysteries of the cosmos.\n\nSpacefarer asks you a series of 20 space-themed questions; 4 questions each for the 5 personality traits of the \u003ca href=\"https://mettl.com/glossary/b/big-five-personality-test/#:~:text=The%20Big%20Five%20personality%20test%2C%20also%20known%20as%20the%20OCEAN,making%20the%20acronym%20%E2%80%93%20OCEAN).\"\u003e**Big Five Personality Test**\u003c/a\u003e:\n\n1. Openness\n2. Neuroticism\n3. Conscientiousness\n4. Agreeableness\n5. Extraversion\n\nThe answers provided to these questions are passed to a trained and deserialized model, which predicts your personality type, which is in turn mapped to a type of astronaut.\n\n\u003cimg src=\"./assets/result.png\"\u003e\n\nSpacefarer is built as a \u003ca href=\"https://flask.palletsprojects.com\"\u003eFlask\u003c/a\u003e web app, styled with \u003ca href=\"https://tailwindcss.com/\"\u003eTailwindCSS\u003c/a\u003e and powered by a \u003ca href=\"https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html\"\u003e`LogisticRegression`\u003c/a\u003e model trained on a small (approx. 700 samples) dataset from \u003ca href=\"https://www.kaggle.com/datasets/pavlorymarchuk/test3434\"\u003eKaggle\u003c/a\u003e. The model has an accuracy of **81.53%**.\n\n## Setup\n\n### Prerequisites\n\nSpacefarer has very few prerequisites, which are probably already installed on your system:\n\n1. \u003ca href=\"https://git-scm.com/\"\u003eGit\u003c/a\u003e version control system\n2. \u003ca href=\"https://www.python.org/\"\u003ePython\u003c/a\u003e (recommended to have a version greater than 3.9.0)\n3. \u003ca href=\"https://nodejs.org/en\"\u003eNode.js\u003c/a\u003e (recommended to have a version greater than 18.0.0)\n\nTo run Spacefarer locally on your machine, follow these steps:\n\n### 1. Clone Project\n\nClone Spacefarer to a desired location (folder) on your machine by opening up a terminal from the folder and entering the following command:\n\n```shell\ngit clone https://github.com/ravi-aratchige/spacefarer.git\n```\n\nNext, move into the `spacefarer` project directory:\n\n```shell\ncd spacefarer\n```\n\n### 2. Activate Virtual Environment\n\nA virtual environment will help you keep Spacefarer's dependencies isolated from the global system of Python packages. To setup your virtual environment, first ensure that `virtualenv` is installed on your system:\n\n```shell\npip install virtualenv\n```\n\nTo create and activate a virtual environment, enter the following commands after moving into the `spacefarer` folder as done in the previous step:\n\n```shell\n# Create a virtual environment named 'env':\npython -m venv env\n\n# Activate the virtual environment (Windows):\nenv\\Scripts\\activate.bat\n\n# Activate the virtual environment (MacOS / Linux):\nsource env/bin/activate\n```\n\nYour terminal will now include an `(env)` prefix, indicating a successful activation of the virtual environment:\n\n```shell\n# On Windows:\n(env) drive:\\folder\\...spacefarer\u003e\n\n# On MacOS and Linux\n(env) user@computer:~/...spacefarer$\n```\n\nTo deactivate the virtual environment (and remove the `(env)` prefix):\n\n```shell\ndeactivate\n```\n\n### 3. Install Dependencies\n\nAfter activating the virtual environment, you can install all of the necessary dependencies with a single command:\n\n```shell\npip install -r requirements.txt\n```\n\n\u003ca href=\"https://github.com/ravi-aratchige/spacefarer/blob/main/requirements.txt\"\u003e`requirements.txt`\u003c/a\u003e includes all of the project's dependencies and their respective versions.\n\n### 4. Start Flask App\n\nMove from the root of the project into the `app` directory (where the Flask app is stored in):\n\n```shell\ncd app\n```\n\nThen, install the necessary NPM packages. This is essential for TailwindCSS:\n\n```shell\nnpm install\n\n# or\n\nnpm i\n```\n\nFinally, start up the Flask server:\n\n```shell\npython app.py\n\n# or\n\npython3 app.py\n```\n\nFlask will then serve Spacefarer on \u003ca\u003ehttp://localhost:5000\u003c/a\u003e (development server).\n\n## Contribution\n\nThis project is fully open-source (including data and the model). Contributions are always welcome; you may fork this project, work on it and submit a pull request.\n\n**IMPORTANT**: during development, the TailwindCSS build process must be started (for automatic purging and optimization).\n\nFor this, first enter the `app` folder in the project directory (after activating the virtual environment):\n\n```shell\ncd app\n```\n\nThen, run the following command:\n\n```shell\nnpm run create-css\n```\n\nThis project is still underway, so you can expect changes often!\n\n### To-Do\n\n- [ ] Create 'About page' (`/about`)\n- [ ] Add \u003ca href=\"https://vincentgarreau.com/particles.js/\"\u003eparticles.js\u003c/a\u003e to background of Flask app\n- [ ] Optimize `form.html` using loops in Jinja blocks\n\n---\n\nMade with :heart: by Ravindu Aratchige. Licensed under the \u003ca href=\"https://github.com/ravi-aratchige/spacefarer/blob/main/LICENSE\"\u003eApache License\u003ca\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravi-aratchige%2Fspacefarer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravi-aratchige%2Fspacefarer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravi-aratchige%2Fspacefarer/lists"}