Python3 implementation of the Open Game Gata feature extractor
This code pulls raw game data from a SQL database, BigQuery database, or export file; chooses appropiate features to extract based on the "game_id"; and writes results to a file for data mining.
See http://fielddaylab.wisc.edu/opengamedata for exports of raw events and the features created by this code for a collection of education games. See https://www.youtube.com/watch?v=gelyDJjxIeg for a walkthorugh of the high-level code structure.
Please feel free to modify this code, add new features or games and share back to the authors. We will deploy improvements to the Open Game Data site.
Setup:
- Install python3 (could write a whole chapter on this)
- Install python dependencies: "pip3 install -r requirements.txt"
- Copy
config.py.templatetoconfig.pyand set server/authentication data - Download any authentication keys needed for BigQuery game data projects
Running Data Exports:
usage: <python> main.py <cmd> [<args>]
<python> is your python command.
<cmd> is one of the available commands:
- export
- export-events
- export-features
- info
- readme
- help
[<args>] are the arguments for the command:
- export: game_id, [start_date, end_date]
game_id = id of game to export
start_date = beginning date for export, in form mm/dd/yyyy (default=first day of current month)
end_date = ending date for export, in form mm/dd/yyyy (default=current day)
- export-events: game_id, [start_date, end_date]
game_id = id of game to export
start_date = beginning date for export, in form mm/dd/yyyy (default=first day of current month)
end_date = ending date for export, in form mm/dd/yyyy (default=current day)
- export-features: game_id, [start_date, end_date]
game_id = id of game to export
start_date = beginning date for export, in form mm/dd/yyyy (default=first day of current month)
end_date = ending date for export, in form mm/dd/yyyy (default=current day)
- info: game_id
game_id = id of game whose info should be shown
- readme: game_id
game_id = id of game whose readme should be generated
- help: *None*
[<opt-args>] are option arguments, which affect certain commands:
--file: specifies a file to export events or features
--monthly: with this flag, specify dates by mm/yyyy instead of mm/dd/yyyy
(you can see a similar printout directly from the system by running python3 main.py --help)
Example use:
python3 main.py export JOWILDER 1/1/2019 2/28/2019
In the example above, all JOWILDER data from beginning of January to end of February (in 2019) is exported. This includes both the events and the processed session features.
python3 main.py export JOWILDER --monthly 1/2019
In the example above, all JOWILDER data from the month of January 2019 is exported. This includes both the events and the processed session features.
python3 main.py export-events JOWILDER 1/1/2019 2/28/2019
In the example above, only the events from the JOWILDER data during given date range are exported.
python3 main.py export-features JOWILDER 1/1/2019 2/28/2019
In the example above, only the processed session/player/population features from the JOWILDER data during given date range are exported.
Metadata
Release files for opengamedata-core 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opengamedata_core-0.0.14.tar.gz | 377.5 kB | Without provenance | Details for opengamedata_core-0.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opengamedata_core-0.0.14-py3-none-any.whl | Python 3 | none | any | Details for opengamedata_core-0.0.14-py3-none-any.whl |
Total release size: 1.0 MB
Release files / opengamedata_core-0.0.14.tar.gz
| Download URL | opengamedata_core-0.0.14.tar.gz |
|---|---|
| Size | 377.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
886efd4254587de8c4e40bdfa657ed01408e54a7b828c6fb0a9dc5c7e9699dd0
|
|
BLAKE2b-256 checksum How to use checksums |
8e299be9b774bde4a9e75fa93bca878387393eff49c820a083b51551c7602ee4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / opengamedata_core-0.0.14-py3-none-any.whl
| Download URL | opengamedata_core-0.0.14-py3-none-any.whl |
|---|---|
| Size | 662.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e849a04b90c63f8e6d234adfbdaa19156343c7955ddb797b9a3944867ce0d70a
|
|
BLAKE2b-256 checksum How to use checksums |
d05ec214fc8a4f47ef272df68952372b8dae67eb737a10a6758c7303ecffbe80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for opengamedata-core 0.0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.