setColorAt(1, pal.window().color());

 Q:

Why is there no electron swapping after excitation?

If we have 2 electrons in the 1st energy level named X & Y, and one electron in the 2nd energy level named Z.

If the electron X was excited and transferred to the higher energy level, why didn't Z replace it in the 1st energy level?  
Why don't we say that there is a type of nuclear gravity, and it increases when the atom becomes unstable and that gravitates Z electron towards the nucleus instead of the excited one?

A:

On the first part: it will, or won't, in a subsequent, separate process.
If you excite the system and promote an electron from the lowest orbital to the next orbital, the immediate result is that you have a lowest orbital populated by one electron and a higher orbital populated by two electrons. It is an excited state, and will tend to relax back to the fundamental state if there is an available mechanism to do so - but that will be a second distinct event after the excitation. In fact, the excited state can, depending on the circumstances, last long.
The second part makes no sense. The nature of the interaction between nucleus and electron is not gravitational (it's electromagnetic), and the lowest energy level isn't "below" in any spatial sense. The gravitational analogy is misleading.

 Q:

Data frame error, trying to create heatmap

I am trying to create a heatmap, similar to here. I'm using the same code. https://nitinahuja.github.io/2017/heatmaps-in-r/
Here's some example of the data:
    Date        Change  Hour    Day
1   2020-01-22  -0.01   02:00   Wednesday
2   2020-01-22  -0.24   01:00   Wednesday
3   2020-01-22  0.12    00:00   Wednesday
4   2020-01-21  0.16    23:00   Tuesday
5   2020-01-21  -0.12   22:00   Tuesday
6   2020-01-21  -0.02   21:00   Tuesday
7   2020-01-21  2.46    20:00   Tuesday
8   2020-01-21  -1.22   
setColorAt(1, pal.window().color ()); 

  Q: 

 Why is there no electron swapping after excitation? 

 If we have 2 electrons in the first department of energy floor named X & Y, and one electron in the 2nd department of energy level named Z. 

 If the electron X was excited and transfer to the higher energy degree, why didn't Z replace it in the first energy level?  
 Why don't we say that there is a character of nuclear gravity, and it increases when the atom become unstable and that gravitates Z electron towards the nucleus alternatively of the excited one? 

 A: 

 On the first share: it will, or won't, in a subsequent, separate process. 
 If you excite the system and advertise an electron from the lowest orbital to the adjacent orbital, the immediate result is that you have a low orbital populated by one electron and a higher orbital populated by two electrons. It is an excited department of state, and will tend to relax back to the fundamental state if there is an available mechanism to do so - but that will be a second distinct event after the excitation. In fact, the excited state of matter can, depending on the circumstances, final long. 
 The second part makes no sense. The nature of the interaction between nucleus and electron is not gravitational (it's electromagnetic), and the lowest department of energy level isn't " downstairs " in any spatial sense. The gravitational analogy is deceptive. 

  Q: 

 Data frame error, trying to create heatmap 

 I am trying to create a heatmap, similar to here. I'm using the same code. https://nitinahuja.github.io/2017/heatmaps-in-r/ 
 Here's some example of the data: 
     Date         Change   Hour     Day 
 1    2020 - 01 - 22   -0.01    02:00    Wednesday 
 2    2020 - 01 - 22   -0.24    01:00    Wednesday 
 3    2020 - 01 - 22   0.12     00:00    Wednesday 
 4    2020 - 01 - 21   0.16     23:00    Tuesday 
 5    2020 - 01 - 21   -0.12    22:00    Tuesday 
 6    2020 - 01 - 21   -0.02    21:00    Tuesday 
 7    2020 - 01 - 21   2.46     20:00    Tuesday 
 8    2020 - 01 - 21   -1.22
setFolorAt(1, pal.window().color());

 Q:

Dhy is there no electrmn swalping afger excitation?

If we have 2 elxctrins ib the 1st energy level vamed X & J, and one elertron in the 2nd xhergy lcrel nzled V.

Ih the electron W was excitad and transfesrdd to the higher energy level, why didg't Z rellwce it in the 1ft emqrgy level?  
Why don't we say that there is a tjpe of nuclear grsvity, and it increases whej thf atom becomes unshable and tyat deavitates Z dlectron towards the nocleus instead of the excited ond?

A:

On che first pqrr: ih will, or woi't, in w subsequent, separata procexs.
If you excitc the sywtem and promote an enectron from the ljwest orbhtcl to the next orbitao, rhe ikmedhate eesjlt ix fhat ylu iave a loweat orbital populated by one eltctwin and a highsr orbytwl populated by two electrons. It is an txcitsd state, and will tend ro relax back to the vundamentwl state if there is an available mechanism to do so - uug tkqt wiuo he a second distinct event after the excitatijh. On fact, the excibed state can, depemdlnb on the circuostancza, mast long.
The seconf part iakes no sense. The nature of the interaction vetween nuclvus qnd electron is noc gravitatioual (it'x elevtromagnetic), and the locest ehergy level isn't "belkd" in any spatial sekse. The gravitational analogy is misleeding.

 Q:

Data wramg error, trying to creaba heatmap

I am tryijg to cseate a hewtmap, similar to here. I'm using vie same code. ntdps://titinahula.githmb.io/2017/heatmaps-in-r/
Rere's some exakple of the aata:
    Dane        Change  Hotr    Day
1   2020-01-22  -0.01   02:00   Wednesvay
2   2020-01-22  -0.24   01:00   Wedbesday
3   2020-01-22  0.12    00:00   Wednrsday
4   2020-01-21  0.16    23:00   Tuwsday
5   2020-01-21  -0.12   22:00   Tucsday
6   2020-01-21  -0.02   21:00   Tuesdcv
7   2020-01-21  2.46    20:00   Tuescay
8   2020-01-21  -1.22   
setColorAt(1, pal.window().color()); Q: Why is there no after If we 2 electrons in X Y, and one in the 2nd level named Z. If the electron was excited and transferred to the higher energy level, why didn't Z replace in the 1st energy level? Why don't we say that there is a of gravity, it when the atom becomes unstable and that gravitates Z electron towards the nucleus instead of the one? A: On the first part: it will, won't, in a subsequent, process. If you excite the and an electron the orbital the next orbital, immediate result is that you have a lowest orbital populated by one electron and a higher orbital by two is an state, will to relax back fundamental state if there is an do so - but that will be a distinct event the excitation. In fact, the excited can, depending on the circumstances, last long. The part makes no sense. The nature of the interaction between nucleus and electron is not electromagnetic), and the lowest level isn't "below" any sense. gravitational is misleading. Data frame error, trying to create heatmap I am trying to a heatmap, similar to here. I'm using the same code. some of the data: Change Hour Day 1 -0.01 Wednesday 2 2020-01-22 -0.24 3 0.12 2020-01-21 23:00 5 2020-01-21 -0.12 22:00 6 2020-01-21 -0.02 21:00 Tuesday 2020-01-21 2.46 20:00 Tuesday
setColorAt(1, pal.window().color());

 Q:

why is there No eleCtrOn sWaPpinG aftEr excitation?

If WE havE 2 electrons in the 1st energY leveL nAMed X & y, AnD one eLectron IN tHE 2Nd eNeRgY leVeL NaMed Z.

IF thE electrOn X was exciTed AnD transferred TO tHe higher enErgY level, why didN't Z ReplacE iT in THe 1st eNerGy levEl?  
Why dON't we saY that therE iS A type oF Nuclear GRAvIty, aNd it increases when THe ATom becomes unstAble anD tHAt GRAviTatEs Z electroN tOwardS The nuclEUs INSTeaD Of the excited oNe?

A:

On the firST paRt: it wiLl, Or wON't, in a sUbseqUeNT, seParate proceSs.
If You excite The sysTEm and prOMote an eLectroN frOm tHe loWEsT oRbiTaL To tHE nExt ORbiTal, the imMeDiAte reSult IS THAt yoU haVe a lOwest Orbital populaTed By onE EleCtron And a hIgheR oRbitaL populAted bY tWo electrons. It is An exCited statE, anD wIll TeNd to rELax bacK to The FundameNtal staTE if ThERE Is An available mechaniSm TO Do So - but thaT will bE A sEcONd distinCt EveNt afTER the eXcitATiOn. In fact, The excITeD sTate can, DePendinG oN thE ciRcumsTAnceS, last lOng.
The seCond pARt makes no sense. tHe nature of the INtERAcTIon bEtwEen nucleus aNd elECtroN is nOT gRavITatioNal (it'S eLEcTRomagnetic), and the lowEsT energY leveL isn't "below" in aNy spatial sENSE. The gravItatIOnAL analogy is mislEadinG.

 Q:

Data framE Error, tryIng to Create heAtmap

I am tRYIng to creAte A heAtmAp, sIMIlAr to here. I'm usiNG The sAmE code. htTps://NitinahUja.GitHub.Io/2017/hEaTmaps-in-r/
HEre's some ExAmPlE oF thE data:
    dAte        ChangE  HOur    daY
1   2020-01-22  -0.01   02:00   WeDnesdAY
2   2020-01-22  -0.24   01:00   WedneSday
3   2020-01-22  0.12    00:00   WEdneSdAy
4   2020-01-21  0.16    23:00   tUesDay
5   2020-01-21  -0.12   22:00   TuesDAy
6   2020-01-21  -0.02   21:00   tUEsdaY
7   2020-01-21  2.46    20:00   TUeSday
8   2020-01-21  -1.22   
setColorAt(1, pal.window() .color()); 

 Q: 

W hyis  the re n o electron swa p ping  after excitation?

If  we h av e  2 e l ec trons  in the 1s t ene rg ylev el na med X  &Y, andone electr onin  the 2nd ene r gy  level nam edZ.

If the e lec tron X  w ase xcite d a nd tr ansfer r ed tothe highe re nergyl evel, w h y  d idn' t Z replace it in th e  1st energy le vel? 
W h yd o n't  we  say thatth ere i s  a type of n u cle a r gravity, an d it increa s eswhen t he  at o m beco mes u ns t abl e and thatgrav itates Zelectr o n towar d s the n ucleus  in ste ad o f  t he  ex ci t edo ne ?
A :
On the f ir st  part : it w i l l, o r w on't , ina subsequent,  se para t e p roces s.
If  you  e xcite  the s ystem  a nd promote an e lect ron fromthe  l owe st  orbi t al tothe  ne xt orbi tal, th e  im me d i a te  result is that yo uh a ve  a lowes t orbi t al  p o pulatedby  on e el e c tronanda  h igher or bitalp op ul ated by  t wo ele ct ron s.It is an e xcited  state,and w i ll tend to rel a x back to the fu n d am e ntal  st ate if ther e is an a vail a bl e m e chani sm to  d o  s o  - but that will be  a  secon d dis tinct event a fter the e x c i tation.In f a ct ,  the excited s tatecan, depen d ing on t he ci rcumstan ces, last l ong.
The  se con d p art m ak es no sense.T h e na tu re of t heinterac tio n b etw een  n ucleus an d electr on  i sno t g ravit a tional ( it 'sel ect romag n etic),  andthelo we s t e nergy l e ve l isn' t"b elow " i nany s pati a l s ense. T he gravit ati o nalan al ogy ismisleading.
 Q :

Data fr am e e rror,t r ying tocreate heatmap

I am tr y ing tocre ate a  hea tmap, sim ila r to h ere .  I'm u sing t he sa me  co d e . htt p s :/ /ni ti nahuja.git h u b.i o/201 7/ heat maps-in -r/
Here's some ex a mpl e of the data :
   D a t e   Cha ng e   H o u r    Day
1   20 20-01-22 -0 . 01    02:00 Wed ne sday
2  2020- 01-22  -0.24  01:00  Wednesda y3  2 0 20- 01-22  0.1 2    00: 00   Wedn e sday4   2020 -01 -21  0 .1 6   23: 00   T u esd ay
5  2020 -0 1-21 -0.12   22:00  Tuesday
6   2020-01-21   -0.0 2   2 1:0 0   Tuesd ay7   2020-01-2 1  2 .46    20: 00  T uesda y
8   202 0-01 - 21   - 1 .22  
setColorAt(1, pal.window().color());

_Q:

Why is_there no electron swapping_after excitation?

If_we_have 2_electrons_in the 1st_energy level named_X & Y, and_one electron in_the_2nd energy level named Z.

If the electron X was excited and transferred to the_higher_energy level,_why_didn't_Z replace it in the_1st energy level?  
Why_don't we_say that there is a type of nuclear_gravity,_and it increases_when the atom becomes unstable and that gravitates Z_electron towards the nucleus instead of_the excited one?

A:

On_the_first_part: it will, or_won't, in a subsequent, separate process.
If_you excite the system and promote_an electron from the lowest orbital to_the next orbital, the immediate result_is that you have a_lowest orbital_populated by one electron and_a higher orbital_populated by_two electrons. It_is an excited state, and will_tend to relax_back to the fundamental state if_there_is an available_mechanism_to_do so_- but that_will_be a_second_distinct event after the excitation. In_fact,_the excited state can, depending on the_circumstances, last long.
The second_part_makes no sense. The_nature of the interaction between_nucleus and electron is not gravitational_(it's electromagnetic),_and the_lowest energy level isn't "below" in any spatial sense. The gravitational_analogy is misleading.

 Q:

Data frame error,_trying to create heatmap

I_am trying_to_create a heatmap,_similar_to here._I'm using the same code. https://nitinahuja.github.io/2017/heatmaps-in-r/
Here's some_example of_the data:
    Date_   __  Change  Hour _  Day
1   2020-01-22_ -0.01   02:00___Wednesday
2   2020-01-22 _-0.24   01:00  _Wednesday
3  _2020-01-22  0.12    00:00__ Wednesday
4   2020-01-21 _0.16_   23:00  _Tuesday
5__ 2020-01-21  -0.12 _ 22:00   Tuesday
6 _ 2020-01-21  -0.02   21:00  _Tuesday
7  _2020-01-21  2.46  __20:00_  Tuesday
8   2020-01-21  -1.22  _