create Natal Chart with ease
- SVG natal chart generation in pure python
- composite chart (transit/synastry/sun return ... etc) generation
- highly configurable
- all planets, asteroids, vertices can be enabled / disabled
- orbs for each aspect
- light, dark, or mono theme
- light / dark theme color definitions
- chart stroke, opacity, font, spacing between planets ...etc
- high precision astrological data with Swiss Ephemeris
- natal chart data statistics
- element, modality, and polarity counts
- planets in each houses
- quadrant and hemisphere distribution
- aspect pair counts
- composite chart aspects
- aspects cross reference table
- generate report in markdown or html
- thoroughly tested with
pytest
- default dark theme
- default light theme
- mono theme
- installation
pip install natal
- generate a chart
from natal import Data, Chart
# create chart data object
mimi = Data(
name="MiMi",
utc_dt="1980-04-20 06:30:00",
lat=25.0531,
lon=121.526,
)
# return natal chart in SVG string
Chart(mimi, width=600).svg
# create transit data object
transit = Data(
name="Transit",
utc_dt="2024-01-01 05:30:00",
lat=25.0531,
lon=121.526,
)
# create a transit chart
transit_chart = Chart(
data1=mimi,
data2=transit,
width=600
)
# view the composite chart in jupyter notebook
from IPython.display import HTML
HTML(transit_chart.svg)
following SVG chart will be produced:
## -- retrieve natal chart properties -- ##
mimi.planets # list[Planet]
mimi.houses # list[House]
mimi.extras # list[Extra]
mimi.vertices # list[Vertex]
mimi.signs # list[Sign]
mimi.aspects # list[Aspect]
mimi.quadrants # list[list[Aspectable]]
# Planet object
sun = mimi.planets[0]
sun.degree # 30.33039116987769
sun.normalized_degree # 230.62043431588035 # degree relative to Asc
sun.color # fire
sun.speed # 0.9761994105153413
sun.retro # False
sun.dms # 00Β°19'
sun.signed_dms # 00Β°β19'
sun.signed_deg # 0
sun.sign.name # taurus
sun.sign.symbol # β
sun.sign.value # 2
sun.sign.color # earth
sun.sign.ruler # venus
sun.sign.classic_ruler # venus
sun.sign.element # earth
sun.sign.modality # fixed
sun.sign.polarity # negative
# Aspect object
aspect = mimi.aspects[0]
aspect.body1 # sun Planet obj
aspect.body2 # mars Planet obj
aspect.aspect_member # AspectMember(name='trine', symbol='β³', value=120, color='air')
aspect.applying # False
aspect.orb # 3.3424
- statistics of Data object in tabular form
from natal import Stats
stats = Stats(data1=mimi, data2=transit)
print(stats.full_report(kind="markdown"))
- following markdown report will be produced:
# Element Distribution (MiMi)
| element | sum | bodies |
|-----------|-------|-------------------------------------------------|
| earth | 4 | sun β , jupiter β , saturn β , asc β |
| water | 2 | moon β , uranus β |
| fire | 4 | mercury β , mars β , neptune β , asc_node β |
| air | 3 | venus β , pluto β , mc β |
# Modality Distribution (MiMi)
| modality | sum | bodies |
|------------|-------|-----------------------------------------------------------------|
| fixed | 4 | sun β , mars β , uranus β , asc_node β |
| cardinal | 3 | moon β , mercury β , pluto β |
| mutable | 6 | venus β , jupiter β , saturn β , neptune β , asc β , mc β |
# Polarity Distribution (MiMi)
| polarity | sum | bodies |
|------------|-------|-------------------------------------------------------------------------------|
| negative | 6 | sun β , moon β , jupiter β , saturn β , uranus β , asc β |
| positive | 7 | mercury β , venus β , mars β , neptune β , pluto β , asc_node β , mc β |
# Celestial Bodies (MiMi)
| body | sign | house | dignity |
|----------|--------------|---------|-----------|
| sun | 00Β° β 19' | 8 | |
| moon | 08Β° β 29' | 10 | domicile |
| mercury | 08Β° β 28' | 8 | |
| venus | 15Β° β 12' | 10 | |
| mars | 26Β° β 59' | 12 | |
| jupiter | 00Β° β 17' β | 12 | detriment |
| saturn | 21Β° β 03' β | 1 | |
| uranus | 24Β° β 31' β | 3 | |
| neptune | 22Β° β 29' β | 4 | |
| pluto | 20Β° β 06' β | 2 | |
| asc_node | 26Β° β 03' β | 12 | |
| asc | 09Β° β 42' | 1 | |
| mc | 09Β° β 13' | 10 | |
# Houses (MiMi)
| house | cusp | ruler | ruler sign | ruler house |
|---------|------------|---------|--------------|---------------|
| 1 | 09Β° β 41' | mercury | β | 8 |
| 2 | 07Β° β 13' | venus | β | 10 |
| 3 | 07Β° β 38' | pluto | β | 2 |
| 4 | 09Β° β 13' | jupiter | β | 12 |
| 5 | 10Β° β 25' | saturn | β | 1 |
| 6 | 10Β° β 44' | uranus | β | 3 |
| 7 | 09Β° β 41' | neptune | β | 4 |
| 8 | 07Β° β 13' | mars | β | 12 |
| 9 | 07Β° β 38' | venus | β | 10 |
| 10 | 09Β° β 13' | mercury | β | 8 |
| 11 | 10Β° β 25' | moon | β | 10 |
| 12 | 10Β° β 44' | sun | β | 8 |
# Quadrants (MiMi)
| quadrant | sum | bodies |
|------------|-------|--------------------------------------|
| 1st β΅ | 3 | saturn, uranus, pluto |
| 2nd βΆ | 1 | neptune |
| 3rd β· | 2 | sun, mercury |
| 4th β΄ | 5 | moon, venus, mars, jupiter, asc_node |
# Hemispheres (MiMi)
| hemisphere | sum | bodies |
|--------------|-------|-------------------------------------------------------------|
| β | 8 | saturn, uranus, pluto, moon, venus, mars, jupiter, asc_node |
| β | 3 | neptune, sun, mercury |
| β | 7 | sun, mercury, moon, venus, mars, jupiter, asc_node |
| β | 4 | saturn, uranus, pluto, neptune |
# Celestial Bodies of Transit in MiMi's chart
| Transit | sign | house | dignity |
|-----------|--------------|---------|-----------|
| sun | 10Β° β 16' | 4 | |
| moon | 08Β° β 42' | 12 | |
| mercury | 22Β° β 14' β | 4 | detriment |
| venus | 02Β° β 53' | 3 | |
| mars | 27Β° β 28' | 4 | |
| jupiter | 05Β° β 34' | 8 | |
| saturn | 03Β° β 15' | 6 | |
| uranus | 19Β° β 22' β | 9 | |
| neptune | 25Β° β 04' | 7 | |
| pluto | 29Β° β 21' | 5 | |
| asc_node | 20Β° β 51' β | 8 | |
| asc | 14Β° β 41' | 9 | |
| mc | 02Β° β 08' | 5 | |
# Aspects of Transit vs MiMi
| Transit | aspect | MiMi | phase | orb |
|-----------|----------|----------|---------|--------|
| sun | β | moon | β β | 1Β° 47' |
| sun | β‘ | mercury | β β | 1Β° 48' |
| sun | β³ | asc | β β | 0Β° 34' |
| moon | βΉ | moon | β β | 0Β° 13' |
| moon | β | asc | β β | 1Β° 00' |
| moon | β‘ | mc | β β | 0Β° 31' |
| mercury | β‘ | saturn | β β | 1Β° 11' |
| mercury | β | neptune | β β | 0Β° 15' |
| mars | β³ | mars | β β | 0Β° 29' |
| mars | β³ | asc_node | β β | 1Β° 25' |
| uranus | β³ | saturn | β β | 1Β° 41' |
| neptune | β³ | uranus | β β | 0Β° 33' |
| pluto | β‘ | sun | β β | 0Β° 58' |
| asc_node | β³ | neptune | β β | 1Β° 37' |
| asc_node | β | pluto | β β | 0Β° 45' |
| mc | β‘ | sun | β β | 1Β° 49' |
# Aspect Cross Reference of Transit(cols) vs MiMi(rows)
| | β | β½ | βΏ | β | β | β | β | β
| β | β | β | Asc | MC | sum |
|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-------|------|-------|
| β | | | | | | | | | | β‘ | | | β‘ | 2 |
| β½ | β | βΉ | | | | | | | | | | | | 2 |
| βΏ | β‘ | | | | | | | | | | | | | 1 |
| β | | | | | | | | | | | | | | 0 |
| β | | | | | β³ | | | | | | | | | 1 |
| β | | | | | | | | | | | | | | 0 |
| β | | | β‘ | | | | | β³ | | | | | | 2 |
| β
| | | | | | | | | β³ | | | | | 1 |
| β | | | β | | | | | | | | β³ | | | 2 |
| β | | | | | | | | | | | β | | | 1 |
| β | | | | | β³ | | | | | | | | | 1 |
| Asc | β³ | β | | | | | | | | | | | | 2 |
| MC | | β‘ | | | | | | | | | | | | 1 |
- see demo.ipynb for the HTML output
- optional dependencies for PDF report generation
- install with
pip install "natal[report]"
- see natal-report package for details
- demo_report_light.pdf: light theme report with Birth Chart
- demo_report_mono.pdf: mono theme report with Transit Chart
- create a
Config
object and assign it toData
object - it will override the default settings in
config.py
- a sample config as follow:
from natal.config import Display, Config, Orb
# adjust which celestial bodies to display
display = Display(
mc = False,
asc_node = False,
chiron = True
)
# adjust orbs for each aspect
orb = Orb(
conjunction = 8,
opposition = 8,
trine = 6,
square = 6,
sextile = 6
)
# the complete config object
config = Config(
theme_type = "light", # or "dark", "mono"
display = display,
orb = orb
)
# create data object with the config
data = Data(
name = "MiMi",
city = "Taipei",
dt = "1980-04-20 14:30",
config = config,
)
read the docs for complete references
- tagit: SVG / HTML generation and manipulation
- pyswisseph: astrological data - Swiss Ephemeris
- mkdocs-material: docs site generation