Giter Site home page Giter Site logo

jswhitten / synastron Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 66.72 MB

Generate 3D "constellations" of nearby stars grouped by proximity.

Python 55.42% HTML 43.33% Nix 0.01% PowerShell 0.03% Shell 0.01% Cython 0.36% C++ 0.14% C 0.69% Fortran 0.01% Nu 0.01%

synastron's Introduction

Synastron

Synastron is a Python script to generate 3D clusters of nearby stars called synastrons, based on their spatial proximity. The script uses hierarchical clustering to create well-defined groups of stars, and outputs the results as json and as an interactive plot.

Features

  • Reads star data from a MySQL database
  • Uses agglomerative hierarchical clustering to group stars based on their spatial proximity
  • Applies penalties to prevent clusters from becoming too large
  • Generates an interactive 3D plot of the clusters using Plotly
  • Visualizes clusters with unique colors, different marker sizes based on brightness, and lines connecting stars within a cluster that are closer than a specified distance
  • Serves the 3D plot using a temporary public URL for easy sharing

Usage

  1. Clone the repository to your local machine or import it to Replit.
  2. Install the required dependencies using pip install -r requirements.txt.
  3. Set the following environment variables for your MySQL database connection:
    • mysql_username
    • mysql_password
    • mysql_host
    • mysql_db
  4. Run the script using python main.py.
  5. Open the generated temporary public URL to view the 3D plot of the clusters.

Dependencies

  • mysql-connector-python
  • pandas
  • numpy
  • scipy
  • pyngrok
  • plotly
  • matplotlib
  • itertools

synastron's People

Contributors

jswhitten avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.