Closed mmontesanonyc closed 1 year ago
I think there are a couple of first steps here that I'd like to get moving on -
index.html
) - can this be adapted/revised for council districts? Council districts geojson are here. Shell page built here. Right now it just has a very rough interaction pattern built into it - @cgettings, can you build the initial locator feature? Enter address, get council district?
I poked around with this geocoder that Grant had initially put together - it uses the nyc-lib npm package maintained by DOITT, part of the NYC Core Framework.
anyway, it's almost all automatic - it handles the geocoding, and returns a map.location
object. map.location.data
is full of a bunch of info we can use (much more than pictured here).
So here's the challenge, @cgettings - grabbing council district, name, neighborhoods, and email address from this page.
Would love if we can make this a js object so that the geocoding can get us the council district, and we can match/filter the js object to return the council member's name, neighborhoods, email address.
This will be really easy with R. I can write something for the EHDP-data repo, then we can grab the JSON like all the other data.
🙏 that'll be great, thanks!
Basic functionality is in place, though will note that the JS-generated email address isn't accurate (for districts with a single digit the email address is just District1@...
but the code-generated email addresses are District01@...
) and the text formatting is not idea. Plus, I'm fiddling around with some better display/interaction-flow approaches.
I've done a bunch of fiddling to iron out formatting issues, and I think the only thing outstanding is getting CM's names in there - so @cgettings if you're able to do that R scrape and generate that file, then I'll add a few more fields from that file (CM's names, neighborhood names).
At that point I'll want to merge to development
, share with Mike and Cari, and have a conversation about what other kinds of actions we can support.
Will be good to brainstorm some additional text to incorporate to this, too - I'm sure I didn't get it right on the first time. And, we could also build a GA4 event so that we can track the number of sent emails (or at least, the number of times somebody clicks "send emails" - the final event is out of our hands).
Heya, I'd like to get moving on this - think you can run that scrape @cgettings ? Or maybe you'd like to delegate to AM? Can chat in today's site meeting.
Merging this to development
so we can demo to folks.
A couple things are sliiiightly wonky.
I'm sure this is iron-outable, but also want to get some conversations moving in the review chain.
NB: I moved the email widget to a subpage of the Take-Action section, so that we can have the dialog as another subpage.
Email function
Got this into a modal fired by a button on the DE, below keywords. It works a little bit awkwardly:
textEntry.textContent = textDestination.innerText
and then doing var body = textEntry.textContent
(more or less). Revising this functionality... Some notes:
Notes for next week:
allReps
JS object or something like thatHi all, big updates to Take Action are up on the feature-take-action
branch - serve that up and go to ... `/EH-dataportal/take-action/email-electeds.
A few requests:
@cgettings @etorem @sportsmanam
@etorem thanks! i think that first one is a real issue for sure - I've got to make sure that somebody can go back to the beginning and re-do if they want to.
Create crosswalk as yaml file in /data directory - for /data-explorer
content. (Or all content? Start with data-explorer
and go from there.)
Crosswalk: indicators to relevant 311 topics with KA-codes.
We'll have multiple options for many indicators; instead of 311 button, 311 button launches modal with specific options. Can also include "search 311 for [general option]" and use search result format, eg https://portal.311.nyc.gov/search/?q=housing
Requested: remove 'email' functionality, retain tips.
@cgettings, @etorem - mocked up the 311 jawn in feature-311-links
branch. Please take a look and LMK thoughts - thanks!
That's great - I think it looks good! One thing to consider is that, although the first indicator in the list loads automatically for some topics; you have to actually click on it for the 311 menu options to appear at the bottom of the page. I wonder if that means people might not notice it's there if they are just browsing the first available indicator instead of going deeper into the other datasets?
Some examples:
If you click on Air Quality > Asthma, this doesn't occur and the button appears at the bottom.
If you click on Healthy eating > Unhealthy food access, this does occur and the buttons do not appear until you click on the first indicator. This also occurs with Climate > Daytime Summer Surface Temperatures
yeah, thanks for spotting that - I've was fiddling with some things in the loading order, but couldn't quite get it... I think I have now.
OK, 311 is merged into dev - I'd like to share this with some folks to get their take on it.
NB: consolidated implementation on dev, awaiting go-ahead on prod, all merged together at feature-take-action
:
I went with:
badge-primary
) Closing, deployed!
Some details and backstory here.
A Take Action page would let a user:
We can also build out other Take Action functions, including a 311 widget, and links to a limited set of advocacy orgs/CBOs working on relevant issues.