Fw: reducing a file size by concatenating records

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

Fw: reducing a file size by concatenating records

thara vardhan-2
Dear List members

I  have file with 190792 records. I have to reduce the file size by using the measure offencesla.

I tried doing it through aggregate  - Mode ADD variables -  break variable Uniquepersonid, summary variable offencesla (sum).

I also tried to aggregate the file again by creating a new file with all variables in the break variable and offences (sum) in the summary variable.

Since the method of proceeding and Offence ANSZOC are different for each Uniquepersonid I also tried through break variable by 3 variables unqiuepersonid, methodofproceeding
and offenceANZSOC.

My data is structured as follows:

DUMMY DATA                                                                        

STATE        UniquePersonID        DateofAction        ProceedingID        Methodofproceeding        OffenceANZSOC        Dateofbirth        Sex        IndigenousStatus        OffencesLA

1        12345678                10.12.2012                12345                110                        1022                                                1                        1

1        12345678                10.12.2012                12345                110                        1041                                                1                        2

1        22347868                12.10.2012                35678                110                        1219                                                1                        1

1        22347868                12.03.2013                35678                250                        1624                                                1                        1

1        88994455                12.19.2012                334455        110                        1523                                                1                        3

1        88994455                14.03.2013                334455        110                        1523                                                1                        2


I would be grateful  if anybody could help me with this.

many thanks
regards
thara

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s)
only. It may contain private, confidential, copyright or legally privileged
information. If you are not the intended recipient or you have received this
email by mistake, please reply to the author and delete this email immediately.
You must not copy, print, forward or distribute this email, nor place reliance
on its contents. This email and any attachment have been virus scanned. However,
you are requested to conduct a virus scan as well. No liability is accepted
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not
constitute a representation by the NSW Police Force unless the author is legally
entitled to do so.


Reply | Threaded
Open this post in threaded view
|

Re: Fw: reducing a file size by concatenating records

Art Kendall
it is very helpful to post what your data look like before. Would you please post what you would like the data to look like after.
Art Kendall
Social Research Consultants
On 10/2/2013 11:12 PM, Thara Vardhan [via SPSSX Discussion] wrote:
Dear List members

I  have file with 190792 records. I have to reduce the file size by using the measure offencesla.

I tried doing it through aggregate  - Mode ADD variables -  break variable Uniquepersonid, summary variable offencesla (sum).

I also tried to aggregate the file again by creating a new file with all variables in the break variable and offences (sum) in the summary variable.

Since the method of proceeding and Offence ANSZOC are different for each Uniquepersonid I also tried through break variable by 3 variables unqiuepersonid, methodofproceeding
and offenceANZSOC.

My data is structured as follows:

DUMMY DATA                                                                        

STATE        UniquePersonID        DateofAction        ProceedingID        Methodofproceeding        OffenceANZSOC        Dateofbirth        Sex        IndigenousStatus        OffencesLA

1        12345678                10.12.2012                12345                110                        1022                                                1                        1

1        12345678                10.12.2012                12345                110                        1041                                                1                        2

1        22347868                12.10.2012                35678                110                        1219                                                1                        1

1        22347868                12.03.2013                35678                250                        1624                                                1                        1

1        88994455                12.19.2012                334455        110                        1523                                                1                        3

1        88994455                14.03.2013                334455        110                        1523                                                1                        2


I would be grateful  if anybody could help me with this.

many thanks
regards
thara

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s)
only. It may contain private, confidential, copyright or legally privileged
information. If you are not the intended recipient or you have received this
email by mistake, please reply to the author and delete this email immediately.
You must not copy, print, forward or distribute this email, nor place reliance
on its contents. This email and any attachment have been virus scanned. However,
you are requested to conduct a virus scan as well. No liability is accepted
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not
constitute a representation by the NSW Police Force unless the author is legally
entitled to do so.





If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Fw-reducing-a-file-size-by-concatenating-records-tp5722357.html
To start a new topic under SPSSX Discussion, email [hidden email]
To unsubscribe from SPSSX Discussion, click here.
NAML

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Fw: reducing a file size by concatenating records

David Marso
Administrator
In reply to this post by thara vardhan-2
I bet we might be very helpful after you post what the data should look like after the restructuring ;-)

Thara Vardhan wrote
Dear List members

I  have file with 190792 records. I have to reduce the file size by using
the measure offencesla.

I tried doing it through aggregate  - Mode ADD variables -  break variable
Uniquepersonid, summary variable offencesla (sum).

I also tried to aggregate the file again by creating a new file with all
variables in the break variable and offences (sum) in the summary
variable.

Since the method of proceeding and Offence ANSZOC are different for each
Uniquepersonid I also tried through break variable by 3 variables
unqiuepersonid, methodofproceeding
and offenceANZSOC.

