<jupyter_start><jupyter_text>Lambda School Data Science - A First Look at Data  Lecture - let's explore Python DS libraries and examples!The Python Data Science ecosystem is huge. You've seen some of the big pieces - pandas, scikit-learn, matplotlib. What parts do you want to see more of?<jupyter_code># TODO - we'll be doing this live, taking requests
# and reproducing what it is to look up and learn things
2+2<jupyter_output><empty_output><jupyter_text>Assignment - now it's your turnPick at least one Python DS library, and using documentation/examples reproduce in this notebook something cool. It's OK if you don't fully understand it or get it 100% working, but do put in effort and look things up.<jupyter_code># TODO - your code here
# Use what we did live in lecture as an example

#import all the required libraries

%matplotlib inline
from __future__ import division, print_function, absolute_import
import scipy.constants as const
import scipy

from matplotlib.pyplot import plot
from scipy.io import wavfile
from IPython.core.display import HTML, display



from numpy import sin, pi




#constants on the audio file
rate = 44100 #44.1 kiloHertz
duration = 2.5 #in sec

#gives sin waves that can be heard and with the correct amplitude
normedsin = lambda f, t : 2**13*sin(2*pi*f*t)

time = np.linspace(0, duration, num=rate*duration)

#more imports
import numpy
import struct
import warnings

#testing the inbuilt HTML5 audio player in IPython
la = lambda t : normedsin(440, t)
plot(time[0:1000], la(time)[0:1000])

ampl = la(time).astype(np.int16)

print("Test sin wave.")
wavPlayer(ampl, rate)
#We shift the hydrogen spectrum down to hearing range as the frequency is way above that of human hearing, even with computer help without the shift
f0 = const.Rydberg*const.c
print("The highest frequency of hydrogen is ", f0, "Hz and correspond to n = 1, m = ∞")
fshift = 440
print("We can shift the spectrum for it to be at 440 Hz (A)")

ryd = lambda n, m : fshift*(1/(n**2) -1/(m**2))
flyman = lambda x : ryd(1, x)
fbalmer = lambda x : ryd(2, x)

ser = lambda t : sum([normedsin(flyman(i), t) + normedsin(fbalmer(i + 1), t) for i in range(2, 8)])

serv = scipy.vectorize(ser)

ss = serv(time)

plot(time, ss)
ss = 2**15*ss/ss.max()

wavPlayer(ss.astype(np.int16), rate)<jupyter_output>The highest frequency of hydrogen is  3289841960355208.5 Hz and correspond to n = 1, m = ∞
We can shift the spectrum for it to be at 440 Hz (A)
{'fraction_non_alphanumeric': 0.09128121162505116, 'fraction_numerical': 0.03274662300450266, 'mean_word_length': 4.605504587155964, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '226446', 'license': 'MIT', 'n_tokens_mistral': 857, 'n_tokens_neox': 790, 'n_words': 342, 'path': 'LS_DS_111_A_First_Look_at_Data.ipynb', 'repo_name': 'KyleHaggin/DS-Unit-1-Sprint-1-Dealing-With-Data', 'size': '2443'}