Turnip Statistics for Animal Crossing: New Horizons' Stalk Market
This project is a basic approach to visualise data from turnip prices for multiple users and host it on the web.
- MySQL
- PHP
- R
- RMarkdown
- tidyr
- ggplot2
- knitr
- reshape2
- RMySQL
- Javascript
- JQuery
-
Create a new table called
SaleStats
in your database as following:ID User Price Date Time INT TEXT INT DATE BOOLEAN Make ID your primary key.
-
Create a new table called
PurchaseStats
in your database as following:ID User Price Week INT TEXT INT INT Make ID your primary key.
-
Put your database info into the
form_handler.php
andTurnipStats.Rmd
files -
Set up account credentials in the
form_handler.php
-
Add the correct absolute path to
knit.sh
inform_handler.php
-
Add the correct path to your
jquery.min.js
inindex.html
-
Add an exception for the
knit.sh
so it can be called withsudo
by thewww-data
user without a password:- Call
visudo
from the command line - At the bottom, add
www-data ALL=NOPASSWD: /full/path/to/directory/knit.sh
- Save file
- Call
-
Make
knit.sh
immutable by callingchattr +i knit.sh
Thanks to adam2326 from CodePen (https://codepen.io/adam2326) for Fancy Forms which was adapted for this project