Hi Marek,

 

Below is a message I sent out last week regarding your current issues with
importing CSV files in PSPP, which is a FANTASTIC PROGRAM:

 

START OF QUOTE

Last year I was doing text mining, VIA the IBM Watson system, and had some
issues importing raw data files (i.e., txt)  where labels were lost in the
import process.  After some research, I found a spreadsheet that permitted a
clean import with full labels intact.  The spreadsheet is Gnumeric
Spreadsheet.  Some of you are probably familiar with this program.  It is a
free program, so it is worth looking to see if it would help resolve the
issue/some of the problems.

 

As for the codebook with value labels, I did away with a codebook approach
20 years ago - it is quicker to use the "male" or "female value labels, as
suggested in this thread.  It was not that I was smarter than others, just
lazier than others.  In turn, if required, you can always use the "recode"
or "compute" routines to change the non-numeric variables to numeric values
for your fancy stats.

 

Just my simple understanding of the problem presented - at least, I think
that is the given problem.

 

Enjoy your weekend, folks.

END OF QUOTE

 

Take care,

John

___________________________

 



 

Email: jhwh...@techwriteinc.com <mailto:jhwh...@techwriteinc.com> 

 

 

 

From: Marek Ludwig <marek.lud...@fh-potsdam.de> 
Sent: Sunday, January 23, 2022 7:42 AM
To: jhwh...@techwriteinc.com; am...@alanmead.org; pspp-users@gnu.org
Cc: Katja Behrndt <katja.behr...@fh-potsdam.de>
Subject: AW: Import Codebook

 

Dear John, 

that is correct. We transformed the Excel files into CSV and the labeling in
form of the codebook gets lost during the process. 

 

Regards,

Marek

  _____  

Von: jhwh...@techwriteinc.com <mailto:jhwh...@techwriteinc.com>
<jhwh...@techwriteinc.com <mailto:jhwh...@techwriteinc.com> >
Gesendet: Freitag, 21. Januar 2022 18:50:24
An: am...@alanmead.org <mailto:am...@alanmead.org> ; Marek Ludwig;
pspp-users@gnu.org <mailto:pspp-users@gnu.org> 
Cc: Katja Behrndt
Betreff: RE: Import Codebook 

 

If I understand the issue correctly, variable labels are not being installed
when importing some Excel files into PSPP. Is this correct?

 

Take care,

John

___________________________

 



 

Email: jhwh...@techwriteinc.com <mailto:jhwh...@techwriteinc.com> 

 

From: Pspp-users <pspp-users-bounces+jhwhite=techwriteinc....@gnu.org
<mailto:pspp-users-bounces+jhwhite=techwriteinc....@gnu.org> > On Behalf Of
Alan Mead
Sent: Thursday, January 20, 2022 9:23 PM
To: Marek Ludwig <marek.lud...@fh-potsdam.de
<mailto:marek.lud...@fh-potsdam.de> >; pspp-users@gnu.org
<mailto:pspp-users@gnu.org> 
Cc: Katja Behrndt <katja.behr...@fh-potsdam.de
<mailto:katja.behr...@fh-potsdam.de> >
Subject: Re: Import Codebook

 

I find applying labels to be very time-consuming, so maybe that's bad news
for you. Maybe someone else will have a great idea.

 

But to make it as quick as possible, I'd recommend that you generate syntax
and execute that syntax. I think that will be MUCH quicker than individually
clicking and editing these values using the graphical user interface.

 

A lot of people are scared of syntax, but it's not so hard. An added
advantage of doing it this way is that you easily fix an error by fixing the
syntax and re-running it.

 

Also, if you have the information in a spreadsheet, I would try to generate
the syntax using formulas in the spreadsheet. If column A contained the spss
variable name (maybe "V1") and column B contained the variable label, then
into cell C1 I would insert:

 

="variable labels "&A1&" '"&B1&"'."  

 

(Note that there are single quotes, inside the double quotes, around B1
because it's a string.) 

 

If A1 = V1 and B1 = Beschriftung then this would generate:

 

variable labels V1 'Beschriftung'.

 

And if you paste that into a syntax window, add the line "Execute." and run
it, it would label this variable. You could paste 200 rows of Column C, add
"Execute." and create the 200 variable labels very easily.

 

The value labels could be done similarly but I'd have to see the spreadsheet
to devise the correct formula(s)...

 

This page describes the syntax: 

http://www.statsmakemecry.com/smmctheblog/using-syntax-to-assign-variable-la
bels-and-value-labels-in-s.html

 

This includes my solution and suggests an alternative (that may not work
with PSPP):

https://www.reddit.com/r/spss/comments/mobw0z/import_excel_file_while_mainta
ining_variable/

 

Here are the relevant PSPP manual pages:

https://www.gnu.org/software/pspp/manual/html_node/VALUE-LABELS.html

https://www.gnu.org/software/pspp/manual/html_node/VARIABLE-LABELS.html

https://www.gnu.org/software/pspp/manual/html_node/MISSING-VALUES.html

 

 

-Alan

 

 

On 1/19/2022 9:01 AM, Marek Ludwig wrote:

Dear All, 

we have read in a CSV dataset that we had generated from an Excel file.
Unfortunately, the codebook got lost in the process, so that the columns for
labels("Beschriftung"), value labels ("Wertelabels") and missing values
("Fehlende Werte") are empty. Since our dataset has over 200 variables,
filling them in manually would be very time consuming. Is there an
efficient, faster solution to read in the codebook or fill in these columns?


I would be very grateful for a hint!

Thanks a lot,

Marek

 

-- 
 
Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.
 
science + technology = better workers
 
https://talalg.com
 
 
Hofstadter's Law: It always takes longer than you expect, even when you
take into account Hofstadter's Law.
 
 

Reply via email to