NeoCSV at Work :)


I know a lot of people are interested in (public) datasets (to use as examples). The website contains a (small) number of interesting ones. Here is how to access them using NeoCSV.

(NeoCSVReader on:
 '' asUrl retrieveContents readStream) upToEnd.


ZnClient new
 url: '';
 contentReader: [ :entity | (NeoCSVReader on: entity readStream) upToEnd ];

Of course, they don't use UTF-8 and don't advertise it, so on some datasets you need to do something extra.

(NeoCSVReader on:
     value: ZnCharacterEncoder latin1
     during: [ '' asUrl retrieveContents ])
     readStream) upToEnd.

(Warning: this last example is quite large, 500K records).



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: