 |
Caro-COOPS.org Discussion Board Discussion area for Caro-COOPS-related initiatives
|
| View previous topic :: View next topic |
| Author |
Message |
jcothran
Joined: 24 Feb 2025 Posts: 176 Location: Columbia, SC
|
|
| Back to top |
|
|
johnevans
Joined: 10 Apr 2025 Posts: 2 Location: Orono, ME
|
| Posted: Thu Apr 10, 2025 9:09 am Post subject: usgs river data |
|
|
| Hey guys, good meeting you at the gomoos workshop last week. Just curious about how you are digesting the river data. I had looked into this sort of thing a few months ago and got something automated up and running, but there were enough differences in the ascii formats between states that I had to run the files thru a pretty ugly pipeline of cut, sed and awk that's not fit for human readability.
|
|
| Back to top |
|
|
jcothran
Joined: 24 Feb 2025 Posts: 176 Location: Columbia, SC
|
| Posted: Thu Apr 10, 2025 9:26 am Post subject: usgs river data |
|
|
Good meeting you guys too!
You're ahead of where I'm at. I haven't written the first line of code to address this issue specifically, but if I can remove the header section, leaving just the ascii columns, I'll probably try to use sed and awk scripts similar to the ones I'm planning on using listed in the following post:
http://www.carocoops.org/bb/viewtopic.php?t=40
If you want to post your code as an attachment, I can try sometime to take a look at any specific issues you're trying to resolve(or anyone else who is reading this bb).
Jeremy
|
|
| Back to top |
|
|
johnevans
Joined: 10 Apr 2025 Posts: 2 Location: Orono, ME
|
| Posted: Thu Apr 10, 2025 12:31 pm Post subject: USGS river data |
|
|
I attached a stripped down version of the bash script that I used to grab and parse the latest hourly readings. It did a pretty good job of it, but is heavy on regular expressions. I'm not running this code at the moment, so it definitely would not handle the "ice" tags that are present, but you guys probably wouldn't have to worry about that! I took a look at the format for SC rivers, looks pretty similar to the case in the code for MT.
Actually, never mind, I should have clicked on the links above. Now I see that you're acquiring the data from a different USGS page than I had been. Well, that answers that question, you found a much better source for the data than I did!
| Description: |
|
 Download |
| Filename: |
rsd_lite.txt |
| Filesize: |
2.6 KB |
| Downloaded: |
161 Time(s) |
|
|
| Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Powered by phpBB 2.0.4 © 2001, 2002 phpBB Group
|