JavaScript Financial Statement Table Parser
Budget: $10 – $30 AUD
Hi, I want to complete the following code, which is currently functional but incomplete.
I am currently working on a financial statement parser in JavaScript. The program takes an input (a copied and pasted table) and outputs the formatted table. This program specifically focuses on financial data which typically is in the following format (newline delimited for rows, space delimited for columns):
Title Year Year
Line Item Value Value
Line Item Value Value
.
.
.
Note that the columns are space separated but the line items can have more than one word. I have begun parsing the table (see attached txt file) by splitting each row into 'labels', for example, 'Revenue from customers' would be a label, and 'values', which are floats represented in financial format, e.g. '8,000 = 8000', '(8,000) = -8000', '8 ppt = 8% = 0.08', '- = 0' and so on. However, I want to start making this program more robust to various edge cases which are also outlined in detail in the txt file. For example, the character '-' may show up in both a label and a value, but currently the program splits the label incorrectly. Moreover, copying and pasting table cells that have multiple lines will oftentimes parse them incorrectly as the input is not clean.
I have also attached a list of companies that I have identified these cases for in the notepad, and links to the financials of these companies that I have tested the program on. Please ensure that there is coverage for all of the cases I have identified and any that I've potentially missed.
Thank you!
I am currently working on a financial statement parser in JavaScript. The program takes an input (a copied and pasted table) and outputs the formatted table. This program specifically focuses on financial data which typically is in the following format (newline delimited for rows, space delimited for columns):
Title Year Year
Line Item Value Value
Line Item Value Value
.
.
.
Note that the columns are space separated but the line items can have more than one word. I have begun parsing the table (see attached txt file) by splitting each row into 'labels', for example, 'Revenue from customers' would be a label, and 'values', which are floats represented in financial format, e.g. '8,000 = 8000', '(8,000) = -8000', '8 ppt = 8% = 0.08', '- = 0' and so on. However, I want to start making this program more robust to various edge cases which are also outlined in detail in the txt file. For example, the character '-' may show up in both a label and a value, but currently the program splits the label incorrectly. Moreover, copying and pasting table cells that have multiple lines will oftentimes parse them incorrectly as the input is not clean.
I have also attached a list of companies that I have identified these cases for in the notepad, and links to the financials of these companies that I have tested the program on. Please ensure that there is coverage for all of the cases I have identified and any that I've potentially missed.
Thank you!