Here are my thoughts:

 - It depends is the safest answer. You have to be comfortable on the road protecting your space, and being able to safely ride. Some people struggle to stay calm when cars pass them and that in turn makes them unable to focus on riding safely. In the picture you post, I would ride that in the shoulder if I was going slower than 15 MPH. If I was going faster like 18 MPH+, I would take the lane because there is not a lot of room to escape with the concrete barrier + debris is in the shoulder. Now the one question is do you have any alternative paths that are not on a major road or may even have a dedicated bike lane. If so, I would go that way even if a bit longer.

- I primarily ride on the road so I will provide tips and experiences that worked for me. 

- Understand your local laws for bikes and what it means to take a lane when there is no shoulder or bike path. Also try to understand how taking a lane prevents cars from passing closely to you because they know from far away they must change lanes to pass you. This also helps to improve traffic flow and your visibility to cars behind you. Here is a site that provides that info in more details: https://cyclingsavvy.org/road-cycling/#runover  

- Predefine your triggers for when you will take a lane. For me they are when the shoulder leaves me no escape path due to how narrow it is, or if there is debris in the shoulder, or if I am probably going to be traveling 50%+ of the traffic speed limit during a stretch. At those speeds, I want the full lane to avoid obstacles and potholes.

- Most states and it seems Hawaii too allows bikes to take a lane in certain conditions: See (§291C-145) https://www.hbl.org/bikelaws/  

- I would recommend getting a rear view mirror you could put on the drops of your bike bar or handlebar. It helps me maintain situational awareness. There are also rear facing bike radar, which I just got and am trying to figure out how to mount on my bike so have yet to use it. However, the rearview mirror makes a huge difference for me as far as situational awareness (i.e. knowing I can transition from shoulder to lane when the shoulder is sketchy, knowing a car is passing me and/or has already changed lanes behind me when I take a lane, etc.)

- I would make sure you have at least a rear flashing red light. I like and use Bontrager, because they have a flash pattern that is designed to prevent a driver from just zoning it out. 

- Speed is your friend on the road. I have ridden in congested roads when I was starting out learning to ride my road bike and the posted speed limit was at least 35 or more. It was in a location that was more dense than you will see in the video below, but people did give me space when I did take a lane. Now they were not happy about it and you will get more honks/people telling you how they feel about you. This certainly is not confidence inspiring and you have to judge for yourself how much of that you are willing to tolerate until you are able to ride faster. I chose to stick with it because I knew I was not breaking any traffic laws and I would eventually get faster.

- I cannot describe why it is other than human nature, but I found for some reason once you start reaching the upper teens or over 20 mph on a bike, cars tend to be less vocal about having to go around you. Perhaps it is because they are not used to seeing bikes go that fast and they choose to bite their tongue.


- I also choose to run a Go Pro as the equivalent to a dash cam in case something happens on the road I can focus on evasive actions vs. getting license plate info. In fact, that in itself can also be a deterrent to road rage as one driver when I was doing a recovery ride a couple weeks ago and riding 15MPH or so pulled over to start cursing at me. Once he saw he was being taped, he high tailed it out of there and the Go Pro captured all his info + voice if something more were to have occurred there.

- Below is a clip from one of my rides. I do not ride to the camera if that makes sense. It just captures what I normally do to stay safe on the road. In this clip, you see all of the above I described - lane control, transitioning to the shoulder and back depending on shoulder condition, etc. Note the last time I rode this stretch was over a year ago. I did not recall the condition of the shoulder so you will see a realistic ride vs. me knowing the condition of the pavement prior to the ride.

https://www.youtube.com/watch?v=140He6bzTYU


Hope that helps