hackoregon / emergency-response

Simulations, Models, and Visualizations of Portland Fire and Rescue data
11 stars 10 forks source link

Data Cleanup #70

Closed russellgould closed 7 years ago

russellgould commented 7 years ago

As @rcallihan and @futurechris mentioned in #67 there have been some odd fields found in the data. Feel free to post whatever you find here so we can discuss in a central location.

BrianHGrant commented 7 years ago

Incidents are joined to Alarmlevels based on a 'alarmlevel_id' primary key. Alarm level 'description' and 'id_911' fields begin at 0 while 'alarmlevel_id' begins at 1 ie:

{
"alarmlevel_id": 1,
"description": 0,
"id_911": 0
},

Can these be made to match, prevent possible off by one errors?

russellgould commented 7 years ago

It definitely could be done, but I'm not sure if it should be. I only hesitate since it's not exactly an error, rather just a semantic issue with how PFR decided to design their DB. I can look into it to see if it would matter at all to change on our end, though that might not be until our next meeting Wednesday.

BrianHGrant commented 7 years ago

I see, I was not sure if this was something we had added, if it is in the original db, I'd be inclined not to change as well. As you said more of semantics, which can be handled on the frontend.

BrianHGrant commented 7 years ago

Just going through building endpoints for the raw data, here are the questions/possible issues I came across. Listing here so we can discuss at meeting (though markdown might not display them):

  1. should there be a join between incident.foundsituation and situationfound.situationfound_id?

  2. typenaturecode has trailing spaces on description, id_911:

    { "typenaturecode_id": 1, "description": "ABDOMINAL/1ST RESP ", "id_911": "AB3 ", "category": 3, "nemsis": "400" },

  3. timedesc has trailing spaces on description, some of the id_911 have odd values including 3 as examples:

    { "timedesc_id": 1, "description": "Initiated ", "id_911": null }, { "timedesc_id": 2, "description": "Entered ", "id_911": "ENTRY:" }, { "timedesc_id": 3, "description": "Dispatched ", "id_911": "DISP " },

    on id_911 for timedesc_id 2 the colon is part of string? some such as r timedesc_id 3 have trailing whitespace

  4. stations.description has trailing whitespace

russellgould commented 7 years ago

Awesome! Thanks for this, I thought I trimmed all of the descriptions, so I'll see what the deal is...

russellgould commented 7 years ago

Removed all that whitespace. Let me know if anyone finds any more