My data is structured as follows:

DUMMY DATA
STATE   UniquePersonID  DateofAction    ProceedingID    Methodofproceeding
OffenceANZSOC   Dateofbirth     Sex     IndigenousStatus        OffencesLA
1       12345678                10.12.2012              12345 110  1022
        1                       1
1       12345678                10.12.2012              12345 110  1041
        1                       2
1       22347868                12.10.2012              35678 110  1219
        1                       1
1       22347868                12.03.2013              35678 250  1624
        1                       1
1       88994455                12.19.2012              334455  110  1523
                                1                       3
1       88994455                14.03.2013              334455  110  1523
                                1                       2

I would be grateful  if anybody could help me with this.

many thanks
regards
thara
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s)
only. It may contain private, confidential, copyright or legally privileged
information.  If you are not the intended recipient or you have received this
email by mistake, please reply to the author and delete this email immediately.
You must not copy, print, forward or distribute this email, nor place reliance
on its contents. This email and any attachment have been virus scanned. However,
you are requested to conduct a virus scan as well.  No liability is accepted
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not
constitute a representation by the NSW Police Force unless the author is legally
entitled to do so.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: reducing a file size by concatenating records

Robert Walker
In reply to this post by thara vardhan-2

Thara,

 

Really depends on what you are trying to do, but MODE=ADDVARIABLES simply adds your aggregated values to the end of each record, so it doesn’t reduce the number of records nor file size … it looks like you simply want to aggregate by offender ID? If so, then…

 

* Australian and New Zealand Standard Offence Classification.

DATA LIST FREE / STATE (F1) UniquePersonID (F10) DateofAction (DATE9) ProceedingID (F10) Methodofproceeding (F3) OffenceANZSOC (F3) Dateofbirth (DATE9)

                 Sex (F1) IndigenousStatus (F1).

* Test data.

BEGIN DATA.

1 12345678 10.12.2012 12345  110 1022 14.05.1995 1 1

1 12345678 10.12.2012 12345  110 1041 14.05.1995 1 2

1 22347868 12.10.2012 35678  110 1219 14.05.1975 1 1

1 22347868 12.03.2013 35678  250 1624 05.05.1975 1 1

1 88994455 12.07.2012 334455 110 1523 05.05.1985 1 3

1 88994455 14.03.2013 334455 110 1523 05.05.1985 1 2

1 88994455 12.03.2013 334455 250 1624 05.05.1985 1 1

END DATA.

* Produces a basic working file with offence counts by ID – you don’t want to sum, you want a count of the codes.

AGGREGATE OUTFILE = * /BREAK=UniquePersonID /OffencesLA = N(OffenceANZSOC).

DATASET NAME ANZSOC WINDOW=FRONT.

 

Copy this into a syntax window and experiment.

 

HTH,

 

Bob Walker

Surveys & Forecasts, LLC

www.safllc.com

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thara Vardhan
Sent: Wednesday, October 02, 2013 11:11 PM
To: [hidden email]
Subject: Fw: reducing a file size by concatenating records

 

Dear List members

I  have file with 190792 records. I have to reduce the file size by using the measure offencesla.

I tried doing it through aggregate  - Mode ADD variables -  break variable Uniquepersonid, summary variable offencesla (sum).

I also tried to aggregate the file again by creating a new file with all variables in the break variable and offences (sum) in the summary variable.

Since the method of proceeding and Offence ANSZOC are different for each Uniquepersonid I also tried through break variable by 3 variables unqiuepersonid, methodofproceeding
and offenceANZSOC.

My data is structured as follows:

DUMMY DATA                                                                        

STATE        UniquePersonID        DateofAction        ProceedingID        Methodofproceeding        OffenceANZSOC        Dateofbirth        Sex        IndigenousStatus        OffencesLA

1        12345678                10.12.2012                12345                110                        1022                                                1                        1

1        12345678                10.12.2012                12345                110                        1041                                                1                        2

1        22347868                12.10.2012                35678                110                        1219                                                1                        1

1        22347868                12.03.2013                35678                250                        1624                                                1                        1

1        88994455                12.19.2012                334455        110                        1523                                                1                        3

1        88994455                14.03.2013                334455        110                        1523                                                1                        2


I would be grateful  if anybody could help me with this.

many thanks
regards
thara

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s)
only. It may contain private, confidential, copyright or legally privileged
information. If you are not the intended recipient or you have received this
email by mistake, please reply to the author and delete this email immediately.
You must not copy, print, forward or distribute this email, nor place reliance
on its contents. This email and any attachment have been virus scanned. However,
you are requested to conduct a virus scan as well. No liability is accepted
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not
constitute a representation by the NSW Police Force unless the author is legally
entitled to do so.