nycehs / nyccas-vis-demo

0 stars 0 forks source link

data: pollutant trends over time #2

Closed mmontesanonyc closed 1 year ago

mmontesanonyc commented 1 year ago

Two things going on here: Button selection delivers a pollutant variable: bc, no, no2, o3, pm, so. @chuskey79 and @cgettings, when you prep the data, we can make sure that the variables in this javascript match the variable names in the data file so that we can match the controls.

It also shows/hides the pollutant-specific source submenus. I'm still fiddling, here, and the source submenus don't do anything yet.

Once we get data into this, we can do some layout of the first visualization (I think we're still deciding between separating by season or by neighborhood), and then get the interaction controlling the data displayed.

mmontesanonyc commented 1 year ago

TREND: two different files -

Pollutant | Source | season | value | time Pollutant | Source | tertile | value | time

chuskey79 commented 1 year ago

is it easier to assign the tertile value a number rather than "high", "medium", etc on your end?

mmontesanonyc commented 1 year ago

Yup, numeric tertile values would be best. Thank you!

chuskey79 commented 1 year ago

What is "time" in the tables? Year?

mmontesanonyc commented 1 year ago

Yeah. I haven't prepped any of the javascript to ingest these files, so feel free to name it whatever makes sense for your end.

chuskey79 commented 1 year ago

OK. they will both be pretty simple.

chuskey79 commented 1 year ago

Uploaded two files: Trend_Tertiles.csv and TrendOverTime.csv

mmontesanonyc commented 1 year ago

Thanks. I'm starting the vis but one thing the library is tripping over is the use of subscript in TrendOverTime.csv. Could you please convert from NO2 to NO2, and same for PM2.5, SO2, and O3?

chuskey79 commented 1 year ago

Updated

mmontesanonyc commented 1 year ago

Thanks!

Lots of styling to come, but here's a rough initial cut.

mmontesanonyc commented 1 year ago

Thanks! Also, re: the files - same goes for the names in Trend_tertiles, in the Source field.

mmontesanonyc commented 1 year ago

Oh, and - for consistency - can you also please rename "Year" in Trend_Tertiles to "Time" ?

chuskey79 commented 1 year ago

Created a new file called TrendChart.csv.

mmontesanonyc commented 1 year ago

Still OOO, but, @chuskey79 thanks for that file. Two quick examples of the vis we have in mind. The interaction (selecting pollutant, source, or choosing the season or tertile display) will be easily controlled from the page. Plenty of styling to refine (plus I'll want to set the axes identical for each cluster), but I wanted to get the basic spec in place.

image image
chuskey79 commented 1 year ago

Thanks.

I think the tertiles needs to be more focused on the differences between tertiles rather than time. We are seeing the seasonal changes in the first one, so that's not as important. Could even average the second set of data by year.

mmontesanonyc commented 1 year ago

If the focus is on the differences between tertiles instead of time, then do we need the tertile view? Because the season view lays out a pretty clear between-tertile difference. The tertile view really just shows us the between-season difference.

Here's where we're at. When githubpages finishes its deployment, you'll be able to see it here and cam embed that URL into the report draft as an iframe.

image

chuskey79 commented 1 year ago

Let's leave in for now. I'll talk with Sarah about it and see if we can get rid. In the end, it kinda just shows something you can assume anyway.