4

Analyze U.S. 2020 Election Data using PowerShell

 3 years ago
source link: https://trevorsullivan.net/2020/11/29/analyze-election-data-using-powershell/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Analyze U.S. 2020 Election Data using PowerShell

Hey folks, I came across an interesting data set today, thanks to the New York Times. They provide an API that exposes a simple JSON file containing results from the 2020 United States Presidential Election. Data is broken down into a few useful chunks: news highlights, and state-by-state data, which is further broken down into county. You can see the per-county party bias, vote counts, absentee ballots, and much more.

I figured this data set would make an interesting foundation to build some data analysis content around. In my latest video, we take a look at how to retrieve and inspect this data, from complete scratch. No smoke and mirrors here!

After recording this video, I realized that I had forgotten to discuss the powerful Group-Object command, which provides summarized data on common fields. Despite my forgetfulness, this video does cover PowerShell commands including:

  • Sort-Object – sort a bunch of PowerShell objects, based on one or more properties, either ascending (default) or descending
  • Format-Table – display PowerShell objects in a more readable tabular format, instead of list format
  • Select-Object – a versatile command that allow you to select properties from objects, and limit the number of results

Head on over to Twitter and follow me there, to get notified when I have new content available! You can also find me on Gab. Please subscribe to my YouTube channel as well, and share the video with your colleagues. Channel growth means I am able to put out more free content in the future!

Also, if you’d like to sign up for a free CBT Nuggets learner account, you can check out a limited set of our video training for free!

  analytics, data, powershell. Bookmark.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK