NPR

A Mission to Give Afghans Democracy Became a Bid to Repair America’s Own : NPR

The U.S. involvement in Afghanistan is a story of democracy and its shortcomings. In this piece, Steve Inskeep — host of NPR's Morning Edition, as well as NPR's morning news podcast Up First — analyzes how the United States inadvertently took on a mission to democratize Afghanistan, and instead undermined democracy at home, as unpopular wars tend to do.

NPR

The Biden Administration May Recommend COVID Boosters After 8 Months : NPR

Fully vaccinated Americans could be rolling up their sleeves for another dose of the coronavirus vaccine as soon as next month.

The Biden administration is close to advising fully vaccinated Americans get COVID-19 booster shots eight months after their last vaccine. A source familiar with the discussions among administration health experts said this recommendation could come as soon as this week.

US history shows spending on infrastructure doesn’t always end well

US history shows spending on infrastructure doesn’t always end well

Over the past two centuries, federal, state and municipal governments across the U.S. have launched wave after wave of infrastructure projects.

They built canals to move freight in the 1830s and 1840s. Governments subsidized railroads in the mid- and late 19th century. They created local sewage and water systems in the late 19th and early 20th centuries, and then dams and irrigation systems through much of the 20th century. During World War II, massive amounts of public money were spent building and expanding ports, factories, airfields and shipyards. And after the war, highway construction – long a state and local project – became a federal endeavor.

Many of these projects did not end well. The problem wasn’t that the country didn’t need infrastructure – it did. And the troubles weren’t the result of technical failures: By and large, Americans successfully built what they intended, and much of what they built still stands.

The real problems arose before anyone lifted a shovel of earth or raised a hammer. These problems stem from how hard it is to think ahead, and they are easy to ignore in the face of excitement about new spending, new construction and increased employment.

Python 🐍

Python 🐍

For years and years now I’ve always thought of Python as just another pesky programming language to learn and use when that’s what is available with the applications and APIs I need to use. A language with obnoxious tabs and devoid of brackets and semicolons that are common in other languages like C and PERL.

Sure I’ve written Python on and off for like five years, learning some python by getting a book out of the library, studying the oddities of the language and then diving into coding a few custom plugins for QGIS to automate my work flow creating maps for the blog. At one level Python is like every other language out there, the functions the classes, the variables. My general impression of Python was it reassembled Perl minus the oddities that make up the largely forgotten language that once powered the internet’s CGI scripts. I used Python but it was begrudgingly.

I’ve always liked PHP a lot. The standard library in PHP is enormous, the API rich with functions and classes to call out of the box. WordPress links closely with it and provides also a rich API. I use PHP and abuse it for purposes it’s not really designed for like processing shapefiles and shell scripting. Things like that should be really done in BASH or Python but I’ve always found PHP easier as I’ve used it on and off for two decades.

Then I discovered Geopandas, seeking a better way to manipulate and join shapefiles without opening QGIS. Which you can do a lot of that on the command line utilities like ogr2ogr, there are limits to what you can feed into that tool and get out. I wanted something more powerful and advanced than ogr2ogr and that lead me back to Python. So I somewhat begrudgingly went back to Python. And discovering PANDAS and Jupyter, I found something I really liked.

I don’t think you could call me a newbie at this point with Python but data science wasn’t part of my lexicon and certainly not something that I had ever done much in the past. Sure, I had manipulated data in Microsoft Excel and LibreOffice Calc for years, doing fancy pivot tables and formulas but writing a computer program to manage data seemed tedious and a lot of coding and debugging for something I could do relatively quickly in Excel. I’ve written many programs in the past to manage data – mostly in PHP or perl but also some in Python but it mainly was for datasets that I would regularly use like the weather data and graphs on my blog.

But since discovering Jupyter, which let’s you easily execute a few lines of python at one – testing out things and experimenting, learning the full power of the many rich python libraries like PANDAS and Numpy, my views have changed. I’ve discovered that often a few lines of python can replace a lot of mouse clicks in az spreadsheet and repeative tasks can either be fully automated or executed with a few hits of the return key.