There is a platform called Steam for gaming where you can buy games and items for those games. Steam has a community market where players can buy and sell in game items. One of the games you can do this for is called "Rust" it is a survival game where you can get weapons and weapon skins that change the look of the weapon you are using. These weapon skins are also sold on the steam community market for sometimes a lot of money. People can usually trade or sell these skins to other players, its even used in online gambling sometimes. So, these items have real monetary value. You can purchase these items directly from the games too specifically with Rust they just released a new way to buy their items in November of 2021, however with this new shop you can no longer trade or sell any skins you buy from them. You can still trade and sell anything released before this shop. I personally have a lot of items on that game, so I wanted to see how the release of this new shop where you can no longer sell new items and skins would affect the prices of previous items. Would it increase the price decrease the price? Or if it had no correlation at all, I wanted to make sure if the prices drop I can still sell all my items before they become worthless.
All data in this project is pulled off of the steam community market public API so all prices are what other people are selling each item for within the last 15 days. Anybody can access these prices without accessing the API it would just take much longer.
import pandas as pd
import requests
import base64
import json
from matplotlib import pyplot as plt
import numpy as np
from numpy import ndarray as nd
ls
item_list = pd.read_csv("/Users/jake/Documents/item_list.txt", sep = '\t', header = 0)
Below is a list of the names of all the items that will be pulled from the steam market.
item_list
Item List | |
---|---|
0 | Alien Red |
1 | Big Grin |
2 | Blackout Helmet |
3 | Blackout Hoodie |
4 | Blackout Jacket |
5 | Blackout Kilt |
6 | Blackout Vest |
7 | Ghostly Flame |
8 | Glory AK47 |
9 | Glory Rifle |
10 | No Mercy Facemask |
11 | No Mercy Jacket |
12 | Plate Carrier - Black |
13 | Rat Mask |
14 | Sunrise Door |
15 | Tempered Mask |
16 | Training Pants |
item = [x for x in item_list['Item List']]
item
['Alien Red', 'Big Grin', 'Blackout Helmet', 'Blackout Hoodie', 'Blackout Jacket', 'Blackout Kilt', 'Blackout Vest', 'Ghostly Flame', 'Glory AK47', 'Glory Rifle', 'No Mercy Facemask', 'No Mercy Jacket', 'Plate Carrier - Black', 'Rat Mask', 'Sunrise Door', 'Tempered Mask', 'Training Pants']
This is the number that steams API uses to determine which game to bring information from.
appid = 252490
The lines below all the way down to "my_df" are getting my personal key to access steams API and then requesting access to their API and after pulling the information for all the items it puts all of the data into a data frame.
personal_key = pd.read_csv("/Users/jake/Documents/Steam API Key.txt", sep = '\t', header = 0)
secret_key = pd.read_csv("/Users/jake/Documents/SteamApi.txt", sep = '\t', header = 0)
secret = secret_key["Steam API"].iloc[0]
bearer = personal_key["Personal Key"].iloc[0]
header = {'Authorization' : 'Bearer {}'.format(bearer)}
header2 = {'Authorization' : 'Bearer {}'.format(secret)}
url = "https://api.steamapis.com"
response = requests.request("GET", url, headers = header)
response
<Response [200]>
def nextEndpoint():
i = 0
responsejson = ''
df = pd.DataFrame()
while i < len(item):
response_item = endpoint_url = "https://api.steamapis.com/market/item/252490/{}?api_key=K20S8glp6_W4W6b0WQJ0dCveOi4".format(item[i])
response_item = requests.request("GET", response_item, headers = header2)
responsejson = json.loads(response_item.text)
prices = ([x for x in responsejson['median_avg_prices_15days']])
df[responsejson['market_name']] = prices
i += 1
return df
my_df = nextEndpoint()
my_df
Alien Red | Big Grin | Blackout Helmet | Blackout Hoodie | Blackout Jacket | Blackout Kilt | Blackout Vest | Ghostly Flame | Glory AK47 | Glory Rifle | No Mercy Facemask | No Mercy Jacket | Plate Carrier - Black | Rat Mask | Sunrise Door | Tempered Mask | Training Pants | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | [Nov 29 2021, 148.91588888888887, 13] | [Nov 27 2021, 588.0205000000001, 2] | [Nov 29 2021, 8.5306, 24] | [Nov 29 2021, 14.064863636363635, 48] | [Nov 29 2021, 8.899550000000001, 42] | [Nov 29 2021, 14.270190476190479, 67] | [Nov 29 2021, 13.997058823529409, 28] | [Nov 29 2021, 11.7606, 10] | [Nov 23 2021, 277.251, 2] | [Nov 29 2021, 2.1563750000000006, 8] | [Nov 29 2021, 4.0072857142857154, 17] | [Nov 29 2021, 9.963916666666666, 14] | [Nov 28 2021, 109.994, 1] | [Nov 29 2021, 8.09825, 4] | [Nov 28 2021, 0.93, 14] | [Nov 26 2021, 202.96733333333336, 3] | [Nov 29 2021, 12.5435, 18] |
1 | [Nov 30 2021, 150.07855555555554, 11] | [Nov 28 2021, 587.62, 1] | [Nov 30 2021, 8.43876923076923, 21] | [Nov 30 2021, 13.541318181818179, 46] | [Nov 30 2021, 8.935000000000002, 35] | [Nov 30 2021, 13.957999999999998, 87] | [Nov 30 2021, 13.598333333333331, 16] | [Nov 30 2021, 11.226750000000001, 4] | [Nov 24 2021, 278.80899999999997, 3] | [Nov 30 2021, 2.1903333333333332, 3] | [Nov 30 2021, 3.866818181818182, 19] | [Nov 30 2021, 10.5846875, 29] | [Nov 29 2021, 131.118, 5] | [Nov 30 2021, 8.487, 4] | [Nov 29 2021, 1.0408571428571427, 8] | [Nov 27 2021, 204.79, 3] | [Nov 30 2021, 12.634142857142857, 20] |
2 | [Dec 01 2021, 148.11916666666667, 9] | [Nov 29 2021, 569.1046666666667, 3] | [Dec 01 2021, 8.589749999999999, 32] | [Dec 01 2021, 13.045090909090908, 57] | [Dec 01 2021, 8.75595, 50] | [Dec 01 2021, 14.67195833333333, 69] | [Dec 01 2021, 13.156058823529413, 31] | [Dec 01 2021, 12.038307692307692, 16] | [Nov 26 2021, 298.174, 2] | [Dec 01 2021, 2.20025, 9] | [Dec 01 2021, 4.0369375, 29] | [Dec 01 2021, 11.042399999999999, 24] | [Nov 30 2021, 129.535, 6] | [Dec 01 2021, 7.53675, 4] | [Nov 30 2021, 0.9875555555555555, 9] | [Nov 28 2021, 244.09, 1] | [Dec 01 2021, 12.15857142857143, 10] |
3 | [Dec 02 2021, 156.12, 13] | [Nov 30 2021, 675.36, 1] | [Dec 02 2021, 8.386812500000001, 26] | [Dec 02 2021, 13.626947368421051, 44] | [Dec 02 2021, 9.033285714285714, 43] | [Dec 02 2021, 15.82581818181818, 72] | [Dec 02 2021, 13.910611111111116, 28] | [Dec 02 2021, 12.038, 11] | [Nov 27 2021, 259.488, 1] | [Dec 02 2021, 2.2083333333333335, 7] | [Dec 02 2021, 4.2797857142857145, 23] | [Dec 02 2021, 10.636461538461539, 18] | [Dec 01 2021, 115.333, 1] | [Dec 02 2021, 8.975125, 9] | [Dec 01 2021, 0.9967142857142857, 10] | [Nov 29 2021, 244.12, 1] | [Dec 02 2021, 13.488999999999999, 15] |
4 | [Dec 03 2021, 154.88940000000002, 9] | [Dec 02 2021, 639.8747999999999, 5] | [Dec 03 2021, 9.22188888888889, 31] | [Dec 03 2021, 13.95505, 35] | [Dec 03 2021, 9.065190476190477, 61] | [Dec 03 2021, 16.117391304347827, 68] | [Dec 03 2021, 14.543117647058821, 37] | [Dec 03 2021, 11.398833333333334, 7] | [Nov 28 2021, 314.995, 2] | [Dec 03 2021, 2.12, 5] | [Dec 03 2021, 4.377000000000001, 20] | [Dec 03 2021, 11.172857142857142, 24] | [Dec 02 2021, 134.70333333333335, 3] | [Dec 03 2021, 9.123750000000001, 9] | [Dec 02 2021, 0.985, 11] | [Nov 30 2021, 242.8, 1] | [Dec 03 2021, 13.10225, 18] |
5 | [Dec 04 2021, 148.50525000000002, 15] | [Dec 04 2021, 659, 1] | [Dec 04 2021, 9.126899999999997, 28] | [Dec 04 2021, 13.30235294117647, 36] | [Dec 04 2021, 9.698809523809526, 59] | [Dec 04 2021, 16.541227272727273, 85] | [Dec 04 2021, 14.63, 34] | [Dec 04 2021, 10.891699999999998, 11] | [Nov 29 2021, 316.26, 2] | [Dec 04 2021, 2.1986666666666665, 8] | [Dec 04 2021, 4.4452, 23] | [Dec 04 2021, 12.095105263157896, 42] | [Dec 04 2021, 139.09633333333332, 6] | [Dec 04 2021, 8.293, 4] | [Dec 03 2021, 1.0075, 13] | [Dec 01 2021, 215.91, 1] | [Dec 04 2021, 12.378749999999998, 15] |
6 | [Dec 05 2021, 155.17329999999998, 11] | [Dec 05 2021, 662.49, 1] | [Dec 05 2021, 9.50565, 44] | [Dec 05 2021, 14.2163, 36] | [Dec 05 2021, 9.803818181818183, 42] | [Dec 05 2021, 16.490478260869565, 66] | [Dec 05 2021, 15.17952380952381, 40] | [Dec 05 2021, 11.325800000000001, 15] | [Nov 30 2021, 320.5, 1] | [Dec 05 2021, 2.122875, 8] | [Dec 05 2021, 4.395916666666667, 22] | [Dec 05 2021, 12.479800000000001, 33] | [Dec 05 2021, 125.8015, 2] | [Dec 05 2021, 8.696142857142858, 7] | [Dec 04 2021, 1.0916000000000001, 14] | [Dec 02 2021, 214.3865, 3] | [Dec 05 2021, 13.027428571428572, 20] |
7 | [Dec 06 2021, 158.8925, 23] | [Dec 06 2021, 604.753, 2] | [Dec 06 2021, 9.2925, 29] | [Dec 06 2021, 14.793777777777775, 47] | [Dec 06 2021, 10.254714285714286, 50] | [Dec 06 2021, 15.99808695652174, 65] | [Dec 06 2021, 14.887444444444444, 25] | [Dec 06 2021, 11.57275, 10] | [Dec 01 2021, 319.89466666666664, 3] | [Dec 06 2021, 2.1903333333333337, 9] | [Dec 06 2021, 4.450133333333334, 21] | [Dec 06 2021, 12.235562499999999, 26] | [Dec 06 2021, 131.344, 2] | [Dec 06 2021, 8.188571428571429, 7] | [Dec 05 2021, 1.1407142857142856, 15] | [Dec 03 2021, 219.92, 3] | [Dec 06 2021, 11.393999999999998, 11] |
8 | [Dec 07 2021, 153.1068, 6] | [Dec 07 2021, 661.247, 1] | [Dec 07 2021, 9.2175625, 29] | [Dec 07 2021, 14.364133333333335, 28] | [Dec 07 2021, 9.680047619047619, 40] | [Dec 07 2021, 16.277714285714286, 57] | [Dec 07 2021, 14.777000000000001, 26] | [Dec 07 2021, 12.375777777777778, 10] | [Dec 02 2021, 303.476, 3] | [Dec 07 2021, 2.242, 5] | [Dec 07 2021, 4.326666666666666, 25] | [Dec 07 2021, 12.046000000000003, 25] | [Dec 07 2021, 124.17350000000002, 4] | [Dec 07 2021, 8.036333333333333, 4] | [Dec 06 2021, 0.9689999999999999, 8] | [Dec 04 2021, 247.51, 2] | [Dec 07 2021, 12.175333333333334, 21] |
9 | [Dec 08 2021, 157.87149999999997, 16] | [Dec 08 2021, 673.819, 2] | [Dec 08 2021, 9.138066666666667, 22] | [Dec 08 2021, 13.425666666666665, 34] | [Dec 08 2021, 10.017444444444445, 36] | [Dec 08 2021, 16.898999999999997, 58] | [Dec 08 2021, 14.948615384615383, 24] | [Dec 08 2021, 12.326222222222222, 10] | [Dec 04 2021, 280.64366666666666, 3] | [Dec 08 2021, 2.1692857142857145, 9] | [Dec 08 2021, 4.626166666666667, 23] | [Dec 08 2021, 11.866176470588236, 31] | [Dec 08 2021, 139.715, 3] | [Dec 08 2021, 8.327333333333334, 3] | [Dec 07 2021, 1.0085000000000002, 11] | [Dec 05 2021, 249.98, 2] | [Dec 08 2021, 12.15691666666667, 19] |
10 | [Dec 09 2021, 169.08891666666668, 12] | [Dec 09 2021, 670.5106666666667, 3] | [Dec 09 2021, 9.210357142857143, 27] | [Dec 09 2021, 14.653555555555553, 35] | [Dec 09 2021, 10.337363636363635, 43] | [Dec 09 2021, 18.067590909090914, 63] | [Dec 09 2021, 14.61735294117647, 28] | [Dec 09 2021, 11.99275, 5] | [Dec 05 2021, 293.58, 1] | [Dec 09 2021, 2.3305000000000002, 10] | [Dec 09 2021, 4.123692307692308, 18] | [Dec 09 2021, 11.853615384615384, 21] | [Dec 09 2021, 132.8406666666667, 4] | [Dec 09 2021, 8.699666666666667, 6] | [Dec 08 2021, 1.0638888888888889, 10] | [Dec 06 2021, 254.85649999999998, 2] | [Dec 09 2021, 12.938727272727276, 14] |
11 | [Dec 10 2021, 168.47785714285712, 7] | [Dec 10 2021, 718.75, 1] | [Dec 10 2021, 8.927384615384614, 26] | [Dec 10 2021, 15.2815, 32] | [Dec 10 2021, 10.24295238095238, 52] | [Dec 10 2021, 18.25886956521739, 62] | [Dec 10 2021, 14.798857142857141, 22] | [Dec 10 2021, 12.108375, 11] | [Dec 06 2021, 307.927, 2] | [Dec 10 2021, 2.451, 3] | [Dec 10 2021, 4.2416, 19] | [Dec 10 2021, 12.279562499999999, 24] | [Dec 10 2021, 116.85733333333333, 3] | [Dec 10 2021, 8.2805, 7] | [Dec 09 2021, 1.1985000000000001, 6] | [Dec 09 2021, 234.6, 2] | [Dec 10 2021, 13.165733333333334, 21] |
12 | [Dec 11 2021, 162.804, 5] | [Dec 11 2021, 619.9655, 2] | [Dec 11 2021, 9.3245, 33] | [Dec 11 2021, 14.6695, 49] | [Dec 11 2021, 10.45659090909091, 55] | [Dec 11 2021, 17.372652173913046, 70] | [Dec 11 2021, 15.408052631578949, 36] | [Dec 11 2021, 11.869714285714286, 7] | [Dec 08 2021, 319.063, 1] | [Dec 11 2021, 2.2672499999999998, 10] | [Dec 11 2021, 4.6193333333333335, 30] | [Dec 11 2021, 12.067461538461536, 20] | [Dec 11 2021, 129.7086, 5] | [Dec 11 2021, 8.711, 6] | [Dec 10 2021, 0.943, 14] | [Dec 10 2021, 283.847, 2] | [Dec 11 2021, 13.490636363636362, 18] |
13 | [Dec 12 2021, 170.788, 11] | [Dec 12 2021, 656.6463333333334, 3] | [Dec 12 2021, 8.588375000000001, 27] | [Dec 12 2021, 15.087105263157893, 48] | [Dec 12 2021, 10.722999999999999, 46] | [Dec 12 2021, 17.961904761904762, 66] | [Dec 12 2021, 15.796687499999999, 31] | [Dec 12 2021, 12.81, 6] | [Dec 10 2021, 265.1286666666667, 4] | [Dec 12 2021, 2.388363636363636, 11] | [Dec 12 2021, 4.313857142857143, 19] | [Dec 12 2021, 12.732, 25] | [Dec 12 2021, 137.01, 2] | [Dec 12 2021, 8.701833333333333, 6] | [Dec 11 2021, 0.9283333333333332, 12] | [Dec 12 2021, 274.44599999999997, 4] | [Dec 12 2021, 12.317857142857141, 18] |
14 | [Dec 13 2021, 167.85999999999999, 3] | [Dec 13 2021, 660.003, 1] | [Dec 13 2021, 8.86, 3] | [Dec 13 2021, 15.0265, 3] | [Dec 13 2021, 11.209, 6] | [Dec 13 2021, 18.596666666666668, 17] | [Dec 13 2021, 16, 3] | [Dec 13 2021, 12.75, 1] | [Dec 11 2021, 321.994, 2] | [Dec 13 2021, 2.2265, 2] | [Dec 13 2021, 4.11, 3] | [Dec 13 2021, 12.513, 3] | [Dec 13 2021, 139.13240000000002, 5] | [Dec 13 2021, 8.877, 3] | [Dec 12 2021, 1.120111111111111, 10] | [Dec 13 2021, 238.2775, 2] | [Dec 13 2021, 14.145, 2] |
The lines below are separating the date and price for each day and item and putting it into a new data frame so they information can be accessed easier.
new_df = pd.DataFrame()
new_df['date_Alien'] = [x[0] for x in my_df['Alien Red']]
new_df['price_Alien'] = [x[1] for x in my_df['Alien Red']]
new_df['date_BigGrin'] = [x[0] for x in my_df['Big Grin']]
new_df['price_BigGrin'] = [x[1] for x in my_df['Big Grin']]
new_df['date_BlackoutHelmet'] = [x[0] for x in my_df['Blackout Helmet']]
new_df['price_BlackoutHelmet'] = [x[1] for x in my_df['Blackout Helmet']]
new_df['date_BlackoutHoodie'] = [x[0] for x in my_df['Blackout Hoodie']]
new_df['price_BlackoutHoodie'] = [x[1] for x in my_df['Blackout Hoodie']]
new_df['date_BlackoutJacket'] = [x[0] for x in my_df['Blackout Jacket']]
new_df['price_BlackoutJacket'] = [x[1] for x in my_df['Blackout Jacket']]
new_df['date_BlackoutKilt'] = [x[0] for x in my_df['Blackout Kilt']]
new_df['price_BlackoutKilt'] = [x[1] for x in my_df['Blackout Kilt']]
new_df['date_BlackoutVest'] = [x[0] for x in my_df['Blackout Vest']]
new_df['price_BlackoutVest'] = [x[1] for x in my_df['Blackout Vest']]
new_df['date_GhostlyFlame'] = [x[0] for x in my_df['Ghostly Flame']]
new_df['price_GhostlyFlame'] = [x[1] for x in my_df['Ghostly Flame']]
new_df['date_GloryAK'] = [x[0] for x in my_df['Glory AK47']]
new_df['price_GloryAK'] = [x[1] for x in my_df['Glory AK47']]
new_df['date_GloryRifle'] = [x[0] for x in my_df['Glory Rifle']]
new_df['price_GloryRifle'] = [x[1] for x in my_df['Glory Rifle']]
new_df['date_NoMercyFaceMask'] = [x[0] for x in my_df['No Mercy Facemask']]
new_df['price_NoMercyFaceMask'] = [x[1] for x in my_df['No Mercy Facemask']]
new_df['date_NoMercyJacket'] = [x[0] for x in my_df['No Mercy Jacket']]
new_df['price_NoMercyJacket'] = [x[1] for x in my_df['No Mercy Jacket']]
new_df['date_PlateCarrier'] = [x[0] for x in my_df['Plate Carrier - Black']]
new_df['price_PlateCarrier'] = [x[1] for x in my_df['Plate Carrier - Black']]
new_df['date_RatMask'] = [x[0] for x in my_df['Rat Mask']]
new_df['price_RatMask'] = [x[1] for x in my_df['Rat Mask']]
new_df['date_SunriseDoor'] = [x[0] for x in my_df['Sunrise Door']]
new_df['price_SunriseDoor'] = [x[1] for x in my_df['Sunrise Door']]
new_df['date_TemperedMask'] = [x[0] for x in my_df['Tempered Mask']]
new_df['price_TemperedMask'] = [x[1] for x in my_df['Tempered Mask']]
new_df['date_TrainingPants'] = [x[0] for x in my_df['Training Pants']]
new_df['price_TrainingPants'] = [x[1] for x in my_df['Training Pants']]
This new data frame now has all the dates and prices listed separately so each data point can be called.
new_df
date_Alien | price_Alien | date_BigGrin | price_BigGrin | date_BlackoutHelmet | price_BlackoutHelmet | date_BlackoutHoodie | price_BlackoutHoodie | date_BlackoutJacket | price_BlackoutJacket | ... | date_PlateCarrier | price_PlateCarrier | date_RatMask | price_RatMask | date_SunriseDoor | price_SunriseDoor | date_TemperedMask | price_TemperedMask | date_TrainingPants | price_TrainingPants | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Nov 29 2021 | 148.915889 | Nov 27 2021 | 588.020500 | Nov 29 2021 | 8.530600 | Nov 29 2021 | 14.064864 | Nov 29 2021 | 8.899550 | ... | Nov 28 2021 | 109.994000 | Nov 29 2021 | 8.098250 | Nov 28 2021 | 0.930000 | Nov 26 2021 | 202.967333 | Nov 29 2021 | 12.543500 |
1 | Nov 30 2021 | 150.078556 | Nov 28 2021 | 587.620000 | Nov 30 2021 | 8.438769 | Nov 30 2021 | 13.541318 | Nov 30 2021 | 8.935000 | ... | Nov 29 2021 | 131.118000 | Nov 30 2021 | 8.487000 | Nov 29 2021 | 1.040857 | Nov 27 2021 | 204.790000 | Nov 30 2021 | 12.634143 |
2 | Dec 01 2021 | 148.119167 | Nov 29 2021 | 569.104667 | Dec 01 2021 | 8.589750 | Dec 01 2021 | 13.045091 | Dec 01 2021 | 8.755950 | ... | Nov 30 2021 | 129.535000 | Dec 01 2021 | 7.536750 | Nov 30 2021 | 0.987556 | Nov 28 2021 | 244.090000 | Dec 01 2021 | 12.158571 |
3 | Dec 02 2021 | 156.120000 | Nov 30 2021 | 675.360000 | Dec 02 2021 | 8.386813 | Dec 02 2021 | 13.626947 | Dec 02 2021 | 9.033286 | ... | Dec 01 2021 | 115.333000 | Dec 02 2021 | 8.975125 | Dec 01 2021 | 0.996714 | Nov 29 2021 | 244.120000 | Dec 02 2021 | 13.489000 |
4 | Dec 03 2021 | 154.889400 | Dec 02 2021 | 639.874800 | Dec 03 2021 | 9.221889 | Dec 03 2021 | 13.955050 | Dec 03 2021 | 9.065190 | ... | Dec 02 2021 | 134.703333 | Dec 03 2021 | 9.123750 | Dec 02 2021 | 0.985000 | Nov 30 2021 | 242.800000 | Dec 03 2021 | 13.102250 |
5 | Dec 04 2021 | 148.505250 | Dec 04 2021 | 659.000000 | Dec 04 2021 | 9.126900 | Dec 04 2021 | 13.302353 | Dec 04 2021 | 9.698810 | ... | Dec 04 2021 | 139.096333 | Dec 04 2021 | 8.293000 | Dec 03 2021 | 1.007500 | Dec 01 2021 | 215.910000 | Dec 04 2021 | 12.378750 |
6 | Dec 05 2021 | 155.173300 | Dec 05 2021 | 662.490000 | Dec 05 2021 | 9.505650 | Dec 05 2021 | 14.216300 | Dec 05 2021 | 9.803818 | ... | Dec 05 2021 | 125.801500 | Dec 05 2021 | 8.696143 | Dec 04 2021 | 1.091600 | Dec 02 2021 | 214.386500 | Dec 05 2021 | 13.027429 |
7 | Dec 06 2021 | 158.892500 | Dec 06 2021 | 604.753000 | Dec 06 2021 | 9.292500 | Dec 06 2021 | 14.793778 | Dec 06 2021 | 10.254714 | ... | Dec 06 2021 | 131.344000 | Dec 06 2021 | 8.188571 | Dec 05 2021 | 1.140714 | Dec 03 2021 | 219.920000 | Dec 06 2021 | 11.394000 |
8 | Dec 07 2021 | 153.106800 | Dec 07 2021 | 661.247000 | Dec 07 2021 | 9.217562 | Dec 07 2021 | 14.364133 | Dec 07 2021 | 9.680048 | ... | Dec 07 2021 | 124.173500 | Dec 07 2021 | 8.036333 | Dec 06 2021 | 0.969000 | Dec 04 2021 | 247.510000 | Dec 07 2021 | 12.175333 |
9 | Dec 08 2021 | 157.871500 | Dec 08 2021 | 673.819000 | Dec 08 2021 | 9.138067 | Dec 08 2021 | 13.425667 | Dec 08 2021 | 10.017444 | ... | Dec 08 2021 | 139.715000 | Dec 08 2021 | 8.327333 | Dec 07 2021 | 1.008500 | Dec 05 2021 | 249.980000 | Dec 08 2021 | 12.156917 |
10 | Dec 09 2021 | 169.088917 | Dec 09 2021 | 670.510667 | Dec 09 2021 | 9.210357 | Dec 09 2021 | 14.653556 | Dec 09 2021 | 10.337364 | ... | Dec 09 2021 | 132.840667 | Dec 09 2021 | 8.699667 | Dec 08 2021 | 1.063889 | Dec 06 2021 | 254.856500 | Dec 09 2021 | 12.938727 |
11 | Dec 10 2021 | 168.477857 | Dec 10 2021 | 718.750000 | Dec 10 2021 | 8.927385 | Dec 10 2021 | 15.281500 | Dec 10 2021 | 10.242952 | ... | Dec 10 2021 | 116.857333 | Dec 10 2021 | 8.280500 | Dec 09 2021 | 1.198500 | Dec 09 2021 | 234.600000 | Dec 10 2021 | 13.165733 |
12 | Dec 11 2021 | 162.804000 | Dec 11 2021 | 619.965500 | Dec 11 2021 | 9.324500 | Dec 11 2021 | 14.669500 | Dec 11 2021 | 10.456591 | ... | Dec 11 2021 | 129.708600 | Dec 11 2021 | 8.711000 | Dec 10 2021 | 0.943000 | Dec 10 2021 | 283.847000 | Dec 11 2021 | 13.490636 |
13 | Dec 12 2021 | 170.788000 | Dec 12 2021 | 656.646333 | Dec 12 2021 | 8.588375 | Dec 12 2021 | 15.087105 | Dec 12 2021 | 10.723000 | ... | Dec 12 2021 | 137.010000 | Dec 12 2021 | 8.701833 | Dec 11 2021 | 0.928333 | Dec 12 2021 | 274.446000 | Dec 12 2021 | 12.317857 |
14 | Dec 13 2021 | 167.860000 | Dec 13 2021 | 660.003000 | Dec 13 2021 | 8.860000 | Dec 13 2021 | 15.026500 | Dec 13 2021 | 11.209000 | ... | Dec 13 2021 | 139.132400 | Dec 13 2021 | 8.877000 | Dec 12 2021 | 1.120111 | Dec 13 2021 | 238.277500 | Dec 13 2021 | 14.145000 |
15 rows × 34 columns
namesList = 'date_Alien', 'date_BigGrin','date_BlackoutHelmet','date_BlackoutHoodie','date_BlackoutJacket','date_BlackoutKilt','date_BlackoutVest','date_GhostlyFlame','date_GloryAK','date_GloryRifle','date_NoMercyFaceMask','date_NoMercyJacket','date_PlateCarrier','date_RatMask','date_SunriseDoor','date_TemperedMask','date_TrainingPants'
namesList
('date_Alien', 'date_BigGrin', 'date_BlackoutHelmet', 'date_BlackoutHoodie', 'date_BlackoutJacket', 'date_BlackoutKilt', 'date_BlackoutVest', 'date_GhostlyFlame', 'date_GloryAK', 'date_GloryRifle', 'date_NoMercyFaceMask', 'date_NoMercyJacket', 'date_PlateCarrier', 'date_RatMask', 'date_SunriseDoor', 'date_TemperedMask', 'date_TrainingPants')
priceList = 'price_Alien', 'price_BigGrin','price_BlackoutHelmet','price_BlackoutHoodie','price_BlackoutJacket','price_BlackoutKilt','price_BlackoutVest','price_GhostlyFlame','price_GloryAK','price_GloryRifle','price_NoMercyFaceMask','price_NoMercyJacket','price_PlateCarrier','price_RatMask','price_SunriseDoor','price_TemperedMask','price_TrainingPants'
priceList
('price_Alien', 'price_BigGrin', 'price_BlackoutHelmet', 'price_BlackoutHoodie', 'price_BlackoutJacket', 'price_BlackoutKilt', 'price_BlackoutVest', 'price_GhostlyFlame', 'price_GloryAK', 'price_GloryRifle', 'price_NoMercyFaceMask', 'price_NoMercyJacket', 'price_PlateCarrier', 'price_RatMask', 'price_SunriseDoor', 'price_TemperedMask', 'price_TrainingPants')
The two lists above were made so the while loop below can go through all of the data without having to type out 17 different graphs.
The loop then takes the variables names from the list and puts it into different scatterplots.
i = 0
while i < len(namesList):
fig0, ax0 = plt.subplots()
ax0.scatter(new_df[namesList[i]], new_df[priceList[i]])
plt.title(item[i])
plt.xlabel('Date')
plt.ylabel('Price')
plt.xticks(rotation=45)
plt.show()
i += 1
The data initially came with date, price, and quantity however, I took out quantity to make it easier to show how the prices were affected over 15 days. The only problem with not having quantity is sometimes there is only 1 or 2 of an item on the market at a certain point which can inflate the prices of items because people can mark whatever price they want to sell it for. There is probably another way I could of made all the graphs so it also accounts for quantity, or even made another set to see how much the prices jumped when an item had low quantity on the market.
This data is all pulled directly from the Steam market place, where all items and prices on it are determined by people wanting to buy and sell. This data is visible from steam in general so it can be looked at without accessing API. Also, since all the prices are determined by people it can be considered pretty reliable data because all it is doing is taking prices items were sold at and bringing it here.
Based on all of the scatter plots it does not look like the new shop that Rust added has dropped the prices of the items so far. Based on the data it looks like they either increased or didn't have a correlation at all. Overall it looks like the new shop didn't have a negative effect on prices for previous items.
There are a few limitations with this data, for starters the dates are the last 15 days since the code was executed, so the longer its been since the shop was released (mid November) the less reliable the data becomes. There is also the fact that since some items may look like it correlates and some don't it can't be said with 100% certainty that the new shop had an effect on the prices of the old items.
The main takeaway from this data is that the new shop didn't effect prices in a negative way, also that it is very likely that the shop didn't effect prices significantly at all.