HN user

sxywu

91 karma
Posts7
Comments11
View on HN

Recommendations from my coworker (https://twitter.com/Amust1987):

Try to read this paper. They mentioned several graph layout algorithms.I think you can also try to ask them the source code. http://www.cs.ubc.ca/labs/imager/tr/2006/Archambault_TopoLay...

Also this paper might be interesting as well. It concludes and categories graph layouts algorithms. Depending what information you want to visualize and what the data looks like, you can pick up different algorithms. http://profs.etsmtl.ca/mmcguffin/research/2012-mcguffin-simp...

If you need to re-generate the graph positions on every reload, the static force layout is helpful (http://bl.ocks.org/mbostock/1667139). The code of interest is: force.start(); for (var i = n; i > 0; --i) force.tick(); force.stop(); Where n is the number of iterations you want it to go through. Depending on the complexity of your graph, you may or may not arrive at optimal layout (nodes may overlap), but does calculate and render quickly.

Another key is to update positions of nodes and links only at calculation end, rather than at each tick. This means that user may have to wait a couple seconds before seeing the graph, but will save your browser from having to update the DOM at each tick (which could be thousands of times across thousands of elements).

But the best is still if you don't need to re-calculate the positions (no new nodes ever show up, and no nodes are ever deleted), going with what me_bx said.

I have added a toggle for including a second income earner into the equation/bar graph. The figure is an average of the median per capita income of four Bay Area counties - hopefully this will give better context.

Also, more explicit "Customize" buttons to encourage people to play around with and edit the data :D

Thanks darklajid! The health care costs is total insurance premiums and total out-of-pocket costs[1]. For a BART worker, it may only be upwards of $92, as they have a fixed health care contribution. For that reason, I have made the costs customizable, so you can edit and input any number you feel reasonable (I didn't want to make any personal assumptions with the numbers).

[1]http://www.epi.org/publication/wp297-2013-family-budget-calc...

I am going to implement a simple toggle option to include a second income (which I will research into what the median/average/reasonable salary in the Bay Area to be) on the bar graph - hopefully that solves the discrepancy!

I love it. I was just wondering how I could possibly include a second income in the graph, and your suggestion is just perfect - thank you!

As for the costs, they're actually customizable - you can choose it from the dropdown. I will also work to make that more explicit.

I took the cost of living from Economic Policy Institute's Family Budget Calculator, and their documentation [1] is particularly interesting to sift through.

In particular, the child care costs are apparently broken down like this: One parent, one child = cost of 4-year-old care One parent, two children = cost of 4-year-old care + cost of one school-age child One parent, three children = cost of 4-year-old care + cost of two school-age children Two parents, one child = cost of 4-year-old care Two parents, two children = cost of 4-year-old care + cost of one school-age child Two parents, three children = cost of 4-year-old care + cost of two school-age children

And they assume the school-age children to require both before-school and after-school care.

As for comparing a cost of living for a two-parent household with the income of a single worker, I could only make that assumption because...how would I be able to extrapolate the household income of a two-parent family from BART salaries? As imperfect a solution as it is, I still hope that it will give insight, since my hope was not to shove any particular opinions on anyone, but rather just a tool for exploration.

[1] http://www.epi.org/publication/wp297-2013-family-budget-calc...

Ah yes, the cost of living figures I have gathered from http://www.epi.org/resources/budget/. In my footnotes I address that for BART employees health insurance is $92/mo, but because I wasn't so sure what their co-pays and other expenses may be, I left in the health insurance figures from EPI's budget calculator.

To account for my uncertainty, I built in a "Custom" option in the dropdowns, so you can play around with what you think is a fair cost of living for a BART employee, and how those numbers compare to their salaries and the proposal figures.

Ah, but the fade is on purpose, because I wanted to show that while they do have a high "cost of employment", what they truly pocket annually isn't as much. For that, the most important figure is the base salary, which is a solid block. The other things like pension and medical are either money they don't see until the future, or money they don't use unless they have a medical emergency.

I think "average cost including benefits" is the important part. For me, I was concerned with finding out what the average base salary was for a union employee - and not just any union employee, but those that are affiliated with SEIU and ATU, since those are the ones in negotiation. What I found was that the average base salaries were between 45k to 70k for these SEIU and ATU workers.

A lot of the information on salaries that's published out there include overtime, pension, medical benefits, PTO, etc., but that's the total cost for BART, and not necessarily the annual income that an employee pockets. For me, I wanted to see if a BART employee could make a comfortable living in the bay area, and for that, things like overtime and pension aren't as relevant since you either have to work more to earn them, or you don't really see them until the future. Thus, the much lower 45k to 70k I arrived at.

It's fun to explore this if you can: https://github.com/enjalot/bart/blob/master/data/bart-comp-a... It's a list of BART employees' total cost of employment, scraped from http://www.mercurynews.com/salaries/bay-area