Police-Data-Accessibility-Project / scrapers

Code relating to scraping public police data.
https://pdap.io
GNU General Public License v3.0
157 stars 33 forks source link

PA courts scraper #239

Open josh-chamberlain opened 5 months ago

josh-chamberlain commented 5 months ago

Context

existing case search: https://ujsportal.pacourts.us/CaseSearch endpoint: only sharing with engaged volunteers

The overall goal is to create infrastructure to help people answer questions using this complex data source

Initial work required

next milestone

Risks

How to start

Related questions

All of these concern Allegheny County; we believe all of them can only be answered with the aid of court docket analysis.

michaeldepace commented 3 months ago

@josh-chamberlain I talked with Max Chis and I'm interested in working through this issue. I'll message you on discord asking for the endpoint.

josh-chamberlain commented 3 months ago

@michaeldepace thanks! I shared details via DM, but putting here too:

For starters, we would want to do a scraper in the scrapers repository, which writes to CSV or JSON or SQLite or something depending on what’s convenient for you. Once it works locally and seems to do what it needs to, we can worry about scale and stuff. For this case I’m not sure how often we need it to run.

This is a complicated one—let me know if you want to chat or need anything!

josh-chamberlain commented 3 months ago

We got some info from a person who used a different endpoint previously to create a database with these tables:

Cases Defendants Case Calendar Confinements Offenses Bails Officers Police Departments Judges Courts Record counts

Here's some edited explanation:

Keep in mind that while filing date, docket number, court office, and short caption (plaintiff v. defendant) are available from the overview for all cases, and municipalities and zip codes of participants are usually (though not always) on the docket sheets, exact addresses are not publicly available.

Also keep in mind that while the fields present in the overview all fit neatly into a table with one string per field, the data from the docket sheets does not.

Each entry in the SQLite file is a python defaultdict.  This was necessary since many of the fields in the docket are nested, of variable length, and need to be incrementally modified each time the docket sheet is scraped.  When most of the rest of the system, including the overview entries for each case, was converted to use postgres SQL, I was not able to figure out a workable way of putting the data in the defaultdicts into a postgres table.  Accessing the data in mdj_docket_cases.db SQLite file would, I expect, be possible but require you to use SqliteDict and defaultdict from python 3.

It may be simpler to select docket numbers of interest and then use the PAeDocket web API for whatever details you want.

In case it might be helpful, I have included an example of what overview data (docket_table) vs the parsed docket sheet data (cases_table) for a random case look like in a python notebook vs what the PAeDocket web API returns.  Note that the docket_table entries are not updated after the overview is initially scraped, so those are only valid as of the date in the 'Scrape Date' field, and that the data in docket_table (but not cases_table) is available in the postgres DB.

