UI-Research / college-affordability.urban.org

0 stars 0 forks source link

For charts or multiples w/ identical titles, allow hardcode img file name override for screenshot #199

Open bchartoff opened 7 years ago

bchartoff commented 7 years ago

Ok @vivhou, this is now up to you to edit some json/jsx files. So, if a chart either:

Then it needs to be manually given a new image download filename. This is done differently for small multiples and normal graphs. For small multiples, a new attribute, imageOverride, must be added to the jsx tag, see: https://github.com/UI-Research/college-affordability.urban.org/commit/bea79aa0f37a91d4147ebc46627dfc12677accb9#diff-48b043b64820abce81fdf88d88367709R54

This attribute is only necessary for the problem graphs described above.

For normal graphs, imageOverride is added as a top level flag in the JSON. See: https://github.com/UI-Research/college-affordability.urban.org/commit/09f8f45a11dfd1c42d8dcf1bf85356b2b34271fe#diff-3dd9a2fe1eeb236ec2199bf60ebc5b52R151

A note on naming conventions

In the two examples I pushed, you see I did two different naming conventions. For the small multiple, since the graph can be uniquely described as title___subtitle, that's what I put in the imageOverride attribute. Text gets converted to nice filenames, but the ___ remains, making the filename

total_student_budget__divided_into_the_portions_of_tuition_and_fees_and_living_expenses_covered_by_grant_aid__and_the_tuition_and_fees_and_living_expenses_remaining__from_1995_96_to_2011_12__in_2011_dollars____public_four_year_institutions.png

For the non multiple example, the graphs with duplicate titles are all in different sections, so the graph can be uniquely described as section___title, or:

low_income_dependent_students____total_published_tuition_and_fee_price_and_total_debt_based_on_time_to_degree.zip

Does that work for you?

bchartoff commented 7 years ago

So, to-do list @vivhou:

  1. Once all edits are final, confirm which charts either have duplicate titles, or only a subtitle (the original list posted in your comment no longer seems accurate)
  2. Add the appropriate imageOverride flag to either the json or jsx files
  3. Once all set, close this issue
vivhou commented 7 years ago

thanks ben, i'll start editing my original comment so that it reflects the most updated chart titles!

vivhou commented 7 years ago

SUBTITLES:

Section: Prices and expenses/tuition and fees 1) 03_0041.json- Public two-year institutions 03_0042.json - Public four-year institutions Section: Prices and expenses/forgone earnings 2) 03_1811.json through 03_1812.json - Ages 18–34, by gender and age 03_1821.json through 03_1822.json - Ages 18–23, by gender and race and ethnicity 03_1831.json through 03_1832.json - Ages 24–34, by gender and race and ethnicity Section: Prices and expenses/net price 3) 03_0201.json - Dollars per full-time student 03_0202.json - Percentage of full-time students 4) 03_0221.json through 03_0225.json- Public four-year institutions 03_02211.json through 03_02215.json - Private four-year institutions 03_02221.json through 03_02225.json - Public two-year institutions 03_02231.json through 03_02235.json - For-profit institutions Section: Financial aid/federal 5) 04_0911.json through 04_0913.json- Dollars per recipient 04_0921.json through 04_0923.json - Dollars per full-time student Section: Cost of educating/endowments 6) 02_0610.json 02_0620.json *contains main title in json

DUPLICATE TITLES Section: Student Profiles 1) "Total Published Tuition and Fee Price and Total Debt Based on Time to Degree" 07_0040.json 07_0080.json 07_0012.json 07_0016.json 07_0020.json

2) "Average Expected Family Contribution, Total Grants, Total Loan, and Earnings and Other Resources Equal Tuition and Fees and Other Expenses" 07_0030.json 07_0007.json 07_0011.json 07_0015.json 07_0019.json

TITLES >200 characters Section: Prices and expenses/ room and board 1) 03_0080.json Section: Prices and expenses/ net price 2) 03_02111.json through 03_02114.json 3) 03_0201.json through 03_0202.json

bchartoff commented 7 years ago

@vivhou another wrinkle in this title identification. Turns out, excel can't open a file with a name longer than 218 characters. To be safe, I'm setting filenames to the first 200 characters of the title. Can you extend this duplicate detection to see if there are any titles where the first 200 characters are identical?

vivhou commented 7 years ago

sure thing!