Stats Page

  • Description :

    The goal of this project was to learn to integrate python into a website and render information from a database in javascript

    This project is composed of the following:

    • A python script that queries an api and extracts and modifies it so as to get the average price of the top 10 items being sold and saves it to a database.

    • The information in the database can then be used by the php server and create an API that will respond to Ajax requests.

    • Clientside javascript that will generate a graph and query the server for data via Ajax requests.

    I am using the Warframe Market API here since data is easily available, often updated, exploitable and has a manageable amount of items (2478) as opposed to databases containing real life items and prices owned by big corporations.

  • Technology and notions:

    PHP, Laravel 4.2, Python, NumPy, JQuery UI, Ajax, Bootstrap, Chart.js, JSON

  • Duration of the project :

    2nd February 2019 - 14th February 2019, in my free time.

  • What I learned from this project:
    • During this project I learned to use Ajax and how to make it "communicate" with a php server via JSON.

    • Python stuff like removing NaN values from an array in python using NumPy : a=np.nan_to_num(numlist[0:4])

    • Gained valuable experience using JQuery UI and JQuery

    • Discovered Chart.js and managed to apply a graph to represent a dataset

    • That you need to clean old data before clearing and refilling the graph otherwise you get old data polluting new graphs

Evolution of item prices over time


Manage items:

Statistics on the dataset

Highest priced itemsView in graph

Sacrificial Pressure5199

Arcane Vanguard Rhino Helmet528.25

Spring-Loaded Broadhead483.33

Wolf Sledge Set478.5

Exodia Valor478.33

Arcane Pendragon Excalibur Helmet465.67

Broken War Set380

Arcane Swindle Loki Helmet357.5

Arcane Coil Mag Helmet353

Strafing Slide350

Lowest priced itemsView in graph

Proof Fragment1

Heart Noctrul1

Tear Azurite1

Marquise Veridos1

Seismic Palm1

Star Crimzian1

Grineer Settlement Artillery Scene1

Fracturing Wind1

Star Amarast1

Cyan Ayatan Star1

Top risingView in graph

Prisma Veritux1374%

Ammo Drum436%

No Return400%

Sniper Scavenger366%

Shattering Impact325%

Pistol Scavenger244%

Rifle Scavenger225%

Lasting Sting216%

Perpetual Agony175%

Swipe150%

Dropping fastView in graph

Stradavar Prime Set-100%

Revenge-100%

Enhanced Vitality-87%

Large Sharrac-82%

Redirection-81%

Virtuos Forge-78%

Primed Quickdraw-76%

Steel Fiber-75%

Magus Overload-75%

Axi E1 Intact-71%

Stock Market Displaying 40/1827 items, ignoring items with 0% change.. (Refresh the page for different items) Sorted by difference

Voltaic Strike33%

Arcane Hemlock Saryn Helmet26%

Crowd Dispersion25%

Arcane Avenger22%

Silent Battery21%

Karak Wraith Stock20%

Vectis Prime Blueprint16%

Primed Bane of Corpus15%

Ion Infusion14%

Arbiters of Hexis Augment Mod14%

Arcane Phoenix Ember Helmet12%

Latron Prime Stock12%

Rhino Prime Neuroptics8%

Vauban Prime Blueprint7%

Braton Vandal Set7%

Peaceful Provocation6%

Loki Prime Systems5%

Volt Prime Systems3%

Corvas Set-2%

Mantis Fuselage-6%

Reawaken-6%

Chroma Prime Neuroptics-8%

Lith N3 Intact-8%

Kogake Prime Set-11%

Health Conversion-12%

Akbolto Prime Receiver-14%

Lato Vandal Receiver-17%

Mesa Prime Set-20%

Peculiar Bloom-23%

Nami Skyla Prime Blade-24%

Destreza Prime Blueprint-25%

Mutalist Alad V Assassinate Key-25%

Molten Impact-25%

Tipedo Prime Blueprint-25%

Magus Cloud-30%

Paris Prime Upper Limb-34%

Intensify-34%

Radiant Zodian-34%

Akbolto Prime Blueprint-34%

Huras Kubrow Imprint-65%

Possible improvements and further ideas

  • Add a button to refresh the graph, to change the colors / fix errors
  • Add a button to reset the graph
  • Calculate the daily standard variation: here
  • Add a graph showing the hourly price variations for all items (averaged) over the course of a day
  • Make an application in Dart with Flutter.io to complement this page.
  • Add a loading screen to this page since data in the stock market tends to take time to load..
  • Apply seasonal adjustment to the data on the day to day basis.