Created
June 14, 2022 19:04
-
-
Save benjamingr/456e7283411df0d75cad66e6d50282db to your computer and use it in GitHub Desktop.
Revisions
-
benjamingr created this gist
Jun 14, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ import { default as parser } from 'stream-json'; import { Readable } from 'stream'; const parkingViolations = await fetch('https://s3.amazonaws.com/philadelphia-parking-violations-raw-data/parking_violations_2017.json'); await Readable.fromWeb(parkingViolations.body) .pipe(parser()) .filter(violation => violation.name === 'stringChunk') .map(x => x.value) .take(5) .forEach(v => console.log(v));