%pip install redis matplotlib numpy pandas
Run to view results
# packages we use in our analysis process
import redis
import json
import os
import urllib.request
import pandas as pd
from gior import gior
# The following (optional) packages were used to analyze the gameplay data.
import matplotlib.pyplot as plt
import numpy as np
Run to view results
The following code block will create a reference to the Redis instance running in the Docker container.
# Create a Redis client to connect to the local Redis server instance
r = redis.Redis(
host="localhost",
port=6379,
db = 0
)
# Ensure cache directory exists
if not os.path.exists("./cache"):
os.makedirs("./cache")
Run to view results
You can obtain your botId from Commander Cortex: It is an alphanumeric code printed in the upper right corner of the status block. It always starts with cortex-. This unique identifier is used to retrieve gameplay data from Redis and/or the GIO servers.
botId = 'cortex-796tP1U' # Update this to match the Bot ID in Commander Cortex!
df = generateDataFrame(botId)
df.info()
Run to view results