Sales analysis is done at regular intervals by sales managers of large organizations. Studying and analyzing past sales records, helps these sales managers to decide the products their teams need to focus upon and helps the sales managers to understand the likes and dislikes of their customers more effectively.
In this challenge, you need to read the data from a CSV(Comma Seperated Value) file sales data of an e-commerce organization, which is available in sales.csv file and write it on another file.
The file contains the following information:
date - contains the date of the purchase
customer_id - contains the customer_id of the customer who has purchased the product
product_category - contains the category_id of the product being sold
payment_method - this can have only two values, credit for credit card payment and paypal for payments made through PayPal
value - contains the sales amount in USD
time_on_site - contains the amount of time a customer has spent on an e-commerce site
clicks_in_site - contains the number of clicks a user has made while accessing a site. This value is captured to see how many products a customer has visited before making a purchase decision.
Read the CSV file line by line that contains data of the sales record using Streams.
Filter all the records where payment_method is 'credit'
Write all the filtered data in the output.txt file using Streams.
1.Download and unzip the boilerplate code.
2.Run the command npm install to install the dependencies.
3.Open the boilerplate code in VSCode to develop the assignment solution.
4.Write the logic in .js file present in src folder
5.Read the .csv file given in resources folder
5.Run the test scripts available under src/test by giving the npm run test command in the terminal to test locally.
6.Refactor the solution to ensure all test cases are passing.
7.Zip the solution code with the name same as the assignment name.
8.Upload the zipped solution for submission.
"# sales-analyzer"