You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by the Command Line Cartography series, I started out implementing the same sequence for the state of Texas (this issue relates to step 8 in that sequence). Following this, I decided to automate this process by writing a PowerShell script that generates a choropleth based on a provided FIPS code.
With this in mind, I ran into a pretty big roadblock when trying to generate the NDJSON version of the census data. I've created a GitHub Repo to demonstrate the issue, but here is the short of it:
When calling ndjson-cat "{json-file}" | ndjson-split "d.slice(1)", I'm getting odd output artifacts in PowerShell:
I initially realized there was an issue when I would pipe this into the ndjson-map call directly after ndjson-split, and it was providing me with this error:
stdin:1
^
SyntaxError: Unexpected end of JSON input
If I run this from a command prompt instead, the desired output is provided.
The following block works just fine in PowerShell:
The only thing I can think of that would be different in this scenario is that this call to ndjson-split is simply accessing a property of the data, as opposed to calling a JavaScript Array function.
Activity