Download presentation
Presentation is loading. Please wait.
1
Batch Uploads In the ODM Using Worldwater.byu.edu
A Yellowstone Trophic State Data Preservation Project Ben Thompson Jeff Sadler Derek Whitman
2
Introduction Currently uploads are accomplished through two general methods. The first one is to upload a csv file with a specific format for any single site with a single source for one single type of variable with many values for different times. The second it to upload data using forms provided within the site. In both of these methods the site, source, and variable type must already be created within the ODM for the data entries to work. The goal of this project was to improve the way data is uploaded to the ODM through HydroServer Interactive by creating a csv file upload routine which will process multiple points in multiple sites and multiple data types as well as create new sites when needed. For the sake of simplicity, the project scope was limited to a single database within the ODM using a single source.
3
Background and Gaps Single, Multiple
CSV (only one site, variable, and source) Many people have data in spreadsheets
4
Gathering Data Dr. Woodruf Miller from BYU has been gathering data from surveys of the lakes in Yellowstone National Park and Teton National Park for the last 10 years or so. This data includes phosphorus content, chlorophyl content, and sechi depths of lakes. These data have been used to calculate trophic state indexies of the lakes using different trophic state index calculation methods. The flow rates of inlets and outlets of several of the lakes are also included in survey data.
5
Formatting and Organizing the Data
6
Formatting and Organizing the Data
Total Phosphorus (ppb) Total Phosphorus (mg/L) Flow (cfs) Hydraulic Residence Time (yrs) Phosphorus Retention Coef. Primary Production Carlson TSI Burns TLI Naumann TI Site Year Month Location Lat Lon Secchi Depth Chlorophyll-a (mg/m^3)
7
Creating the Batch Upload
Three Main Parts HTML PHP Python
8
HTML
9
HTML
10
PHP Successfully upload the file to a known location on the server
Two Main Objectives Successfully upload the file to a known location on the server Run the Python script
11
PHP Uploading the File
12
Running the Python Script
PHP Running the Python Script
13
Function to get Variable ID
Python Three Components Main script Function to get Site ID Function to get Variable ID
14
Overview HTML PHP Upload/Save Run Python Python Ajax check
Send printed messages PHP 2 Create Connection Input Data Update Series Catalog Get Variable ID Go to new data row Go to new data value Get Site ID
15
Results 116 sites 3700+ data values
New consistent format for recording survey data Massive time savings
16
Results
17
Conclusion Usefulness of tools like Python Data can be easily shared (CUAHSI HIS) Future batch uploads Improvements- sources and variables
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.