Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bhava Chart API #16

Open
Pablo-korea opened this issue Sep 28, 2024 · 9 comments
Open

Bhava Chart API #16

Pablo-korea opened this issue Sep 28, 2024 · 9 comments

Comments

@Pablo-korea
Copy link
Collaborator

Pablo-korea commented Sep 28, 2024

Sir!
I want to make a Bhava Chart. But I can not find API.
what is the api for bhava chart?

@sengiv
Copy link
Contributor

sengiv commented Sep 28, 2024

@Pablo-korea thank you for your interest 🙏🙏 (this is what keeps the project going)

There is only 1 code base calculating Bhava Chart (South/Indian D1,D2... Chart) --> CODE

But there is 2 ways to access the same code

  1. API --> https://vedastroapi.azurewebsites.net/api/Calculate/SouthIndianChart/Location/Delhi,India/Time/12:05/13/11/2026/+05:30/Ayanamsa/LAHIRI
  2. Python --> it should be possible, look for method named Calculate.SouthIndianChart(...)
  3. C# --> similar to Python, call method directly Calculate.SouthIndianChart(...)

PS: I recommend you use the API, it is free & you can support the project 💌🙏😊

@Pablo-korea
Copy link
Collaborator Author

Thank you for the prompt response. The Bhava chart has been successfully generated as follows.
image
I have one more question.
Could I return the house numbers of the planets in the Bhava chart in a JSON format as shown below?
{
"bhava_planet_data": [
{
"name": "Ma",
"houseno": 1
},
{
"name": "Sa",
"houseno": 2
},
{
"name": "Mo",
"houseno": 3
},
{
"name": "Ke",
"houseno": 4
},
{
"name": "Asc",
"houseno": 6
},
{
"name": "Ju",
"houseno": 9
},
{
"name": "Ra",
"houseno": 10,
"name_kor": "라후"
},
{
"name": "Su",
"houseno": 11,
"name_kor": "태양"
},
{
"name": "Me",
"houseno": 11
},
{
"name": "Ve",
"houseno": 12
}
]
}

@sengiv
Copy link
Contributor

sengiv commented Sep 29, 2024

🚀🥰 Awesome that you got it working! (i was afraid the library was broken 😅)

@Pablo-korea please post your working code for Bhava Chart so others can be helped too 🙏🙏

As for the JSON output, it is technically possible with 1 method call after the Calculate.... call (but i forgot 🤯, it should be something like ToJson() or Tools.AnyToJson() )

Also missed to mention earlier that there is an EASY Python Code Generator (not fully tested, & you'll have to use under construction access) --> HOW GUIDE

image

API CALL https://vedastroapi.azurewebsites.net/api/Calculate/HousePlanetOccupies/PlanetName/All/Location/Singapore/Time/00:00/29/09/2024/+08:00

OUTPUT

{
"Status": "Pass",
"Payload": {
"HousePlanetOccupies": [
{
"Sun": "House4"
},
{
"Moon": "House3"
},
{
"Mars": "House2"
},
{
"Mercury": "House4"
},
{
"Jupiter": "House1"
},
{
"Venus": "House5"
},
{
"Saturn": "House10"
},
{
"Rahu": "House10"
},
{
"Ketu": "House4"
}
]
}
}

If the above output does not suite your needs 🫠 There is 430 calculate methods,
you can experiment and find the one you need.
image

PS: Based on your sample output & your name, looks like your from the wonderful land of Korea 🌸☯️?
Truly happy to see Vedic Astrology practiced all over the world 🌏😄
I hope it is of great use to you.

@Pablo-korea
Copy link
Collaborator Author

Hi! Good Morning
As I mentioned last time, I created the Bhava chart as follows, but the result is coming out the same as the Rashi chart.

bhavachart = Calculate.SouthIndianChart(birth_time,chart_type='Bhava')

So, I tried giving 'Test' as a parameter, but the result still comes out as the Rashi chart. Therefore, I believe the Bhava chart parameter is not being passed correctly

bhavachart = Calculate.SouthIndianChart(birth_time,chart_type='Test')

I would appreciate your input on how to pass the parameters correctly to generate the Bhava Chart.

@sengiv
Copy link
Contributor

sengiv commented Sep 30, 2024

@Pablo-korea if I'm not mistaken Rasi chart is already coded, and Bhava chart is "WIP" left with TODO comment.
To implement it, you'll need to touch the C# code, in main repo.

Don't let that scare you, it should be very easy....and I sincerely wish I could do it for you.
But unfortunately, the planets are extremely not favorable too me now,
I'm having Rahu, Ketu, Rahu, Saturn Dasa stacked now. 🪐 (hence even the site I can't bring up, even after much trial)
Mercury which is needed for coding is completely nullified now....I hope you don't see this as an excuse for the delays (just want you to know why I can't help you with code now)

But don't worry my bad planets won't last forever, in December, there is some improvements. And I'll definitely help implement the code, as soon as I'm able to. 🙏

@sengiv
Copy link
Contributor

sengiv commented Sep 30, 2024

@Pablo-korea after a quick check....I'm starting to think there is a misunderstanding in terms here.
What do you mean exactly when you say "Bhava Chart"?
image
Above are all the possible chart types. Basically the same as D1, D2, D3....
Thus by this logic. "Rasi" == "D1" == "Bhava"
If you meant to say "Bhava Chart" is the method by which planets are grouped into houses by degrees instead of by a sign.
Then that lies at deeper level in the logic. Technically it is possible, to alter that as well via a flag.

@Pablo-korea
Copy link
Collaborator Author

@sengiv
I sincerely thank you for your prompt response.
I learned that even when using the same birth information, the Rashi Chart and Bhava Chart can yield different results because they interpret the position and influence of the planets in different ways. Therefore, I learned that especially in the case of the Bhava Chart, Dasha-Bhukti analysis is conducted based on it. So, I am planning to create a separate Bhava Chart apart from the Rashi Chart. Previously, I implemented the Rashi Chart and Bhava Chart using the Prokerala API as follows.
image

I am now considering using VedAstro instead of Prokerala.

@sengiv
Copy link
Contributor

sengiv commented Sep 30, 2024

Yes, both methods are equally valid and it depends on the astrologer's preference.

APIs for both exist, as visible in screenshot below :

image

https://vedastroapi.azurewebsites.net/api/Calculate/PlanetsInHouse/HouseName/All/Location/Singapore/Time/00:00/01/10/2024/+05:30

PS : @Pablo-korea I'm very happy to see that you like the quick responses 😁🏎️🏃‍♂️. I do try hard to reply ASAP.
People often think that open source or non-profits are slow & unreliable....this should not be the case. I'm just following in the footsteps of Brother La Salle, who created 100% free schools in 1600s, and today they are some of the best schools in the world and still FREE & OPEN FOR ALL...🤗

@sengiv
Copy link
Contributor

sengiv commented Oct 12, 2024

🤔 @Pablo-korea are you still waiting on me to add an extra parameter to allow bhava chart (for SVG charts output) or is the existing calculate methods (JSON output) sufficient for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants