GithubHelp home page GithubHelp logo

Comments (4)

ochawkeye avatar ochawkeye commented on July 20, 2024

Try python c:\Python27\Scripts\nfldb-update --update-schedules

C:\Users\Ben>python c:\Python27\Scripts\nfldb-update --help
usage: nfldb-update [-h] [--interval INTERVAL]
                    [--player-interval PLAYER_INTERVAL] [--update-schedules]
                    [--batch-size BATCH_SIZE]
                    [--simulate SIMULATE [SIMULATE ...]]

Updates the nfldb database. It may be run at any frequency, or it may be run
in the background with --background.

optional arguments:
  -h, --help            show this help message and exit
  --interval INTERVAL   When set, nfldb-update will check for active games and
                        update the database every N seconds, where N is the
                        interval given. You should NOT specify an interval
                        smaller than 15 seconds, since NFL.com's JSON feed is
                        updated approximately every 15 seconds. (default:
                        None)
  --player-interval PLAYER_INTERVAL
                        The number of seconds between player meta data
                        updates. A longer interval is needed since meta data
                        does not change frequently and because each update
                        requires a few dozen HTTP requests to NFL.com.
                        (default: 43200)
  --update-schedules    When set, ALL game schedules are refreshed from the
                        data in nflgame. (In normal operation, only the
                        current week's schedule is refreshed.) (default:
                        False)
  --batch-size BATCH_SIZE
                        The number of games to batch before sending data to
                        the database. In normal operation, this setting will
                        not have much effect and so should be kept low (to
                        keep memory requirements low). It is most useful when
                        updating a large amount of data.e.g., A batch size of
                        150 seems to work well when building the database from
                        scratch. (default: 5)
  --simulate SIMULATE [SIMULATE ...]

from nfldb.

seanpdwyer7 avatar seanpdwyer7 commented on July 20, 2024

When I run that it doesn't return any historical data in the JSON file. Maybe I'm doing it wrong?
Screen Shot 2019-10-31 at 7 49 32 PM

from nfldb.

ochawkeye avatar ochawkeye commented on July 20, 2024

Try force updating your nflgame schedule? python nflgame-update-schedule --rebuild

c:\Python27\Scripts>python nflgame-update-schedule --help
usage: nflgame-update-schedule [-h] [--json-update-file JSON_UPDATE_FILE]
                               [--rebuild] [--year YEAR]
                               [--phase {PRE,REG,POST}] [--week WEEK]

Updates nflgame's schedule to correspond to the latest information.

optional arguments:
  -h, --help            show this help message and exit
  --json-update-file JSON_UPDATE_FILE
                        When set, the file provided will be updated in place
                        with new schedule data from NFL.com. If this option is
                        not set, then the "schedule.json" file that comes with
                        nflgame will be updated instead. (default: None)
  --rebuild             When set, the entire schedule will be rebuilt.
                        (default: False)
  --year YEAR           Force the update to a specific year. (default: None)
  --phase {PRE,REG,POST}
                        Force the update to a specific phase. (default: None)
  --week WEEK           Force the update to a specific week. (default: None)

c:\Python27\Scripts>

from nfldb.

seanpdwyer7 avatar seanpdwyer7 commented on July 20, 2024

Figured it out I ran the script from ~/nflgame/scripts/update_sched.py --year 201X and then ran nfldb--update and the the script updated and it sent the batch files to Postgres

from nfldb.

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.