-
Notifications
You must be signed in to change notification settings - Fork 106
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
Link electronic filings to their most recent amendment; if they are amended. #2073
Comments
Off the top of my head- |
Ah ok, that should be easy to add. |
an example output of the query above ^^
|
This looks good. I like that we have the entire amendment chain. We shouldn't show negative report IDs (file numbers). The negative file numbers are just place holders. There isn't a .fec file to link to for these. |
Remaining questions:
|
@PaulClark2 @LindsayYoung Do you know of any interesting test cases for a paper filer? I've written out some logic and it would be great to test it for validity. thanks! |
Try the DSCC and NRSC. They file monthly and often file amendments. DSCC - C00042366 |
Thanks @PaulClark2, the logic for paper has proven to be a bit challenging. But here is a snippet of where I'm at right now with query for paper filers:
Note that DSCC does indeed seem to be an interesting test case, something in my logic is off because it appears that multiple amendments are amending different original filings. Obviously this is not true, in my logic I say something amends an original So the question is what other type column can indicate which original filing those duplicate amendments should point to? I can post the logic if needed. |
@LindsayYoung @PaulClark2 Well, after looking at some of the image pdfs for those original 30G filings it seems as though those different rows for 30G, rpt yr 2012 are really the same filing (I think). But the page count is of monster size so are they spanned across multiple filings? Seems to be a bit complicated and in that case would it be more correct to point the amendments to the filings first in the series? Sorry to lob so many questions. |
@jontours are you matching report type too? That could be amended but would generally be correct and if we could do a manual override in rare cases that things are really messed up, even better. If getting the amendment chain it too challenging, making sure the outdated forms can point to the most recent form is the top priority. Maybe getting the full chain could then be a separate task. @PaulClark2 is there a way we could get the time on the receipt date field? That would be handy when more than one amendment comes in during one day. |
Getting the most recent amendment is probably the easiest task, so yeah that would definitely be an option to move forward. |
Resolved by https://github.com/18F/openFEC/pull/2093. Nice work! |
Just doing some exploratory work. Since the filings are essentially a tree (although a tree with only one branch), a recursive function seemed like a good fit, thankfully and awesomely Postgres has good support this, the query is as follows [updated]:
This creates a table with
path
anddepth
for now. Path being the amendment chain from any row to its original typeN
filing. There is obviously a lot of work to do to integrate this but take a look at the query and run it in dev to verify it is working properly (I verified a couple).Edit: this links any amendment to all the filings it amended. Some more work to be done to figure out how to build the chain to the most recent filing.
The text was updated successfully, but these errors were encountered: