Am 13.09.2018 um 19:42 schrieb Allin Cottrell:
On Thu, 13 Sep 2018, Sven Schreiber wrote:
> I have started some string-processing work to handle this, but I'm
> having doubts -- what are we really targeting? It would be helpful to
> have a real-world example.
I'd be surprised if it's possible to automate the pre-processing with
any useful generality. But as to what we're targeting, I'm attaching
an example from the IMF (see
https://www.imf.org/en/Data , under
"IMF Data Mapper"). IIRC, such files can sometimes have extra lines of
metadata above or below the data block.
OK, sorry for the delay. I'm attaching an attempt to read in the data
from such a file (as you posted, imf-gdp.csv) and convert it to a gretl
matrix right away. This string processing is probably not very
efficient, but OTOH it wouldn't be done often, so top speed is not
really an issue I guess.
What still has to be done is to shuffle around the various blocks of the
matrix to match the wanted dataset layout, but that shouldn't be so
difficult.
Comments welcome,
sven