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

Check-in that the format json in CosmosDB still fits for front-end use #96

Open
nicolassaw opened this issue Jul 8, 2024 · 3 comments
Labels
front end website and visualization

Comments

@nicolassaw
Copy link
Contributor

Problem
The current code has changed a lot since the original data was exported and loaded into the current live website. It is likely that the current format of the json and the structure of the CosmosDB container that comes form the current form of code is not what the front-end expects in terms of values and shape (there may be many to one charges per case id or many versions of one case id where the database may expect one).

Goal
Review the front-end code and check in with the front-end developers to ensure the shape of the individual json and the CosmosDB container is properly set up for the front end visualization. Make any necessary changes.

@nicolassaw nicolassaw added the front end website and visualization label Jul 8, 2024
@tpadmanabhan
Copy link

@nreddy216 @nicolassaw will reach out on this ticket

@nicolassaw nicolassaw self-assigned this Jul 19, 2024
@nicolassaw
Copy link
Contributor Author

nicolassaw commented Jul 26, 2024

This is a redacted example of cases from the cosmos db nested-cases-db' and container nested-cases:

{
    case_id: '1231241',
    case_number: '18-23123CR-2',
    attorney_type: 'Retained',
    earliest_charge_date: '2018-04-17',
    has_evidence_of_representation: false,
    charge_desc: [ 'Aggravated Assault' ],
    charge_category: [ 'Violent' ],
    charge_level: [ 'Misdemeanor A' ],
    motions: [],
    id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa',
    _ridxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    _self: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA==/',
    _etag: '"0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"',
    _attachments: 'attachments/',
    _ts: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  },
  {
    case_id: '32145125',
    case_number: '18-3141CR',
    attorney_type: 'Retained',
    earliest_charge_date: '2018-04-16',
    has_evidence_of_representation: false,
    charge_desc: [ 'Destruction of Property' ],
    charge_category: [ 'Property' ],
    charge_level: [ 'Misdemeanor A' ],
    motions: [],
    id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
    _rid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=',
    _self: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    _etag: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"',
    _attachments: 'attachments/',
    _ts: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  },
  {
    case_id: '1352352',
    case_number: '18-161231R',
    attorney_type: 'Court Appointed',
    earliest_charge_date: '2018-04-16',
    has_evidence_of_representation: false,
    charge_desc: [ 'Weapons Offense' ],
    charge_category: [ 'Public Order' ],
    charge_level: [ 'Misdemeanor A' ],
    motions: [],
    id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
    _rid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    _self: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/',
    _etag: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"',
    _attachments: 'attachments/',
    _ts: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  },
  {
    case_id: '13054124',
    case_number: '18-131231CR',
    attorney_type: 'Retained',
    earliest_charge_date: '2018-04-15',
    has_evidence_of_representation: false,
    charge_desc: [ 'Extortion/Threat' ],
    charge_category: [ 'Violent' ],
    charge_level: [ 'Misdemeanor A' ],
    motions: [],
    id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    _rid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    _self: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
    _etag: '"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"',
    _attachments: 'attachments/',
    _ts: 1672031481
  }

This is queried from the same DB and container from our app, but for the “representation by year” table so a condensed view of everything:

  {
    attorney_type: 'Retained',
    has_evidence_of_representation: true,
    year: 2008,
    case_count: 80
  }

We’re also using this DB and container for the last two visualizations on the page: cases-json-db & clean-cases

@nicolassaw
Copy link
Contributor Author

Next steps on this project:

  • Need to scope the visualizations that will be included in the live website visualization. Perhaps may need to consider a design that is less hays-specific
  • Need to identify the precise databases that should be updated for each visualization
  • Need to identify all of the necessary fields and structure of values within each database
  • Need to write code (cleaner and updater modules) to format the data to be prepared for visualization

@nicolassaw nicolassaw moved this from 🔖 To-do to 🏗 In progress in Product - Indigent Defense Stats Jul 28, 2024
@nicolassaw nicolassaw removed their assignment Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end website and visualization
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants