Open theecrit opened 4 years ago
I don't have a detailed understanding of the TruckTracker data, but here goes... An observation is defined as:
I propose two new tables:
Polluter
name
: str, e.g., "2-axle", "bobtail"description
: str, e.g., "A semi-truck with two axles", "Whatever a bobtail is"PolluterObservation
polluter
: foreign key to Polluter
time
: datetimelocation
: latlonuser
: foreign key to User
uploaded_at
: datetimeduration
: timedelta, e.g., 4 hoursnote
: str, e.g., "Truck sitting there for 4 hours"@motching Am I missing anything? I think that these two tables would add a capacity to store stationary observations that do not have numerical values attached to them, which could be useful for other kinds of data in the future.
@r-b-g-b thanks for picking this up! My comments and questions:
== General ==
id
column in every table as a unique primary key.
== Polluter ==
Polluter
and not Truck
, I think we should have a type
column with the value truck
. It's outside of the scope of my thinking now, what kind of other polluters we should include, but I like the idea of aggregating data from different sources.license plate
and transport company
field, both string and allowed to be null.== PolluterObservation ==
moving_p
and engine_running_p
. I don't have a strong preference how we store this though, frontend will map to whatever.This is for now, I'll make a branch and poke around a bit, probably will have more thoughts after that.
Thanks for starting to unpack this. Before we problem-solve this particular data set, though, I think it would be good to have a defined approach to solving for new additions in general. My suggestion:
So we have the following data points coming in from TT:
Not explicitly collected but potentially extrapolated in the future:
Mapping, then, looks like:
I'd argue that "Vehicle type" should live in a new table called "Sources," which could allow us to scale this table to incorporate other polluting sources beyond vehicles. But we should definitely have a conversation with WOEIP about this, to understand a bit more about use cases.
Let's chat about all this tonight. :)
Description
We want to create a new table in the database to accommodate the data coming from Trucker Tracker, a stand-alone app built for our partner, WOEIP, that allows West Oaklanders to report truck activity in their neighborhood. Truck Tracker will send its data to our database so it can be seen together with the AQ data.
Acceptance criteria
Related documentation
TBD
Dependencies and assumptions