Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV editing #11

Open
lillixia opened this issue Jul 31, 2014 · 7 comments
Open

CSV editing #11

lillixia opened this issue Jul 31, 2014 · 7 comments
Assignees

Comments

@lillixia
Copy link

Hi, I'd like to be able to add information to a CSV so that each function code (that correlates to a field on the budget visualization) can get a description. Said CSV can be found here:
https://docs.google.com/spreadsheets/d/1EX3MFDfOLbzc4AHdC1OJ4IZCkREENpoJ-QdHGzUBNXw/edit?usp=sharing

@cfarm
Copy link

cfarm commented Jul 31, 2014

Assigned this to CSV expert Sophia. Any ideas, @sophiaphillyqueen ?

@yprabhu
Copy link

yprabhu commented Jul 31, 2014

I had a discussion about this yesterday with @lillixia and we decided it was easier to manually enter data. The CSV has a description field for each function name and Lexi wants to find a way to make it easier to manually enter the description under each function name. If @sophiaphillyqueen has a way to simplify this, that would be great!

@barnomics
Copy link

I do see one issue with adding the descriptions to the CSV ( assuming it will be converted to a JSON file later ) to be mindful of. When it is converted to a JSON, it will more than likely lose its formatting - or at least, you may see issues with formatting.

For example the OFFICE OF GENERAL COUNSEL field description is a line with 4 items in a list. When converted to json it might end up being one long string.

I could be totally wrong but just something to be mindful of. You can probably get around this by including simple HTML in the description like so...

"The Office of General Counsel is responsible for providing, in an efficient and timely manner, high quality legal advice and representation on litigation and transactional matters affecting the School District and the Intermediate Unit.  Specific functions include:
<ol>
<li>Representing the School District, the School Reform Commission, and District officers and employees in varied transactions and litigation;</li>
<li>Providing legal advice and counsel to Commission members, officers and employees on a wide range of education, labor and employment, litigation and business issues;</li>
<li>Preventing legal claims by identifying potential risks and making appropriate recommendations;</li>
<li>Engaging and managing the services of outside counsel.  The General Counsel also serves as Assistant Secretary to the School Reform Commission.  The Office is organized into eight units by subject matter: charter school law, civil rights and tort litigation, claims, commercial litigation, labor and employment, school law, special education and transactional.</li>
</ol>"

@sophiaphillyqueen
Copy link

Okay ---- I downloaded the CSV file. Understanding the CSV format is simple ---- but that's only half the equation ----- the CSV is only where the data comes from. To be of much assistance, I need to also understand where and in what format the data goes to.

I'm fairly new to this project --- and I may figure out the answer myself if I poke around long enough ---- but if someone wants to fast-forward this and bring me up to speed, that would be great.

In short ---- I can easily write a script that can parse this data ---- but I am not quite clear of what this script is going to need to do with the data once it's been parsed.

If you want me to convert it to JSON that won't be a problem at all ---- I can do that for sure. I am not as familiar with JSON as I am with CSV, but from what I read, it is clear enough that I won't have much trouble converting it to JSON. The question is ---- is that what you want me to do?

@JessicaBarnett
Copy link

So, I'm actually working on switching this project from a php script that does all the parsing to a purely javascript one. It's pretty close to finished over on the parseCSV branch. We're using d3's built-in csv parser to do most of the work, and running it through a formatter that I've added. (was actually pretty difficult to do, for the record)

I don't think adding a description to the csv would be a huge problem on our end, actually. But I think the ultimate goal is to be able to pull the csv data directly from the Open Data Initiative. (I might be wrong on that, but it's the assumption I've been working on.) If that's the case, then the csv isn't actually ours to edit.

However, if you want to add descriptions to the items in root, we can make an object with said descriptions. It shouldn't be too hard to work them in.

It took me a pretty long time to figure out what was going on with the data, but if anyone has any specific questions, I can probably help. I've spent a lot of time with it lately.

@madewithsalt
Copy link

Parsing that data was no small task and you have done a great job first
deciphering the pattern, and then translating that into a script. Can't
wait to see the final result!

@alohaas
Copy link

alohaas commented Aug 21, 2014

Really excited to see your work Jess!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants