PantherView icon indicating copy to clipboard operation
PantherView copied to clipboard

Display relevant data for datasets we have already

Open RitwikGupta opened this issue 7 years ago • 8 comments

Depending on the marker, some display full JSON while others are showing the parsed incident, such as "2709(a)(2) Harassment by Following Person in Public Place(s)"

RitwikGupta avatar Jan 24 '17 16:01 RitwikGupta

It's for the two different datasets: 311 was stringified and police was just taking the incident itself. But, yeah we need to standardize this whole popup so that there's some kind of table for the fields and their values, even though the city 311 and police will have different data

vonbearshark avatar Jan 24 '17 17:01 vonbearshark

Maybe we could generalize it to a "topic" property? In the 331 we have a "title" field I think could do nicely, and keep the current police pin popup.

coltonb avatar Jan 24 '17 19:01 coltonb

It would be nice to display more fields in the markers, not just the topic/title. Date and things seem important to show. Also, some things aren't being parsed properly so the whole JSON is being displayed.

RitwikGupta avatar Jan 24 '17 19:01 RitwikGupta

++ I think there should be a title field that gets a special heading, but I think that we should display other fields, too. Some things are shared between 311 and police--i.e. they both have a date field, so that could be given a unique style like the title heading, but the rest could just be in a nice-looking key-value table.

@RitwikGupta again, right now we have two datasets uploaded by two different people, so it's parsed but was decided separately to just stringify the data, while the other decided to just have the title.

Those pop-ups can be styled with HTML through Leaflet, so this shouldn't be too bad.

vonbearshark avatar Jan 24 '17 20:01 vonbearshark

The JSON garbage has been fixed, but we still need delineate the data we care about for the datasets we already have. #26 (closing with #79 ) should provide a mechanism for actually creating this HTML, but we'll need someone to manually find the fields we care about and give them labels for what we have so far. Each needs an appropriate title, too. Although I think the ones we have for that are fine right now

vonbearshark avatar Jan 27 '17 18:01 vonbearshark

@GavinFreud, interested in taking this one? It's going to be a big one, so you might want to start thinking about it now, although we're still waiting on #79 .

One more thing: the pins need to have their relevant information displayed in a friendly format both as a pin popup and as a table (for both #61 and #18 ). If you have to alter the function that generates the HTML to make it easy to accomodate both of these displays, that'd be fine, I think. A marker could be a pin on a map or it could be an item in a table, just a div with an inner table similar to the popup, but stylistically bigger, likely.

So altogether you need to 1. Find all the relevant information for each dataset we get from the WPRDC (relevant at your discretion--whatever you think is interesting) 2. Find a nice label for all the relevant fields 3. use the HTML generating function to create a .popup for each dataset 4. create a table representation, too (which may mean creating a function that generates HTML into a table).

I'll help you as you go.

vonbearshark avatar Feb 01 '17 16:02 vonbearshark

@vonbearshark sounds fun! Sure i'd love to give it a go!

RamIyer1998 avatar Feb 01 '17 16:02 RamIyer1998

@GavinFreud, we have another member with a similar background as yours interested in this Issue, @NicholasCorrado. Since this Issue is so big, I'm going to assign you both to it. I encourage you both to Start a Slack conversation, make a game plan, and start working on it together. For example, maybe one of you can handle choosing which fields are significant, and the other can handle using those to generate the HTML! Feel free to add me to that Slack channel or ask me as many questions as you need

vonbearshark avatar Feb 01 '17 20:02 vonbearshark