2017 SCRAM Finder

3

1

Background

The nuclear industry has term, SCRAM, used to describe a quick shutdown of the reactor. There's a fun myth that it stands for "Safety Control Rod Ax Man," the role which served to shut down the Chicago Pile if it got too hot by literally cutting a rope with an ax (although this was debunked).

The US Nuclear Regulatory Commission (NRC) publishes a daily list of events at every licensed facility in the country. This includes power reactors, as well as research reactors, uranium mines, fuel fabrication facilities, and certain hospitals; we only care about power reactors. There are many possible reports, most fairly boring, but each report is given a SCRAM Code, which is what you will be searching for. One example is shown below:

enter image description here

The SCRAM Code is "A/R" to indicate it was an automatic reactor SCRAM, but other codes are possible. An "N" code indicates the event is not a SCRAM and can be ignored. Your task is to find all of the SCRAMS which occurred at US Nuclear power reactors in 2017.

Challenge

  • Your answer may take no input
  • Search through all daily event reports found here
  • Find all reports which have a SCRAM Code other than "N"
  • Reports must be at facility type "Power Reactor"
  • Output (STDOUT, nearest equivalent, function return, or sensible alternative) each SCRAM (in chronological order), identified by Facility Name, Event Number, Event Date, and SCRAM Code. Each field must be delimited in some fashion, and each SCRAM must be delimited by a separate delimiter. Other than this, output format is flexible.
  • Only a sample of a minimum of 5 SCRAMS needs to be included in your answer, or you can post the full list if you'd like.
  • Some SCRAMs will have reports on multiple days due to follow-up reporting, your answer should weed out duplicate SCRAMs.
  • Some sites have multiple reactors (units) which can SCRAM separately. You should determine SCRAMs at both units, but do not need to report which unit it came from. Required behavior for multiple unit simultaneous SCRAMs is not defined.
  • Note that not all 365 days of the year have reports, your answer must handle this.
  • This challenge is Code Golf, so shortest answer wins. Standard caveats and loopholes apply
  • In case the NRC changes the format of the webpage, your answer obviously doesn't need to handle this.

Sample Output

Field1 Field2 Field3 Field4|Field1 Field2 Field3 Field4|....
-------
Field1 Field2 Field3 Field4\n
Field1 Field2 Field3 Field4\n
...
------
[["Field1","Field2","Field3","Field4"],["Field1","Field2","Field3","Field4"],...]

wnnmaw

Posted 2017-12-28T14:41:17.510

Reputation: 1 618

Because the output is essentially fixed, [tag:kolmogorov-complexity] works too. (or not?) – user202729 – 2017-12-28T15:09:05.400

@user202729, Added internet tag, forgot it existed and tried to find a web-scraping tag at posting. I wouldn't consider this fixed output since hypothetically reports can change, a few will be added in the next two days, and some may be retroactively added as a result of audits. Answers will need to re-scrape each run. Will add the note on website changes – wnnmaw – 2017-12-28T15:12:47.373

Any reason for not passing the year as input? That would definitely justify the need to scrape. The URL would be https://www.nrc.gov/reading-rm/doc-collections/event-status/event/[YEAR]/. – Arnauld – 2017-12-28T17:15:51.883

I figured limiting to 2017 would make it nominally easier. Also I cant guarantee that the format of reports stayed consistent going back through the years – wnnmaw – 2017-12-28T17:23:14.253

Wow that's an awful website. Everything is just nested tables with very little other organization. No classes or IDs to work with -_- – Carcigenicate – 2017-12-31T23:40:52.643

@Carcigenicate, gotta love the gov't, they're always so tech savvy – wnnmaw – 2018-01-02T15:30:27.370

@wnnmaw I really wanted to do this challenge, but I'm not even sure it's feasible. Note how on the 28th (or 29th) of December, they retracted a report. The retraction notice offsets all the other elements, so it's not like you can say "the info table will always be the nth element". If you had picked a better set up site, this would have been a fun challenge. An hour of looking at their site structure for patterns just proved to be an exercise in frustration unfortunately. – Carcigenicate – 2018-01-02T16:08:09.777

The different parts of single reports aren't even grouped together. They're all just pushed into the same "feed". The only separator is the "top" button. – Carcigenicate – 2018-01-02T16:11:50.597

@Carcigenicate, I'm sorry to hear you can't do this especially given your excitement in answering! – wnnmaw – 2018-01-02T17:56:08.360

@wnnmaw Have you tried parsing it? There could be a pattern that I'm missing, but like I said, there doesn't seem to be a consistent enough structure to reliably get the correct data. – Carcigenicate – 2018-01-02T18:53:17.377

No answers