example docket table and cases table ``` docket_table['MJ-05213-LT-0000011-2021'] {'Docket Number': 'MJ-05213-LT-0000011-2021', 'Court Office': 'MDJ-05-2-13', 'Short Caption': 'McKeesport Housing Authority v. Gray, Lakisha', 'Filing Date': '01/14/2021', 'County': 'Allegheny', 'Case Status': 'Active', 'Primary Participants': 'Gray, Lakisha', 'Docket Sheet': 'MDJReport.ashx?docketNumber=MJ-05213-LT-0000011-2021&dnh=3%2fMAc8Dx57gJeXaRgs23oA%3d%3d', 'Scrape Date': datetime.datetime(2021, 1, 19, 19, 45, 16, 205472, tzinfo=)} cases_table['MJ-05213-LT-0000011-2021'] {'Case Info': {'Judge Assigned': 'Magisterial District Judge Eugene F. Riazzi Jr.', 'File Date': '01/14/2021', 'Claim Amount': '$8,929.00', 'Case Status': 'Closed', 'Judgment Amount': '$9,135.35', 'County': 'Allegheny'}, 'Participants': [{'Participant Type': 'Plaintiff', 'Participant Name': 'McKeesport Housing Authority', 'Address': 'McKeesport, PA 15132'}, {'Participant Type': 'Defendant', 'Participant Name': 'Gray, Lakisha', 'Address': 'McKeesport, PA 15132'}], 'Disposition Summary': [{'Docket Number': 'MJ-05213-LT-0000011-2021', 'Plaintiff': 'McKeesport Housing Authority', 'Defendant': 'Lakisha Gray', 'Disposition': 'Judgment for Plaintiff', 'Disposition Date': '03/16/2021'}], 'Civil Disposition Details': {'Grant possession.': 'Yes', 'Grant possession if money judgment is not satisfied by the time of eviction.': 'No'}, 'Civil Disposition': {'Disposition Date': '03/16/2021', 'Monthly Rent': '$773.00', 'Judgment': [{'Defendant(s)': 'Lakisha Gray', 'Plaintiff(s)': 'McKeesport Housing Authority', 'Disposition': 'Judgment for Plaintiff', 'Joint/Several Liability': '$0.00', 'Individual Liability': '$9,135.35', 'Net Judgment': '$9,135.35'}], 'Judgment Components': [{'Type': 'Rent in Arrears', 'Amount': '$8,929.00', 'Deposit Amount': '$0.00', 'Adjusted Amount': '$8,929.00'}, {'Type': 'Costs', 'Amount': '$206.35', 'Deposit Amount': '$0.00', 'Adjusted Amount': '$206.35'}]}, 'Docket Entry Info': [{'Filed Date': '03/16/2021', 'Entry': 'Judgment for Plaintiff', 'Filer': 'Magisterial District Court 05-2-13', 'Applies To': 'Lakisha Gray, Defendant'}, {'Filed Date': '03/16/2021', 'Entry': 'Judgment Entered', 'Filer': 'Magisterial District Court 05-2-13', 'Applies To': 'Lakisha Gray, Defendant'}, {'Filed Date': '01/14/2021', 'Entry': 'Landlord/Tenant Complaint Filed', 'Filer': 'McKeesport Housing Authority'}], 'Calendar Events': [{'Case Calendar Event Type': 'Recovery of Real Property Hearing', 'Schedule Start Date': '01/26/2021', 'Start Time': '8:30 am', 'Judge Name': 'Magisterial District Judge Eugene F. Riazzi Jr.', 'Schedule Status': 'Continued'}, {'Case Calendar Event Type': 'Recovery of Real Property Hearing', 'Schedule Start Date': '03/16/2021', 'Start Time': '8:30 am', 'Judge Name': 'Magisterial District Judge Eugene F. Riazzi Jr.', 'Schedule Status': 'Scheduled'}], 'Parse Date': datetime.datetime(2022, 8, 15, 20, 49, 47, 569710, tzinfo=), 'Docket Number': 'MJ-05213-LT-0000011-2021', 'County': 'Allegheny', 'Court Office': 'MDJ-05-2-13', 'Filing Date': '01/14/2021', 'metadata': {'Docket Number': 'MJ-05213-LT-0000011-2021', 'Court Office': 'MDJ-05-2-13', 'Short Caption': 'McKeesport Housing Authority v. Gray, Lakisha', 'Filing Date': '01/14/2021', 'County': 'Allegheny', 'Case Status': 'Active', 'Primary Participants': 'Gray, Lakisha', 'Docket Sheet': 'MDJReport.ashx?docketNumber=MJ-05213-LT-0000011-2021&dnh=3%2fMAc8Dx57gJeXaRgs23oA%3d%3d', 'Scrape Date': datetime.datetime(2021, 1, 19, 19, 45, 16, 205472, tzinfo=)}} ```
corresponding raw JSON ``` {"href":"https://services.pacourts.us/public/v1/cases/MJ-05213-LT-0000011-2021","actualReceivedDate":null,"arrestDate":null,"claimAmount":8929.0,"docketNumber":"MJ-05213-LT-0000011-2021","shortCaption":"McKeesport Housing Authority v. Gray, Lakisha","longCaptionLines":["McKeesport Housing Authority"," v.","Lakisha Gray"],"caseFlags":[],"complaintDate":null,"currentProgramStatus":"","dispositionDate":"2021-03-16T00:00:00-04:00","docketedDate":null,"filingDate":"2021-01-14T10:48:00-05:00","initiationDate":"2021-01-14T10:48:00-05:00","initiatingDocumentName":null,"isNebbiaInEffect":false,"isSealedRecord":false,"lastPaymentDateTime":"2021-01-14T10:53:03-05:00","lowerCourtApplealFilingDate":null,"lowerCourtAppealFilingDate":null,"orderApplicationDate":null,"orderType":null,"originatingDocketNumbers":null,"primaryLtn":null,"primaryOtn":null,"primaryPoliceIncidentNo":null,"rootOriginatingDocumentNumber":null,"statusName":"Closed","totalLastPayment":-208.58,"assessmentGrandTotals":{"currentBalance":0.0,"totalAdjustments":0.0,"totalAssessments":208.58,"totalNonMonetary":0.0,"totalPayments":-208.58,"assessmentCategoryTotals":[{"category":"Costs/Fees","currentBalance":0.0,"totalAdjustments":0.0,"totalAssessments":187.48,"totalNonMonetary":0.0,"totalPayments":-187.48,"assessments":[{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":6.0,"totalNonMonetary":0.0,"totalPayments":-6.0,"type":"ATJ - Case","transactions":[{"amount":6.0,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976590"}},{"amount":-6.0,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977473"}}],"id":{"caseSystem":"MDJS","id":884611871}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":2.5,"totalNonMonetary":0.0,"totalPayments":-2.5,"type":"CJES - Case","transactions":[{"amount":2.5,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976591"}},{"amount":-2.5,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977474"}}],"id":{"caseSystem":"MDJS","id":884611872}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":65.35,"totalNonMonetary":0.0,"totalPayments":-65.35,"type":"Civil Filing - Commonwealth Cost - HB627 (Act 167 of 1992)","transactions":[{"amount":65.35,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976592"}},{"amount":-65.35,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977481"}}],"id":{"caseSystem":"MDJS","id":884611873}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":74.65,"totalNonMonetary":0.0,"totalPayments":-74.65,"type":"Filing Fee (Civil)","transactions":[{"amount":74.65,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976593"}},{"amount":-74.65,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977482"}}],"id":{"caseSystem":"MDJS","id":884611874}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":21.25,"totalNonMonetary":0.0,"totalPayments":-21.25,"type":"JCPS - Case","transactions":[{"amount":21.25,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976594"}},{"amount":-21.25,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977475"}}],"id":{"caseSystem":"MDJS","id":884611875}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":8.0,"totalNonMonetary":0.0,"totalPayments":-8.0,"type":"Judicial Computer Project - Case","transactions":[{"amount":8.0,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976595"}},{"amount":-8.0,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977476"}}],"id":{"caseSystem":"MDJS","id":884611876}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":2.5,"totalNonMonetary":0.0,"totalPayments":-2.5,"type":"OAG - JCP - Case","transactions":[{"amount":2.5,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215976596"}},{"amount":-2.5,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977477"}}],"id":{"caseSystem":"MDJS","id":884611877}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":5.0,"totalNonMonetary":0.0,"totalPayments":-5.0,"type":"Constable Education Training Act","transactions":[{"amount":5.0,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215977127"}},{"amount":-5.0,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977483"}}],"id":{"caseSystem":"MDJS","id":884612105}},{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Costs/Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":2.23,"totalNonMonetary":0.0,"totalPayments":-2.23,"type":"Postage - Case","transactions":[{"amount":2.23,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215977160"}},{"amount":-2.23,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977484"}}],"id":{"caseSystem":"MDJS","id":884612136}}]},{"category":"Server Fees","currentBalance":0.0,"totalAdjustments":0.0,"totalAssessments":21.1,"totalNonMonetary":0.0,"totalPayments":-21.1,"assessments":[{"assessmentDateTime":"2021-01-14T00:00:00-05:00","category":"Server Fees","currentBalance":0.0,"isSubrogated":false,"totalAdjustments":0.0,"totalAssessments":21.1,"totalNonMonetary":0.0,"totalPayments":-21.1,"type":"Server Fee","transactions":[{"amount":13.0,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215977272"}},{"amount":5.6,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215977273"}},{"amount":2.5,"receiptDateTime":null,"receiptNumber":null,"id":{"caseSystem":"MDJS","id":"1215977274"}},{"amount":-13.0,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977478"}},{"amount":-5.6,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977479"}},{"amount":-2.5,"receiptDateTime":"2021-01-14T10:53:03-05:00","receiptNumber":"05213-2021-R0000205","id":{"caseSystem":"MDJS","id":"1215977480"}}],"id":{"caseSystem":"MDJS","id":884612199}}]}]},"caseCategory":{"name":"Landlord/Tenant","docketType":{"category":null,"name":"Landlord/Tenant","id":{"caseSystem":"MDJS","id":"Landlord/Tenant"}},"id":{"caseSystem":"MDJS","id":9}},"county":{"name":"Allegheny","judicialDistrict":{"name":"Allegheny","id":{"caseSystem":"CPCMS","id":"05"}},"id":{"caseSystem":"CPCMS","id":"Allegheny"}},"courtOffice":{"acceptsOnlineBailPayments":true,"acceptsOnlinePayments":true,"allowsPaymentsOnReferredPaymentPlans":false,"courtOfficeType":"MagisterialDistrict","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","officeCode":"MDJ-05-2-13","county":{"name":"Allegheny","judicialDistrict":{"name":"Allegheny","id":{"caseSystem":"CPCMS","id":"05"}},"id":{"caseSystem":"CPCMS","id":"Allegheny"}},"court":{"courtType":"MDJ","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","sortOrder":1,"id":{"caseSystem":"MDJS","id":"5213"}},"id":{"caseSystem":"MDJS","id":"5213"}},"currentProcessingStatus":{"processingStatus":"Completed","statusChangeDateTime":"2021-03-16T13:32:00-04:00","id":{"caseSystem":"MDJS","id":883017571}},"finalDispositionRegistryEntry":{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"2021-03-16T13:32:00-04:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":"Landlord/Tenant Disposition Recorded for All Participants","sequenceNumber":1,"appliesTo":[{"participantRole":"Defendant","participantName":{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}},"id":{"caseSystem":"MDJS","id":1166739338}}],"comments":[],"filers":[],"service":[],"id":{"caseSystem":"MDJS","id":1186951756}},"latestCaseEvent":{"nextEvent":"Judgment Entered","nextEventDueDateTime":null,"id":{"caseSystem":"MDJS","id":"1194116370"}},"lowerTribunalCategory":{"name":null,"id":null},"municipality":{"name":null,"county":null,"id":null},"nameOfAssignedJudge":{"displayName":"Riazzi, Eugene F. Jr.","documentName":"Magisterial District Judge Eugene F. Riazzi Jr.","firstName":"Eugene","lastName":"Riazzi","middleName":null,"title":"Magisterial District Judge","id":{"caseSystem":"MDJS","id":4821}},"reArgumentDispositionRegistryEntry":{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"0001-01-01T00:00:00-05:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":null,"sequenceNumber":0,"appliesTo":null,"comments":null,"filers":null,"service":null,"id":null},"reArgumentPetitionRegistryEntry":{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"0001-01-01T00:00:00-05:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":null,"sequenceNumber":0,"appliesTo":null,"comments":null,"filers":null,"service":null,"id":null},"remittalRegistryEntry":{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"0001-01-01T00:00:00-05:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":null,"sequenceNumber":0,"appliesTo":null,"comments":null,"filers":null,"service":null,"id":null},"rootOriginatingAuthority":{"name":null,"id":null},"rootOriginatingOrganizationName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"supremeCourtInformation":{"allocaturDocketNumber":null,"allocaturGrantDate":null,"allocaturGrantOrderLines":null,"appealedOrderDate":null,"appealJurisdictionNotedDate":null,"appealOfParagraphLines":null,"commentLines":null,"intermediateCourtName":null,"intermediateDisposition":null,"intermediateDocketNumber":null,"reArgumentDeniedDate":null,"reArgumentDisposition":null,"referringCourtName":null,"panelMemberNames":null,"id":null},"briefingSchedule":[],"caseAssociations":[],"caseBails":[],"caseCalendarEvents":[{"caseCalendarEventType":"Recovery of Real Property Hearing","commentLines":[],"scheduleStatus":"Continued","startDateTime":"2021-01-26T08:30:00-05:00","locationName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"presidingAuthorityName":{"displayName":"Riazzi, Eugene F. Jr.","documentName":"Magisterial District Judge Eugene F. Riazzi Jr.","firstName":"Eugene","lastName":"Riazzi","middleName":null,"title":"Magisterial District Judge","id":{"caseSystem":"MDJS","id":4821}},"id":{"caseSystem":"MDJS","id":"1187610591+1187610591"}},{"caseCalendarEventType":"Recovery of Real Property Hearing","commentLines":["Per court order"],"scheduleStatus":"Scheduled","startDateTime":"2021-03-16T08:30:00-04:00","locationName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"presidingAuthorityName":{"displayName":"Riazzi, Eugene F. Jr.","documentName":"Magisterial District Judge Eugene F. Riazzi Jr.","firstName":"Eugene","lastName":"Riazzi","middleName":null,"title":"Magisterial District Judge","id":{"caseSystem":"MDJS","id":4821}},"id":{"caseSystem":"MDJS","id":"1187611308+1187611308"}}],"caseHistory":[{"href":"https://services.pacourts.us/public/v1/cases/MJ-05213-LT-0000011-2021","docketNumber":"MJ-05213-LT-0000011-2021","shortCaption":"McKeesport Housing Authority v. Gray, Lakisha","filingDate":"2021-01-14T10:48:00-05:00","statusName":"Closed","courtOffice":{"acceptsOnlineBailPayments":true,"acceptsOnlinePayments":true,"allowsPaymentsOnReferredPaymentPlans":false,"courtOfficeType":"MagisterialDistrict","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","officeCode":"MDJ-05-2-13","county":{"name":"Allegheny","judicialDistrict":{"name":"Allegheny","id":{"caseSystem":"CPCMS","id":"05"}},"id":{"caseSystem":"CPCMS","id":"Allegheny"}},"court":{"courtType":"MDJ","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","sortOrder":1,"id":{"caseSystem":"MDJS","id":"5213"}},"id":{"caseSystem":"MDJS","id":"5213"}},"id":{"caseSystem":"MDJS","id":725607144}}],"caseOriginations":[],"caseParticipants":[{"fingerprintStatus":"Unknown","gender":null,"ifpStatusType":null,"isProSe":false,"primaryDateOfBirth":null,"race":null,"wasAdvisedOfRightToApplyForCounsel":false,"wasPublicDefenderApplicationProvided":false,"wasPublicDefenderRequested":false,"participantName":{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}},"role":{"name":"Defendant","sortOrder":1,"id":{"caseSystem":"MDJS","id":"Defendant"}},"caseMemberAddresses":[{"addressLines":["McKeesport, PA 15132"],"addressType":"Home","primaryFaxNumber":null,"primaryPhoneNumber":null,"secondaryPhoneNumber":null,"receivesEMail":false,"receivesFax":false,"receivesMail":true,"employerName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"id":{"caseSystem":"MDJS","id":"783029463"}}],"aliases":[{"displayName":"Gray, Lakisha M.","documentName":"Lakisha M. Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":720476266}}],"id":{"caseSystem":"MDJS","id":796753480}},{"fingerprintStatus":"Not Applicable","gender":null,"ifpStatusType":null,"isProSe":false,"primaryDateOfBirth":null,"race":null,"wasAdvisedOfRightToApplyForCounsel":null,"wasPublicDefenderApplicationProvided":null,"wasPublicDefenderRequested":null,"participantName":{"displayName":"McKeesport Housing Authority","documentName":"McKeesport Housing Authority","firstName":null,"lastName":"McKeesport Housing Authority","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":710021068}},"role":{"name":"Plaintiff","sortOrder":1,"id":{"caseSystem":"MDJS","id":"Plaintiff"}},"caseMemberAddresses":[{"addressLines":["McKeesport, PA 15132"],"addressType":"Business","primaryFaxNumber":null,"primaryPhoneNumber":null,"secondaryPhoneNumber":null,"receivesEMail":false,"receivesFax":false,"receivesMail":false,"employerName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"id":{"caseSystem":"MDJS","id":"783029462"}},{"addressLines":["McKeesport, PA 15132"],"addressType":"Business","primaryFaxNumber":null,"primaryPhoneNumber":null,"secondaryPhoneNumber":null,"receivesEMail":false,"receivesFax":false,"receivesMail":true,"employerName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"id":{"caseSystem":"MDJS","id":"783245572"}}],"aliases":[],"id":{"caseSystem":"MDJS","id":796753479}}],"caseParticipantAttorneys":[],"caseProcessingStatuses":[{"processingStatus":"Completed","statusChangeDateTime":"2021-03-16T13:32:00-04:00","id":{"caseSystem":"MDJS","id":883017571}},{"processingStatus":"Awaiting Recovery of Real Property Hearing","statusChangeDateTime":"2021-01-14T10:48:00-05:00","id":{"caseSystem":"MDJS","id":880831349}}],"caseSessionAssignments":[],"caseTypes":[],"civilDispositions":[{"canHaveJudgment":true,"disposition":"Judgment for Plaintiff","dispositionDateTime":"2021-03-16T13:32:00-04:00","grantPossessionIfJudgmentNotSatisfied":false,"grantsPossession":true,"courtCase":{"href":"https://services.pacourts.us/public/v1/cases/MJ-05213-LT-0000011-2021","docketNumber":"MJ-05213-LT-0000011-2021","shortCaption":"McKeesport Housing Authority v. Gray, Lakisha","filingDate":"2021-01-14T10:48:00-05:00","statusName":"Closed","courtOffice":{"acceptsOnlineBailPayments":true,"acceptsOnlinePayments":true,"allowsPaymentsOnReferredPaymentPlans":false,"courtOfficeType":"MagisterialDistrict","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","officeCode":"MDJ-05-2-13","county":{"name":"Allegheny","judicialDistrict":{"name":"Allegheny","id":{"caseSystem":"CPCMS","id":"05"}},"id":{"caseSystem":"CPCMS","id":"Allegheny"}},"court":{"courtType":"MDJ","displayName":"Magisterial District Court 05-2-13, McKeesport","name":"MDJ-05-2-13","sortOrder":1,"id":{"caseSystem":"MDJS","id":"5213"}},"id":{"caseSystem":"MDJS","id":"5213"}},"id":{"caseSystem":"MDJS","id":725607144}},"defendantName":{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}},"plaintiffName":{"displayName":"McKeesport Housing Authority","documentName":"McKeesport Housing Authority","firstName":null,"lastName":"McKeesport Housing Authority","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":710021068}},"id":{"caseSystem":"MDJS","id":703722607}}],"civilJudgments":[{"disposition":"Judgment for Plaintiff","dispositionDateTime":"2021-03-16T13:32:00-04:00","isJointlySeverally":false,"judgmentDate":"2021-03-16T00:00:00-04:00","monthlyRentAmount":773.0,"totalJudgmentAmount":9135.35,"components":[{"adjustedAmount":8929.0,"amount":8929.0,"depositApplied":0.0,"typeName":"Rent in Arrears","id":{"caseSystem":"MDJS","id":704762061}},{"adjustedAmount":206.35,"amount":206.35,"depositApplied":0.0,"typeName":"Costs","id":{"caseSystem":"MDJS","id":704762062}}],"defendantNames":[{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}}],"plaintiffNames":[{"displayName":"McKeesport Housing Authority","documentName":"McKeesport Housing Authority","firstName":null,"lastName":"McKeesport Housing Authority","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":710021068}}],"id":{"caseSystem":"MDJS","id":702200476}}],"confinements":[],"crossCourtCaseHistory":[],"dispositionEvents":[],"localNumbers":[],"offenses":[],"originalRecordContents":[],"paymentPlans":[],"registryEntries":[{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"2021-01-14T10:48:00-05:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":"Landlord/Tenant Complaint Filed","sequenceNumber":1,"appliesTo":[],"comments":[],"filers":[{"filerType":"Case Participant","participantRole":"Plaintiff","participantName":{"displayName":"McKeesport Housing Authority","documentName":"McKeesport Housing Authority","firstName":null,"lastName":"McKeesport Housing Authority","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":710021068}},"representing":[],"id":{"caseSystem":"MDJS","id":1180914522}}],"service":[{"sentMethodName":"First Class","sentDateTime":"2021-01-14T10:51:00-05:00","status":null,"statusDateTime":null,"servedByName":{"displayName":null,"documentName":null,"firstName":null,"lastName":null,"middleName":null,"title":null,"id":null},"servedToName":{"displayName":"McKeesport Housing Authority","documentName":"McKeesport Housing Authority","firstName":null,"lastName":"McKeesport Housing Authority","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":710021068}},"id":{"caseSystem":"MDJS","id":725007867}}],"id":{"caseSystem":"MDJS","id":1180417816}},{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"2021-03-16T00:00:00-04:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":"Judgment Entered","sequenceNumber":1,"appliesTo":[{"participantRole":"Defendant","participantName":{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}},"id":{"caseSystem":"MDJS","id":1166739427}}],"comments":[],"filers":[{"filerType":"Court","participantRole":null,"participantName":{"displayName":"Magisterial District Court 05-2-13, McKeesport","documentName":"Magisterial District Court 05-2-13","firstName":null,"lastName":"Magisterial District Court 05-2-13","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":491}},"representing":[],"id":{"caseSystem":"MDJS","id":1187449713}}],"service":[],"id":{"caseSystem":"MDJS","id":1186951851}},{"description":null,"documentTitle":null,"documentDateTime":null,"documentNumber":null,"filedDateTime":"2021-03-16T13:32:00-04:00","isSealed":false,"orderExitedDate":null,"registryEntryCode":"Judgment for Plaintiff","sequenceNumber":1,"appliesTo":[{"participantRole":"Defendant","participantName":{"displayName":"Gray, Lakisha","documentName":"Lakisha Gray","firstName":"Lakisha","lastName":"Gray","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":718569864}},"id":{"caseSystem":"MDJS","id":1166739337}}],"comments":[],"filers":[{"filerType":"Court","participantRole":null,"participantName":{"displayName":"Magisterial District Court 05-2-13, McKeesport","documentName":"Magisterial District Court 05-2-13","firstName":null,"lastName":"Magisterial District Court 05-2-13","middleName":null,"title":null,"id":{"caseSystem":"MDJS","id":491}},"representing":[],"id":{"caseSystem":"MDJS","id":1187449617}}],"service":[],"id":{"caseSystem":"MDJS","id":1186951755}}],"sentenceLinks":[],"id":{"caseSystem":"MDJS","id":725607144}} ```
josh-chamberlain commented 3 months ago

Given the nested nature of the data and flexible nature of our questions + purposes, what if we just put the JSON, mostly unaltered, into a place where elasticsearch could get at it? We could even use elastic cloud to test it out, rather than hosting our own.