Let's consider three "positions" which are very common...

I made up the three labels "5 finger", "full octave scale", and "full octave chord", but something like those labels is used in many piano method books.
Now apply those to a passage with some position changes starting at bar 2 beat 2...

Or it could be done like this...

The slur lines are not meant to be actual performance phrases, but are meant only to show groupings of notes into one of the three position types.
Notice that the F#4
marked with *
is common between two positions, an incomplete run of 5 finger on E, which ends on finger 2, and the beginning of a full octave chord on D. That finger 2 is the place where you "pivot" between two positions.
Also notice the G4
to F#4
marked with **
. This is the other place where you "pivot" into a different position. Especially notice how the first G4
is played with finger 1, but after the pivot into a new position, the G4
is played again, but with finger 3.
You can think of some of these position changes as "contracting" or "expanding" beyond a given position. For example, at the first change *
you can think of the move from F#4
finger 2 "expanding" or "extending" the end of a 5 finger on E
down a step to reach the D
to start a full octave chord position.
The change at **
can be seen as a "contracting" of the full octave scale on D
where normally the Gf
to F#4
would be played with fingers 1 and 3, but because we a pivoting to a 5 finger on E
the F#4
is then played by finger 2. It's like the bottom part of the full octave scale on D
is "contracted" up into the E
position.
Expanding and contracting positions like that happens all the time. But also some position changes are accomplished switching fingers on a repeated note, or silently changing fingers on a held note.
A lot of piano methods are based on playing 5 finger position, scales, arpeggios, repeated notes, and double note scales (like playing scales in thirds in one hand.) When you practice those kinds of patterns in all major and minor keys, and apply the patterns to simple harmonic patterns like I V I
, you eventually start to make position changes without too much thought.
My suggestion is get a good method book to practice you scales, arpeggios, etc. while working on actual pieces like the jig. If drills seem boring, first be selective about the method books you choose. Some are more creative than others. Also, make your own variation on practice drills. Keep drill time at a level that suites you. Don't do zero drilling, you will miss out on a lot of fundamental skill development. Don't do to much that it kills your enthusiasm. Think of it as support for playing the real music.