{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Description\n", "This notebook is an exercise to study the speed at which the Ascendant (`Lagna`) moves per sec, on average over the entire year. Please remember to install the following packages in your virtual environment before running this notebook.\n", "\n", "```bash\n", "pip install plotly\n", "pip install --upgrade nbformat\n", "```" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "from flatlib import const\n", "import plotly.graph_objects as go\n", "from datetime import datetime, timedelta\n", "from vedicastro.VedicAstro import VedicHoroscopeData" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "def calculate_daily_asc_speed(year, lat, lon, utc, ayan, house_system):\n", " \"\"\"Calculates the ascendant speed for each day of the year.\"\"\"\n", " asc_speeds = []\n", " dates = []\n", " \n", " # Loop through each day of the year\n", " start_date = datetime(year, 1, 1)\n", " for day in range(365):\n", " current_date = start_date + timedelta(days=day)\n", " dates.append(current_date.strftime('%Y-%m-%d'))\n", " \n", " # Define two moments in time, at the start and end of the day\n", " datetime_start = current_date.replace(hour=0, minute=0, second=1)\n", " datetime_end = current_date.replace(hour=0, minute=0, second=11)\n", " # datetime_end = current_date.replace(hour=23, minute=59, second=59)\n", " difference = datetime_end - datetime_start\n", " diff_seconds = difference.total_seconds()\n", "\n", " \n", " # Generate horoscope data for both moments\n", " horoscope_start = VedicHoroscopeData(datetime_start.year, datetime_start.month, datetime_start.day, datetime_start.hour, datetime_start.minute, datetime_start.second, utc, lat, lon, ayan, house_system)\n", " final_chart_start = horoscope_start.generate_chart()\n", " asc_start = final_chart_start.get(const.ASC)\n", " asc_start_lon_deg = asc_start.lon\n", " \n", " horoscope_end = VedicHoroscopeData(datetime_end.year, datetime_end.month, datetime_end.day, datetime_end.hour, datetime_end.minute, datetime_end.second, utc, lat, lon, ayan, house_system)\n", " final_chart_end = horoscope_end.generate_chart()\n", " asc_end = final_chart_end.get(const.ASC)\n", " asc_end_lon_deg = asc_end.lon\n", " \n", "\n", " # Calculate the change in Ascendant position\n", " delta_degrees = (asc_end_lon_deg - asc_start_lon_deg) % 360\n", " \n", " \n", " asc_speeds.append(delta_degrees/ diff_seconds) # Speed in degrees per second over the entire day\n", " \n", " return dates, asc_speeds" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Asc Speed on 2024-01-01: 0.00420 ° per second\n" ] } ], "source": [ "# Example usage parameters\n", "year = 2024\n", "lat = 11.020085773931049 # Example latitude\n", "lon = 76.98319647719487 # Example longitude\n", "utc = \"+05:30\"\n", "ayan = \"Krishnamurti\" \n", "house_system = \"Placidus\"\n", "\n", "dates, asc_speeds = calculate_daily_asc_speed(year, lat, lon, utc, ayan, house_system)\n", "print(f\"Asc Speed on {dates[0]}: {asc_speeds[0]:.5f} ° per second\")\n", "\n" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Date: %{x}
AscSpeed: %{y:.5f}° per second", "mode": "lines", "name": "", "type": "scatter", "x": [ "2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05", "2024-01-06", "2024-01-07", "2024-01-08", "2024-01-09", "2024-01-10", "2024-01-11", "2024-01-12", "2024-01-13", "2024-01-14", "2024-01-15", "2024-01-16", "2024-01-17", "2024-01-18", "2024-01-19", "2024-01-20", "2024-01-21", "2024-01-22", "2024-01-23", "2024-01-24", "2024-01-25", "2024-01-26", "2024-01-27", "2024-01-28", "2024-01-29", "2024-01-30", "2024-01-31", "2024-02-01", "2024-02-02", "2024-02-03", "2024-02-04", "2024-02-05", "2024-02-06", "2024-02-07", "2024-02-08", "2024-02-09", "2024-02-10", "2024-02-11", "2024-02-12", "2024-02-13", "2024-02-14", "2024-02-15", "2024-02-16", "2024-02-17", "2024-02-18", "2024-02-19", "2024-02-20", "2024-02-21", "2024-02-22", "2024-02-23", "2024-02-24", "2024-02-25", "2024-02-26", "2024-02-27", "2024-02-28", "2024-02-29", "2024-03-01", "2024-03-02", "2024-03-03", "2024-03-04", "2024-03-05", "2024-03-06", "2024-03-07", "2024-03-08", "2024-03-09", "2024-03-10", "2024-03-11", "2024-03-12", "2024-03-13", "2024-03-14", "2024-03-15", "2024-03-16", "2024-03-17", "2024-03-18", "2024-03-19", "2024-03-20", "2024-03-21", "2024-03-22", "2024-03-23", "2024-03-24", "2024-03-25", "2024-03-26", "2024-03-27", "2024-03-28", "2024-03-29", "2024-03-30", "2024-03-31", "2024-04-01", "2024-04-02", "2024-04-03", "2024-04-04", "2024-04-05", "2024-04-06", "2024-04-07", "2024-04-08", "2024-04-09", "2024-04-10", "2024-04-11", "2024-04-12", "2024-04-13", "2024-04-14", "2024-04-15", "2024-04-16", "2024-04-17", "2024-04-18", "2024-04-19", "2024-04-20", "2024-04-21", "2024-04-22", "2024-04-23", "2024-04-24", "2024-04-25", "2024-04-26", "2024-04-27", "2024-04-28", "2024-04-29", "2024-04-30", "2024-05-01", "2024-05-02", "2024-05-03", "2024-05-04", "2024-05-05", "2024-05-06", "2024-05-07", "2024-05-08", "2024-05-09", "2024-05-10", "2024-05-11", "2024-05-12", "2024-05-13", "2024-05-14", "2024-05-15", "2024-05-16", "2024-05-17", "2024-05-18", "2024-05-19", "2024-05-20", "2024-05-21", "2024-05-22", "2024-05-23", "2024-05-24", "2024-05-25", "2024-05-26", "2024-05-27", "2024-05-28", "2024-05-29", "2024-05-30", "2024-05-31", "2024-06-01", "2024-06-02", "2024-06-03", "2024-06-04", "2024-06-05", "2024-06-06", "2024-06-07", "2024-06-08", "2024-06-09", "2024-06-10", "2024-06-11", "2024-06-12", "2024-06-13", "2024-06-14", "2024-06-15", "2024-06-16", "2024-06-17", "2024-06-18", "2024-06-19", "2024-06-20", "2024-06-21", "2024-06-22", "2024-06-23", "2024-06-24", "2024-06-25", "2024-06-26", "2024-06-27", "2024-06-28", "2024-06-29", "2024-06-30", "2024-07-01", "2024-07-02", "2024-07-03", "2024-07-04", "2024-07-05", "2024-07-06", "2024-07-07", "2024-07-08", "2024-07-09", "2024-07-10", "2024-07-11", "2024-07-12", "2024-07-13", "2024-07-14", "2024-07-15", "2024-07-16", "2024-07-17", "2024-07-18", "2024-07-19", "2024-07-20", "2024-07-21", "2024-07-22", "2024-07-23", "2024-07-24", "2024-07-25", "2024-07-26", "2024-07-27", "2024-07-28", "2024-07-29", "2024-07-30", "2024-07-31", "2024-08-01", "2024-08-02", "2024-08-03", "2024-08-04", "2024-08-05", "2024-08-06", "2024-08-07", "2024-08-08", "2024-08-09", "2024-08-10", "2024-08-11", "2024-08-12", "2024-08-13", "2024-08-14", "2024-08-15", "2024-08-16", "2024-08-17", "2024-08-18", "2024-08-19", "2024-08-20", "2024-08-21", "2024-08-22", "2024-08-23", "2024-08-24", "2024-08-25", "2024-08-26", "2024-08-27", "2024-08-28", "2024-08-29", "2024-08-30", "2024-08-31", "2024-09-01", "2024-09-02", "2024-09-03", "2024-09-04", "2024-09-05", "2024-09-06", "2024-09-07", "2024-09-08", "2024-09-09", "2024-09-10", "2024-09-11", "2024-09-12", "2024-09-13", "2024-09-14", "2024-09-15", "2024-09-16", "2024-09-17", "2024-09-18", "2024-09-19", "2024-09-20", "2024-09-21", "2024-09-22", "2024-09-23", "2024-09-24", "2024-09-25", "2024-09-26", "2024-09-27", "2024-09-28", "2024-09-29", "2024-09-30", "2024-10-01", "2024-10-02", "2024-10-03", "2024-10-04", "2024-10-05", "2024-10-06", "2024-10-07", "2024-10-08", "2024-10-09", "2024-10-10", "2024-10-11", "2024-10-12", "2024-10-13", "2024-10-14", "2024-10-15", "2024-10-16", "2024-10-17", "2024-10-18", "2024-10-19", "2024-10-20", "2024-10-21", "2024-10-22", "2024-10-23", "2024-10-24", "2024-10-25", "2024-10-26", "2024-10-27", "2024-10-28", "2024-10-29", "2024-10-30", "2024-10-31", "2024-11-01", "2024-11-02", "2024-11-03", "2024-11-04", "2024-11-05", "2024-11-06", "2024-11-07", "2024-11-08", "2024-11-09", "2024-11-10", "2024-11-11", "2024-11-12", "2024-11-13", "2024-11-14", "2024-11-15", "2024-11-16", "2024-11-17", "2024-11-18", "2024-11-19", "2024-11-20", "2024-11-21", "2024-11-22", "2024-11-23", "2024-11-24", "2024-11-25", "2024-11-26", "2024-11-27", "2024-11-28", "2024-11-29", "2024-11-30", "2024-12-01", "2024-12-02", "2024-12-03", "2024-12-04", "2024-12-05", "2024-12-06", "2024-12-07", "2024-12-08", "2024-12-09", "2024-12-10", "2024-12-11", "2024-12-12", "2024-12-13", "2024-12-14", "2024-12-15", "2024-12-16", "2024-12-17", "2024-12-18", "2024-12-19", "2024-12-20", "2024-12-21", "2024-12-22", "2024-12-23", "2024-12-24", "2024-12-25", "2024-12-26", "2024-12-27", "2024-12-28", "2024-12-29", "2024-12-30" ], "y": [ 0.004196090507289796, 0.004194524847355297, 0.004192651944882187, 0.004190474859058213, 0.004187997170251379, 0.004185223437642094, 0.004182158069451702, 0.004178806433677096, 0.004175174379903978, 0.0041712677584570205, 0.004167093513476061, 0.004162658489190107, 0.004157970096198937, 0.004153036239938501, 0.004147864891280051, 0.0041424645934824865, 0.004136843952898062, 0.004131012370453391, 0.0041249791477440565, 0.0041187538778928, 0.004112346875416506, 0.004105768046574099, 0.004099027965108348, 0.004092137387877415, 0.004085106776034309, 0.004077947367582624, 0.004070670017694056, 0.00406328586427378, 0.004055806308997489, 0.004048242366675936, 0.0040406055981975445, 0.004032907145671061, 0.0040251586634582285, 0.004017371402790104, 0.004009556603460851, 0.0040017259272474345, 0.003993890331881289, 0.003986061359896098, 0.003978250238347414, 0.0039704678667447976, 0.003962725678240986, 0.0039550343237891635, 0.0039474047500590356, 0.003939847740008417, 0.003932373518199484, 0.00392499264033006, 0.00391771508377019, 0.003910551172228338, 0.003903510654481579, 0.0038966033078622784, 0.00388983892754311, 0.0038832266680714155, 0.003876776120407044, 0.003870496264349299, 0.0038643958956470215, 0.0038584840502892347, 0.0038527689668683253, 0.003847259117554813, 0.0038419627747344975, 0.0038368876251411166, 0.0038320415849653956, 0.003827432117688545, 0.0038230667086168067, 0.003818952400138187, 0.003815096182725597, 0.003811505048824415, 0.0038081853718381353, 0.003805143981330161, 0.0038023871421444255, 0.003799920957405334, 0.0037977517549961704, 0.003795885037513358, 0.003794326486215027, 0.003793081552652211, 0.0037921551119495687, 0.0037915522999725226, 0.003791277856726083, 0.0037913365523536413, 0.003791732884627663, 0.003792471281570897, 0.0037935559255174666, 0.0037949907464053466, 0.003796779879590417, 0.0037989268543498155, 0.0038014351786131327, 0.0038043083335281835, 0.0038075491740301006, 0.003811160770462152, 0.0038151457250449996, 0.0038195065944023553, 0.003824245635854595, 0.003829364766636445, 0.0038348660359901034, 0.0038407507765867875, 0.0038470207238759714, 0.003853676998926403, 0.003860720533782569, 0.0038681524802399283, 0.003875973132548438, 0.0038841829060061173, 0.0038927818653490933, 0.0039017692761859736, 0.003911144661176991, 0.003920906699204352, 0.0039310541160432425, 0.003941585207633125, 0.003952497866765725, 0.003963789823001207, 0.003975458177978908, 0.003987500090909179, 0.003999911917367172, 0.004012689583947804, 0.00402582901458004, 0.004039325035552111, 0.004053172427268237, 0.00406736545579065, 0.004081897395190026, 0.004096761594388454, 0.004111950327052227, 0.004127455461633645, 0.004143268457562499, 0.004159379715326849, 0.004175779542430291, 0.004192457181818554, 0.004209401784925149, 0.004226601467053115, 0.004244043694194488, 0.0042617157117547325, 0.004279603311641722, 0.004297692169495803, 0.0043159668854684695, 0.004334410992640869, 0.004353007900402872, 0.004371739764525273, 0.0043905882243620905, 0.004409534411291815, 0.0044285582625093415, 0.004447639554473426, 0.00446675687750826, 0.004485888687997886, 0.0045050123319640535, 0.004524104508328719, 0.004543141796813188, 0.004562099420525101, 0.004580952733880395, 0.004599676236227879, 0.004618243595035665, 0.004636628713507207, 0.004654804295728354, 0.004672743204667995, 0.004690418033487731, 0.004707800725907418, 0.004724863716074878, 0.0047415789197202685, 0.004757918916078551, 0.004773855899469481, 0.0047893624604682826, 0.004804411627475247, 0.004818976115052465, 0.004833029737977767, 0.0048465462298736385, 0.004859499898356034, 0.004871866291534843, 0.004883621011720152, 0.004894741116851264, 0.004905204671928232, 0.004914990343542059, 0.004924078523055186, 0.004932450534323607, 0.004940089259218894, 0.0049469788809346936, 0.004953104947458087, 0.004958454753722208, 0.00496301682415492, 0.004966781816028743, 0.0049697414833531186, 0.004971889197400969, 0.004973220544474089, 0.0049737320578003615, 0.004973422614341416, 0.004972292934246525, 0.004970345106949025, 0.004967583634430639, 0.004964014502240844, 0.004959645666747292, 0.004954486642469646, 0.004948548420725274, 0.004941843727925744, 0.004934386415783365, 0.004926192297159559, 0.004917278058957209, 0.004907661711899891, 0.004897363077088812, 0.004886402401592704, 0.004874801590489142, 0.004862583573435586, 0.004849771675179681, 0.004836390825471426, 0.004822466113358815, 0.004808023507870729, 0.004793089761168545, 0.0047776915571269285, 0.0047618565195183035, 0.004745611968739638, 0.0047289859220224885, 0.004712005942857189, 0.0046946995647605405, 0.004677094784274516, 0.004659218731555015, 0.004641099150104466, 0.00462276329341158, 0.004604237853269311, 0.004585549903619324, 0.0045667253302688945, 0.004547790044026456, 0.004528769407153632, 0.004509687733949974, 0.00449056926635123, 0.004471437091605068, 0.004452314179188477, 0.004433222319001473, 0.004414182809426137, 0.004395216442418715, 0.004376342759534424, 0.004357581223843355, 0.004338950284430254, 0.004320467381830895, 0.004302149915807974, 0.004284013853917657, 0.0042660749441147065, 0.004248348234303733, 0.0042308476371786695, 0.004213586855593121, 0.00419657836700793, 0.00417983440672387, 0.004163366008107516, 0.0041471837095159005, 0.004131297608907403, 0.0041157167193766496, 0.004100450145845968, 0.004085505986825666, 0.004070891795624476, 0.004056615033430688, 0.00404268198597677, 0.004029098861055758, 0.004015871343894162, 0.004003004209010896, 0.003990502188496237, 0.003978369275966287, 0.003966609193783199, 0.003955225146246732, 0.003944219796705539, 0.003933595772298304, 0.00392335480602668, 0.003913498898329948, 0.0039040292844610748, 0.0038949468939982524, 0.003886252805583723, 0.003877947224967926, 0.0038700305359192556, 0.003862502855172778, 0.003855363575736703, 0.00384861237126799, 0.0038422480679386694, 0.0038362695262932787, 0.003830675217341195, 0.003825463319486744, 0.0038206320111797256, 0.003816179055688451, 0.0038121024743233535, 0.003808399723853029, 0.0038050680703534566, 0.0038021050079095177, 0.0037995072384319427, 0.0037972716870115163, 0.0037953949920392915, 0.0037938735068607345, 0.0037927034728227225, 0.003791880812038073, 0.0037914013427950977, 0.0037912607842471857, 0.003791454593712729, 0.003791978016643327, 0.003792826051048337, 0.00379399391825217, 0.0037954762656482897, 0.003797267764528556, 0.003799363112456433, 0.0038017563890861083, 0.0038044420902380695, 0.003807414035510703, 0.0038106659758881277, 0.003814191545616552, 0.003817983899516264, 0.003822036215454716, 0.0038263412587852485, 0.0038308920794079882, 0.003835681198066254, 0.003840700974228639, 0.0038459440193761908, 0.003851402160029238, 0.0038570674604684997, 0.0038629317926890394, 0.003868986402986252, 0.003875222944215295, 0.0038816323995575887, 0.003888205731018957, 0.0038949338839643134, 0.0039018071839933555, 0.003908816253644432, 0.003915951108243121, 0.003923202079612054, 0.0039305589542451, 0.003938011374253847, 0.003945549286758876, 0.0039531618569697, 0.00396083874982196, 0.0039685692547351435, 0.003976342279260336, 0.00398414722694298, 0.003991972709359004, 0.0039998076611723835, 0.004007640918918298, 0.004015460848385999, 0.004023256268801845, 0.004031015538623705, 0.0040387275120963295, 0.004046380607135802, 0.004053963443016073, 0.004061464854220276, 0.004068873227573988, 0.004076177650226498, 0.004083366840905001, 0.004090429619495239, 0.004097355381713896, 0.00410413302338668, 0.00411075205248892, 0.004117202151869037, 0.004123472784263527, 0.004129554084661891, 0.004135436149590532, 0.004141109568308821, 0.004146564942558939, 0.004151793328463782, 0.004156786310861094, 0.004161535333776101, 0.004166032878140413, 0.004170271361525124, 0.004174243604481376, 0.004177943296559761, 0.004181363883779455, 0.004184499698570221, 0.004187345517507879, 0.004189896168213636, 0.004192147440676308, 0.004194095358786854, 0.004195736658371629, 0.004197068513528279, 0.004198088541593847, 0.004198795088373686, 0.0041991867642138915, 0.004199263195326352, 0.0041990241354426415, 0.004198469885815825, 0.004197601758855285 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Ascendant Movement Per Second for Each Day of 2024" }, "xaxis": { "title": { "text": "Date" } }, "yaxis": { "title": { "text": "Movement (degrees/sec)" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Plotting with Plotly\n", "fig = go.Figure()\n", "fig.add_trace(go.Scatter(x=dates, y=asc_speeds, mode='lines',name = \"\",\n", " hovertemplate=\"Date: %{x}
\" + \"AscSpeed: %{y:.5f}° per second\"))\n", "\n", "fig.update_layout(title=f'Ascendant Movement Per Second for Each Day of {year}',\n", " xaxis_title='Date',\n", " yaxis_title='Movement (degrees/sec)',\n", " template='plotly_dark')\n", "fig.show()" ] } ], "metadata": { "kernelspec": { "display_name": "astro", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.8" } }, "nbformat": 4, "nbformat_minor": 2 }