marshallhouston / black_thursday Goto Github PK
View Code? Open in Web Editor NEWThis project forked from turingschool-examples/black_thursday
This project forked from turingschool-examples/black_thursday
@merchant_repo sales_engine items etc,
same for items
same for invoice
ideas: might be missing revenue for an invoice that has some failed transactions?
**why doesn't our revenue match up?
can we extract out methods related to iteration 4: merchant analytics
currently, we're converting the unit price to a float.
we want to use BigDecimal (BigDecimal.new?)
when it says unit price 700, i think that means 7.00 (specify that it goes two decimal places in big decimal to generate a unit price of 7.00)
possible solutions: brute force with spec harness,
**Why are we letting 7 merchants slip through the conditional crack?
spec says se = SalesEngine.from_csv({
:items => "./data/items.csv",
:merchants => "./data/merchants.csv",
})
mr = se.merchants
merchant = mr.find_by_name("CJsDecor")
but in the spec, we haven't initialized SalesEngine first.
it currently is inside the csv_parser module, but we could just have the parser take the data into rows and save it.
we could then grab the info we need in the item_repo and merchant_repo class.
average_invoices_per_day = 712.14
std_dev = 211.27 (with .ceil, it's 212).
Mon 922
T 618
W 945
T 348
Fri 937
Sat 596
Sun 619
Which days of the week see the most sales?
On which days are invoices created at more than one standard deviation above the mean?
it "#top_days_by_invoice_count returns days with an invoice count more than one standard deviation above the mean" do
expected = sales_analyst.top_days_by_invoice_count
expect(expected.length).to eq 1
expect(expected.first).to eq "Wednesday"
expect(expected.first.class).to eq String
end
ask somebody about stylistically
name should be items_truncated.csv
merchants_truncated.csv
create method that will run first. then use instance variables for all other tests
wednesday should have the most
Date::DAYNAMES
change could be made in line 9 of csv_parser module
spec harness says: it "#find_by_id finds a merchant by id" do
id = 12335971
expected = engine.merchants.find_by_id(id)
expect(expected.id).to eq 12335971
expect(expected.name).to eq "ivegreenleaves"
Currently, the merchant_id is a string
pass in self from se to item_repo/merchant_repo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.