Giter Club home page Giter Club logo

black_thursday's People

Contributors

aschreck avatar biglovisa avatar jcasimir avatar joshcheek avatar kytrinyx avatar marshallhouston avatar pzula avatar rwarbelow avatar

Watchers

 avatar

black_thursday's Issues

Big Decimal with unit price

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)

initialize SalesEngine before calling from_csv?

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.

top_invoices by day is returning two days, but the spec harness says wednesday should be the only item returned

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

merchant_id should be integer when it comes in from csv

change could be made in line 9 of csv_parser module

  • current line 9
    @merchants << Merchant.new({id: row[:id], name: row[:name]})
  • change to integer when passing in the row id.
    @merchants << Merchant.new({id: row[:id].to_i, name: row[:name]})

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.