Giter Site home page Giter Site logo

Politics markets error about abettor HOT 4 CLOSED

phillc73 avatar phillc73 commented on June 13, 2024
Politics markets error

from abettor.

Comments (4)

rethinkr-hub avatar rethinkr-hub commented on June 13, 2024

doesn't look like GB exists in the politics market. try

listMarketCatalogue(eventTypeIds=politics.ID, marketCountries="USA", marketTypeCodes = market.Type)
see if you get a data frame with something in it.

from abettor.

jblumenau avatar jblumenau commented on June 13, 2024

Interesting. The following:

 listCountries(eventTypeIds=as.numeric(politics.ID))

Returns:

  countryCode marketCount
1          GB         686
2          IE           2
3          GR           5
4          US           4

Which makes me think it may be something to do with:

 listMarketTypes(eventTypeIds=politics.ID)$marketType

Which returns:

"NONSPORT"

! Any ideas?

Thanks for the reply!

from abettor.

phillc73 avatar phillc73 commented on June 13, 2024

Apologies for the tardy reply.

The issue here is that listMarketCatalogue only returns events with a marketStartTime within the next 24 hours by default. Essentially I put this in place for the convenience factor, as I mostly look at horse races and really only wanted today's and tomorrow's racing.

The good news is that there are already function parameters in place to alter this very easily.

Find the Politics event type code

listEventTypes()

You'll see that Politics has the eventTypeId of 2378961.

List politics MarketTypes

listMarketTypes(eventTypeIds = "2378961")

You're right, it is NONSPORT.

Set the timespan in listMarketCatalogue.

listMarketCatalogue(eventTypeIds = "2378961", marketCountries = "GB", marketTypeCodes = "NONSPORT", toDate = "2015-12-01T00:00:00Z")

I've randomly set the future date to December 1st 2015

This returned 200 politics markets for me, all with a marketStartTime of 2015-05-07T06:00:00.000Z

I hope that helps. Try ?listMarketCatalogue for more information on available parameters. I must admit I haven't include an example of setting the toDate for listMarketCatalogue, and maybe should. Try ?listEvents to see an example of setting the toDate.

Do let me know if this works for you, so I can close the issue.

Good luck on May 7th!

from abettor.

phillc73 avatar phillc73 commented on June 13, 2024

Assuming fixed, so closing.

from abettor.

Related Issues (20)

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.