Processing Data from Fantasy Springs Survey

Tags:
Science Blog
SLOG

I reworked one of my data processing scripts written in R to automatically process real-time SidePak aerosol data. You may recall I wrote the script originally for CO data processing.

With this script it is possible to very quickly create an R dataframe containing all of the real-time data present in a given directory. Attached is a ZIP file containing the new R processing scripts.

I applied the script to the data from our recent trip to Fantasy Springs Casino in Palm Springs, CA. Attached is a ZIP file containing all of the resulting processed data files. Also attached is a diagnostic plot showing the time series of each monitor (SP2, SP3, SP4, SP5).

To use the script, you simply first delete any extraneous data in each file, leaving only a header and columns of data, for example:

Date, Time, Aerosol
02/08/2008, 21:23:45, 0.040
02/08/2008, 21:23:55, 0.080
02/08/2008, 21:24:05, 0.100
[...

Then, you should name each file with descriptive information about what the file contains. These data are automatically incorporated into the final aggregate data base. The scripts are set up to expect files with four identifiers separated by underscores:

Type_Location_ID_Part.txt

For example, an actual data file name should look like the following:

Aerosol_Fantasy_SP3_A.txt

Finally, you simply run the script 'processAerosol.R" with the 'process_scripts.Rf' file in the same directory as follows:

R CMD BATCH processAerosol.R

Then all of the news files and a diagnostic plot will appear in the current directory. Let me know if you have any questions about how to use this script, e.g., on Windows. Using these scripts can save a lot of time in processing the SidePak data and producing a master file that can be analyzed further using R or any statistical package.

AttachmentSize
ProcessingScripts.zip -- R Scripts for Processing Real-Time Data2.84 KB
FantasyProcessData.zip -- Processed Data Files for Fantasy Springs65.44 KB
FantasySprings.jpeg -- Diagnostic plot for Fantasy Springs Data28.04 KB

Who's online

There are currently 0 users and 4 guests online.

User login

Search Google Scholar

Google Scholar

Search PubMed

PubMed Logo

Links of Interest