filmov
tv
Analyze Data with PowerShell | U.S. Presidential Election 2020 Dataset
![preview_player](https://i.ytimg.com/vi/UtJQ57RBhvg/maxresdefault.jpg)
Показать описание
Most of my videos on PowerShell have centered around language techniques. Let's change gears a little bit and do something a bit more practical, like data analysis. While perusing the Internet, I discovered a New York Times API that provides 2020 U.S. election data in a JSON format. Let's use PowerShell to download that data locally and then load it and run some queries against it!
PowerShell natively offers a ConvertFrom-Json command. Quite simply, this command accepts a JSON string as input, and in return, it provides a PowerShell object exposing the various properties on the JSON data structure.
Where-Object can be used to filter PowerShell objects using a specified "filter script." The filter script is applied to each object in the pipeline.
Add-Member is a powerful command that enables you to add properties and methods to PowerShell objects. In this video, we'll use Add-Member to add a new calculated property to each object in an array. We'll take the UNIX timestamp in microseconds and turn it into a new property that contains a more human-friendly System.DateTime object.
Producer: Trevor Sullivan
#Microsoft #PowerShell #Analytics
PowerShell natively offers a ConvertFrom-Json command. Quite simply, this command accepts a JSON string as input, and in return, it provides a PowerShell object exposing the various properties on the JSON data structure.
Where-Object can be used to filter PowerShell objects using a specified "filter script." The filter script is applied to each object in the pipeline.
Add-Member is a powerful command that enables you to add properties and methods to PowerShell objects. In this video, we'll use Add-Member to add a new calculated property to each object in an array. We'll take the UNIX timestamp in microseconds and turn it into a new property that contains a more human-friendly System.DateTime object.
Producer: Trevor Sullivan
#Microsoft #PowerShell #Analytics
Комментарии