@node-jhora/analytics 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Package: `@node-jhora/analytics`
|
|
2
|
+
|
|
3
|
+
The `@node-jhora/analytics` package provides deep insights into planetary strengths, mathematical patterns (Ashtakavarga), and combination detection (Yogas).
|
|
4
|
+
|
|
5
|
+
## 💪 Shadbala (Six-fold Strength)
|
|
6
|
+
|
|
7
|
+
A complete implementation of the complex Parashari Shadbala system.
|
|
8
|
+
|
|
9
|
+
### Calculation Components
|
|
10
|
+
Shadbala is calculated in **Virupas** (points) and consists of:
|
|
11
|
+
1. **Sthana Bala** (Positional): Uchcha, Saptavargaja, Kendra, Ojayugma.
|
|
12
|
+
2. **Dig Bala** (Directional): Strength based on proximity to specific house cusps.
|
|
13
|
+
3. **Kaala Bala** (Temporal): Natonata, Paksha, Tribhaga, Ayanabala.
|
|
14
|
+
4. **Chesta Bala** (Motional): Based on planetary speed and retrograde status.
|
|
15
|
+
5. **Naisargika Bala** (Natural): Constant strength inherent to each planet.
|
|
16
|
+
6. **Drig Bala** (Aspect): Strength derived from benefic and malefic aspects.
|
|
17
|
+
|
|
18
|
+
### Usage
|
|
19
|
+
```typescript
|
|
20
|
+
import { calculateShadbala } from '@node-jhora/analytics';
|
|
21
|
+
|
|
22
|
+
const result = calculateShadbala({
|
|
23
|
+
planet, allPlanets, houses, sun, moon,
|
|
24
|
+
timeDetails: { sunrise, sunset, birthHour },
|
|
25
|
+
vargaPositions // D1, D2, D3, D7, D9, D12, D30 for Saptavargaja
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
console.log(`Total Shadbala: ${result.total} Virupas`);
|
|
29
|
+
console.log(`Ishta Phala: ${result.ishtaPhala}`);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🔢 Ashtakavarga
|
|
35
|
+
|
|
36
|
+
Calculates the "Eight-fold Grids" for planets and the combined Sarvashtakavarga (SAV).
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { Ashtakavarga } from '@node-jhora/analytics';
|
|
40
|
+
|
|
41
|
+
const result = Ashtakavarga.calculate(planets, ascendantSign);
|
|
42
|
+
|
|
43
|
+
// BAV for Sun
|
|
44
|
+
console.log("Sun BAV:", result.bav[0]);
|
|
45
|
+
// Sarvashtakavarga (SAV)
|
|
46
|
+
console.log("SAV Points:", result.sav); // Array of 12 scores
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 🧘 Yoga Engine
|
|
52
|
+
|
|
53
|
+
A powerful, rule-based engine to identify hundreds of planetary yogas.
|
|
54
|
+
|
|
55
|
+
### Configuration
|
|
56
|
+
Yogas are defined using a structured `YogaDefinition` interface:
|
|
57
|
+
```typescript
|
|
58
|
+
interface YogaDefinition {
|
|
59
|
+
name: string;
|
|
60
|
+
category: 'Raja' | 'Dhana' | 'Nabhasa' | 'Other';
|
|
61
|
+
conditions: Condition[]; // Logical AND of conditions
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Supported Conditions:**
|
|
66
|
+
- `placement`: Planet in specific house or sign.
|
|
67
|
+
- `aspect`: Aspect from Planet A to Planet B.
|
|
68
|
+
- `conjunction`: Multiple planets in the same sign.
|
|
69
|
+
- `lordship`: Lord of House X placed in House Y.
|
|
70
|
+
|
|
71
|
+
### Usage
|
|
72
|
+
```typescript
|
|
73
|
+
import { YogaEngine, YOGA_LIBRARY } from '@node-jhora/analytics';
|
|
74
|
+
|
|
75
|
+
const foundYogas = YogaEngine.findYogas(chartData, YOGA_LIBRARY);
|
|
76
|
+
console.log("Detected Yogas:", foundYogas);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 🏷️ Keywords
|
|
80
|
+
Shadbala, Ashtakavarga, Yoga Engine, Planetary Strength, Vedic Astrology, Jyotish, Parashara, BAV, SAV, Raja Yoga, Astrology Analytics, Bhava Bala, Dig Bala
|
|
81
|
+
|
package/package.json
CHANGED