Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series vs items in the Cruncher input parameter file #485

Open
a-s-russo opened this issue Nov 26, 2024 · 1 comment
Open

Series vs items in the Cruncher input parameter file #485

a-s-russo opened this issue Nov 26, 2024 · 1 comment
Assignees

Comments

@a-s-russo
Copy link

Regarding the output dictionary for the input parameter file for Cruncher (https://github.com/jdemetra/jwsacruncher/wiki/Output-dictionaries), could a column please be added to clarify which keys refer to series as opposed to items?

That is, which tags correspond to the <matrix> items block, and which tags correspond to the <tsmatrix> series block, as per the example given at: https://github.com/jdemetra/jwsacruncher/wiki#parameters-file ? Are series tags simply those with a Java class of ec.tstoolkit.timeseries.simplets.TsData, and item tags are everything else?

image

image

@Immurb
Copy link
Member

Immurb commented Dec 6, 2024

The short answer is yes.

You can see how it is decided at

Map<String, Class> dic = new LinkedHashMap<>();
// for TramoSeats
Dictionary tsdic = TramoSeatsDictionaries.TRAMOSEATSDICTIONARY;
tsdic.entries().forEachOrdered(entry->dic.put(entry.fullName(), entry.getOutputClass()));
// // for X13
Dictionary x13dic = X13Dictionaries.X13DICTIONARY;
x13dic.entries().forEachOrdered(entry->dic.put(entry.fullName(), entry.getOutputClass()));
// series
Set<Type> types = CsvInformationFormatter.formattedTypes();
dic.entrySet().forEach(entry -> {
if (entry.getValue() == TsData.class){
tlist.add(entry.getKey());
}else if (types.contains(entry.getValue())){
mlist.add(entry.getKey());
}
});
result.TSMatrix=tlist.toArray(result.TSMatrix);
result.Matrix=mlist.toArray(result.Matrix);

Internally series have another output processor than the other information.
We are thinking about creating a new parameter file for the cruncher (without breaking the old one). Then the users don't have to make the separation because the program will be able to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants