Biorhythm Calculator Project: Data Analysis and Visualization

Verified

Added on  2025/05/05

|6
|617
|292
AI Summary
Desklib provides solved assignments and past papers for students.
Document Page
Table of Contents
Biorhythm Calculator..............................................................................................................................2
Curves of Cosines and Sine wave in biorhythm......................................................................................2
Graph Of Biorhythm calculator...............................................................................................................2
Algorithm.................................................................................................................................................2
Source Code to Implement Biorhythm....................................................................................................3
Demonstration of Features.......................................................................................................................4
Discussion................................................................................................................................................4
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Biorhythm Calculator
Biorhythm is a geek word which can be known as bios and rhuthmos which means regular
motion which is occurring very often. Biorhythm will be useful by predicting the various
aspects of human behaviour in their life. Emotional, Physical and intellectual properties are
being identified and determined using a biorhythm calculator. Biorhythm calculator which is
being built in this assignment is about plotting the physical, emotional and intellectual
properties of the person according to the birth date of the person with respect to its target
which is being taken as today's date on which the program is being executed.
Curves of Cosines and Sine wave in biorhythm
Theory of biorhythm suggests that various biological lifecycle will take place in one’s life
and it will affect the various ability of the person such as emotional, physical and intellectual.
The cycle will begin from the birth of the person and it will steadily oscillate in the form of a
sine wave with repetition after two cycles. In most of the biorhythm models, three cycles are
being considered: 28 days for emotional cycle, 23 days for the physical cycle and 33-day
cycle for intellectual properties.
Graph Of Biorhythm calculator
Figure 1 Sample Graph of Biorhythm cycle
(Source: Crystalinks.com, 2019)
Document Page
Algorithm
1. Importing the necessary files which are required in the program ahead.
2. Read Input of Date of Birth from the user
3. Convert the date of birth into the ordinal form using date library which will be used for calculation
4. Taking the target day as today date and calculate the difference between these two dates.
5. Plotting the difference using matplotlib library in a graph.
Document Page
Source Code to Implement Biorhythm
# This Program is written to Calculate Biorhythm values and plot them in a range of 20 Days.
# Importing the Necessary Libraries which are required for calculation and Plotting the Graph
import matplotlib.dates
from daytime import date
from pylab import *
from numpy import array,sin,pi
import matplotlib.pyplot as plt
# Taking Date of Birth Input from the user and storing them in different variables
Year, Month, Date=map(int,input("Please Enter Your Date Of Birth {Format- YYYY/MM/DD}: ").split('/'))
# Converting the date in ordinal form
DOB = date(Year,Month,Date).toordinal()
# Target Date is today's date which is being taken.
Date_of_target = date.today().toordinal()
# Range in which graph is being plotted is For 20 days
Range = array(range(Date_of_target-10,Date_of_target+10))
# Plotting the values for different properties Physical, Emotional and Intellectual
Y_axis = 100*[sin(2*pi*(Range-DOB)/23), # Physical
sin(2*pi*(Range-DOB)/28), # Emotional
sin(2*pi*(Range-DOB)/33)]; # Intellectual
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
X_axis = []
for iterator in Range:
X_axis.append(date.fromordinal(iterator))
# Intialising the figure
Fig = Figure()
axs = Fig.gca()
# Plotting the Grpah.
plt.plot(X_axis, Y_axis[0],X_axis, Y_axis[1],X_axis, Y_axis[2])
# Plotting the legend for the above Graph
plt.legend(['Physical', 'Emotional', 'Intellectual'])
# Showing the Title of the Graph
plt.title("Biorhythm Calculator")
# Showing the grids in the graph
plt.grid("True")
# formatting the dates on the x axis
axs.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%d/%b'))
show()
Document Page
Demonstration of Features
The graph is being plotted according to the birth date of the user and to make it more
interactive, various color combination is being used to plot the graph. Labels and legends will
also be inserted which make the graph more understandable and readable.
Discussion
This assignment will be based on making a program in python which will calculate the
biorhythm of a person according to its date of birth. Target date which is being taken as
today’s date. After that, it will be demonstrating the properties whichare being accompanied
by a person like physical, emotional and intellectual property.
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]