Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

If I add the options redirections=3 I get much more information but not exactly what's on the view source webpage.  So I'm still stuck.

@Stephen Forrest Using data := URL:-Get("http://www.fuelsonline.ca/");

I get document has moved.  I can't figure out how to proceed from there.  I can't figure out the User-Agent settings properly to work.  Can an example be provided?

@Axel Vogt Then what would be the point of Maple having HTTP[Get] or the sockets package?

I suppose in some cases there would be times it would be better to use something other than Maple.

Nice little statistical visualization but those are cheap house prices!  Where do you find deals like that?

I grabbed some data around the nearest city

bedrooms := `<,>`(3, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4):

area := `<,>`(1176, 1300, 1370, 800, 2300, 1633, 1646, 1200, 1978, 2036, 2678):

price := `<,>`(314900, 199900, 185000, 179000, 619000, 374900, 419990, 599000, 439990, 439990, 519990):

HouseSalesData := DataFrame([bedrooms, area, price], columns = [Bedrooms, Area, Price])

Matrix([[``, Bedrooms, Area, Price], [1, 3, 1176, 314900], [2, 2, 1300, 199900], [3, 3, 1370, 185000], [4, 3, 800, 179000], [5, 3, 2300, 619000], [6, 3, 1633, 374900], [7, 3, 1646, 419990], [8, 4, 1200, 599000], [`...`, `...`, `...`, `...`]])

(1)

Aggregate(HouseSalesData, Bedrooms, columns = [Price])

Matrix([[``, Bedrooms, Price], [1, 2, 199900.], [2, 3, 348798.333333333], [3, 4, 499742.500000000]])

(2)

Aggregate(HouseSalesData, Bedrooms, tally)

Matrix([[``, Bedrooms, Area, Price, Tally], [1, 2, 1300., 199900., 1], [2, 3, 1487.50000000000, 348798.333333333, 6], [3, 4, 1973., 499742.500000000, 4]])

(3)

Aggregate(HouseSalesData, Bedrooms, function = Statistics:-Median)

Matrix([[``, Bedrooms, Area, Price], [1, 2, 1300., 199900.], [2, 3, 1501.50000000000, 344900.], [3, 4, 2007., 479990.]])

(4)

with(Statistics):

ByRooms := SplitByColumn(HouseSalesData, Bedrooms)

[Matrix(2, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 2, (2, 2) = 2, (2, 3) = 1300, (2, 4) = 199900}), Matrix(7, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 1, (2, 2) = 3, (2, 3) = 1176, (2, 4) = 314900, (3, 1) = 3, (3, 2) = 3, (3, 3) = 1370, (3, 4) = 185000, (4, 1) = 4, (4, 2) = 3, (4, 3) = 800, (4, 4) = 179000, (5, 1) = 5, (5, 2) = 3, (5, 3) = 2300, (5, 4) = 619000, (6, 1) = 6, (6, 2) = 3, (6, 3) = 1633, (6, 4) = 374900, (7, 1) = 7, (7, 2) = 3, (7, 3) = 1646, (7, 4) = 419990}), Matrix(5, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 8, (2, 2) = 4, (2, 3) = 1200, (2, 4) = 599000, (3, 1) = 9, (3, 2) = 4, (3, 3) = 1978, (3, 4) = 439990, (4, 1) = 10, (4, 2) = 4, (4, 3) = 2036, (4, 4) = 439990, (5, 1) = 11, (5, 2) = 4, (5, 3) = 2678, (5, 4) = 519990})]

(5)

BoxPlot(map(proc (m) options operator, arrow; m[Price] end proc, ByRooms), deciles = false, datasetlabels = ["2 bdrms", "3 bdrms", "4 bdrms"], color = ["Red", "Purple", "Blue"], size = [800, "golden"]);

Download houseprices.mw

 

Maplesoft should have a version 6 lying around shouldn't they?

Thanks for that simple solution. 

I can't figure out for adding the stat for a team that makes it to the final match but looses.

How do we continue a simulation if we already know a few of the winners in the round of 16?  How can we modify the code?

@Markiyan Hirnyk thanks Markiyan!  I thought I asked that question but I could not locate it.  Thanks for pointing it out, but there wasn't any code presented in the other post. 

@Samir Khan I didn't think anyone would come up with something so fast! 

**added... ok I see now, pretty simple the theoretical low is just on the psychrometric chart, now just have to test the theory if or when I have time.

That 5 degree C minimum I mentioned at 0%humidity could only occur if the outside air temperature was at most about 18 degrees C. 

... using maple, if the lowest possible temperature someone measured was 5 degrees celcius (wet bulb temp) using a zeer we can calculate the temperature it might have been at 0% humidity at a standard pressure of 101.325 kPa

with(ThermophysicalData):
Property(Tdb, HumidAir, R = 0.00001, P = 101325, Twb = 278.15)   #R=0 (humidity @ 0%)produces strange result so I have chosen a value close to zero instead.

                                               291.567042014157437

convert(%,temperature,kelvin,Celsius)

                                               18.4170420

Currently where I am P=102.2 kPa, T=26.5 degrees Celsius with humidity at 36%.  The theoretical lowest temperature I could achieve right now with a zeer is ..

Property(Twb,HumidAir,R=.36,P=102200,Tdb=26.5+273.15)
 
                                        289.800660462402220

convert(%, temperature, kelvin, Celsius)

                                        16.6506605

 

 

Thanks for the great application Samir!

On the topic of thermal applications, I would like to bring to light a primitive refrigerator called the Zeer - one smaller clay pot inside a larger clay pot filled in between with damp sand.  It would be interesting to see this "Zeer" explored in Maple.  Based on the principles of evaporation it is said to get as cool as 5 degrees celcius at 0% humidity. 

It would be interesting to plot the theoretical inside temperature vs. outside tempurature at various humidity levels. 

I don't know if anyone would find interest in this topic but I would certainly enjoy seeing the results that anyone could come up with.

I've attached an updated round of 16 knockout simulation with up to date Elo ratings of the teams in the round.  For anyones interest.

Eurosimulation2016-round_of_16.mw

@acer This works great!  I wonder if the Laplace interpolation produces a better end result? 

I'm actually quite amazed at how well both methods work.  Thanks for looking into this Acer.

@vv Great work!  We can apply this to the world cup in two years.  Although I'm not a strong coder I can do some of the grunt work and add more countries flags later.

Fine tuning the scoring : 
I was looking into how a teams scores were related to their elo ratings.  I found initially (haven't been able to look further lately) although it is more likely for a team with a higher elo rating to win, it is not unlikely a team with a lower elo rating to have a high score like 3-1 or even 4-0.  We might be able to come up with some distribution probability for the scoring.  ie teams with elo ratings within 100 points of each other are fairly evenly matched, teams separated by more than 300 points are more likely to score 1 more goal than their opponent .. or something like that. 

.. and keywords like bodybuilding, viagra, and therapy.  I have been deleting many as well in the last while. 

That's interesting, keep that generator.  I was meaning the first round of 16 who is knocked out.  Is your knockout from the group stage?

First 58 59 60 61 62 63 64 Last Page 60 of 162