(Python) Script / code for Codebooks ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

(Python) Script / code for Codebooks ?

Jeff-2

 

…now that Jon’s got me started on python and dialogs, is there something out there somewhere with python programming or scripting (as I understand it, I’ll need the latter to access the spss output window, but the former will suffice if I don’t need that capability – is that correct?) that might get me started on creating a custom codebook from some survey data created outside of spss? The data will have variable labels and value labels, where the survey questions are the variable labels (although there will be some extraneous code I’ll have to modify). I know there is something built-in to the spss menu, but I need to customize much more than it permits.

 

Best,

 

Jeff

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: (Python) Script / code for Codebooks ?

Andy W
This is pretty generic, not sure exactly how to help. I have an example here
of reading in data from excel files and applying it to meta-data in SPSS,
https://andrewpwheeler.wordpress.com/2016/11/25/downloading-and-reading-in-american-community-survey-data-python-and-spss/,
but unless doing the exact same thing may not be obvious how it can be
applied to your situation. More specific you can be the better advice you
will get I imagine.



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: (Python) Script / code for Codebooks ?

Jon Peck
In reply to this post by Jeff-2
You might find the Programming and Data Management PDF that you can download from the IBM Predictive Analytics site helpful.  It has lots of Python and R code examples for doing typical SPSS-related tasks.

I should also point out the Custom  attributes feature built in to Statistics.  You can use it define your own custom metadata that will be saved with your sav file.  If there are properties not accommodated by the standard variable and file metadata,  this can be very useful.

Custom attributes are used within Statistics in the Data prep option to define validation rules that can be run against a dataset and generate reports on violations, but can use these for many other purposes.

On Tue, May 29, 2018 at 5:56 PM Jeff <[hidden email]> wrote:

 

…now that Jon’s got me started on python and dialogs, is there something out there somewhere with python programming or scripting (as I understand it, I’ll need the latter to access the spss output window, but the former will suffice if I don’t need that capability – is that correct?) that might get me started on creating a custom codebook from some survey data created outside of spss? The data will have variable labels and value labels, where the survey questions are the variable labels (although there will be some extraneous code I’ll have to modify). I know there is something built-in to the spss menu, but I need to customize much more than it permits.

 

Best,

 

Jeff

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD