GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
EXTRACT_METADATA(1) FreeBSD General Commands Manual EXTRACT_METADATA(1)

extract_metadata - read column metadata from SPSS and Stata binary files, and format it as JSON

extract_metadata input-file output-file

extract_metadata reads column metadata from existing binary data files, so that readstat can produce new, column-compatible binary files from CSV input files. Both programs use JSON as a metadata interchange format.

The input-file should be a file with one of the following extensions:

Stata binary file, version 104 or newer
SPSS uncompressed binary file
SPSS compressed binary file

In all cases, output-file should end in .json.

Suppose you have a Stata file with last year's survey data, and want to produce a compatible Stata file containing this year's survey data. First, extract the metadata:

extract_metadata last-year.dta survey-metadata.json

Now apply it to this year's data, which is stored in a CSV file:

readstat this-year.csv metadata.json this-year.dta

The first line of the CSV file should contain column names which match the column names in last-year.dta. If everything went well, your new binary data set is now stored in this-year.dta.

None.

Copyright (C) 2012-2019 Evan Miller, and others where indicated.

01 February 2019

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.