

I’m traveling through Portugal at the moment, and an Australian guy struck up a conversation with me on the train yesterday. He and I start talking politics, and he starts talking about how illegal immigration is a massive problem. He’s supportive of mass deportation, and generally likes how Trump is handling things. We debate this back and forth, and then move on to other subjects.
Later in the conversation he reveals, without a hint of irony, that his visa in Portugal has expired while waiting on residence paperwork. I just stare at him for a moment, and then ask him if he realized he was an illegal immigrant. He doesn’t really see the irony. Absolutely stunned.

My two cents: start your own shop. Find a customer segment that you care about and build valuable things for them. It takes a fair amount of effort, but I’ve learned after several layoffs that it’s a lot harder to lose 10 customers than it is to lose one W2 job. Precarity is constant. Diversifying your income is a much better mitigator for a terrible job market than pivoting.
This is all assuming that you like your current line of work. If not, pivot sooner rather than later. Take an online course or watch a YouTube video, and then start doing the new thing to learn it. Build some case studies to develop and showcase your skills. What would a data science portfolio look like? What do other data scientists demonstrate on their sites? Learn enough to do that, and pepper in the current experience you have to differentiate yourself.