Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data through 3/31/24 #31

Open
8 of 11 tasks
ehmatthes opened this issue Apr 16, 2024 · 7 comments
Open
8 of 11 tasks

Update data through 3/31/24 #31

ehmatthes opened this issue Apr 16, 2024 · 7 comments

Comments

@ehmatthes
Copy link
Owner

ehmatthes commented Apr 16, 2024

In preparation for some upcoming presentations, update the analysis through the end of last month (3/31/24). See #11 for process.

  • Run current tests, and address any issues.
  • master -> main
  • Update all libraries?
  • Download updated data.
  • Append to current data set.
  • Update README in ir_data_clean/.
  • Check consistency of format.
  • Merge.
  • Share streamlit dashboard as interactive PR.
  • Should I be working in UTC?
  • Review open issues on this repository, and on irg_realtime repository.
@ehmatthes
Copy link
Owner Author

ehmatthes commented Apr 16, 2024

Downloading new data

  • Go to USGS Current Conditions for USGS 15087700 INDIAN R AT SITKA AK
    • Click Legacy real-time page, to end up here
  • Check Discharge, Gage height, and Tab-separated boxes
  • Set the date range so it overlaps the most recent data in ir_data_clean/irva_akdt_022016-102019_arch_format.txt, or most recent data file by one day.
    • 12/30/20-03/31/24
  • Copy and paste the output to a text editor, and save with a descriptive filename in ir_data_other, so we have this specific data in its own file.
    • Saved as irva_akdt_123020-033124_raw.txt.
    • I believe this is "arch" format.
  • Append this data to the most recent data file in ir_data_clean. Do this by adding a couple blank lines to the end of the existing data file. Then paste in the data starting at the next timestamp. Examine the data across the blank lines, and check for continuity.
  • When you're confident this represents an accurate transition, remove the blank lines. Save with an updated filename to represent the new date range, and remove the existing data file.
  • Modify process_hx_data.py to use the new data file. This is in the data_files = [...] block.
  • Run tests. (They'll fail, because tests will run over the new dataset.)
  • Process the new data, and note any irregularities.
  • Make sure to add any known slides during this period, as described in readme.
    • Make sure to run python slide_event.py after updating this file. Otherwise the new slides won't be included in the analysis and output.
  • It's always hard going back and trying to pinpoint landslide event times and information. It would be a really good habit to open an issue on this project any time there's a critical period, and any time there's a known slide. That's a perfect place to note any information that will be useful in later analysis.
    • When researching past events on facebook, can go to anyone's timeline, on their Posts line click Filters, and can see their timeline starting at a given date.

@ehmatthes
Copy link
Owner Author

ehmatthes commented Apr 16, 2024

Run current tests

  • Build venv
    • Fails on 3.12 and 3.11; try unpinning requirements and running. (Generates plots)
  • Test fails, can't import plot_heights. Import path issue? (Fixed by setting pythonpath in pytest.ini.)

@ehmatthes
Copy link
Owner Author

ehmatthes commented Apr 19, 2024

Update tests

  • Tests are brittle, because it's just running process_hx_data(), where the data to process is defined. So if you update the data source, tests break. Tests should specify which data to run against.

Tests pass for these files in process_hx_data():

    data_files = [
        'ir_data_clean/irva_utc_072014-022016_hx_format.txt',
        'ir_data_clean/irva_akdt_022016-123120_arch_format.txt',
        # 'ir_data_other/irva_akdt_123020-033124_arch_format.txt',
    ]

@ehmatthes
Copy link
Owner Author

ehmatthes commented Apr 19, 2024

Update for current data set

  • Failing on these lines; implement a try-except block to catch this.
USGS    15087700    2023-11-20 19:00    AKST    22.42   P   500 P
USGS    15087700    2023-11-20 19:15    AKST    22.45   P   514 P
USGS    15087700    2023-11-20 19:30    AKST    Eqp P   Eqp P
USGS    15087700    2023-11-20 19:45    AKST    Eqp P   Eqp P
USGS    15087700    2023-11-27 11:30    AKST    Eqp P   Eqp P
USGS    15087700    2023-11-27 11:45    AKST    21.85   P   275 P
USGS    15087700    2023-11-27 12:00    AKST    21.82   P   265 P

@ehmatthes
Copy link
Owner Author

ehmatthes commented Apr 20, 2024

Updating slides

  • Does SSSC have a public record of recent slides?
    • Emailed Ron 4/22/24.
  • Are there any records of the recent slides near Starrigavan/ Katlian Bay mouth?

@ehmatthes
Copy link
Owner Author

Building a streamlit app

For data exploration, and helping people understand the project.

  • Cache the actual dataset?

@ehmatthes
Copy link
Owner Author

Current output

--- Final Results ---

Data analyzed from: 09/05/2014 to 09/28/2023
  Critical rise used: 2.5 feet
  Critical rise rate used: 0.5 ft/hr

Notifications Issued: 20

True Positives: 6
  South Kramer Slide 8/2015 - Notification time: 41 minutes
  HPR Slide 9/2017 - Notification time: 60 minutes
  Medvejie Slide 9/2019 - Notification time: 35 minutes
  Olga Strait slides 10/26/20 - Notification time: 405 minutes
  Sand Dollar Drive Slide 11/2/2020 - Notification time: 25 minutes
  Crawfish Inlet slide 8/12/23 - Notification time: 330 minutes

False Positives: 14
  09/06/2014 21:00:00
  09/13/2016 13:00:00
  09/15/2016 05:45:00
  09/27/2017 03:15:00
  11/17/2018 21:49:00
  01/26/2019 14:30:00
  08/10/2020 06:35:00
  08/13/2021 16:00:00
  02/17/2022 02:30:00
  08/17/2022 21:00:00
  09/26/2022 21:15:00
  10/15/2022 10:00:00
  09/21/2023 06:30:00
  09/28/2023 00:00:00

False Negatives: 3
  Second Sand Dollar Drive Slide 11/2/2020
  HPR Slide 9/2016 (minor slide)
  Starrigavan Slide 9/2014 (time of slide unknown)

Slides outside range: 2
  Beaver Lake Slide 11/2011 (wind and snowmelt?)
  Redoubt Slide 5/2013 (not on Sitka road system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant