Graphing sensor data using sd card

I am stuck with two problems; how can I have the amount of saved data points be limited so when say the 101st reading is taken it is put as the 1st and erases the 101st to only have the 100 most recent recordings kept

If you write each record so it has exactly the same number of characters, you can determine easily how many records there are in the file.

You could add a new record at the top that contains the record number of the newest or oldest reading. Then, when you read the file, you read from that record to the end and then reposition to the top, and read from record two to that record number, minus 1.

Using variable length records, your job is at least an order of magnitude harder.

Is the temperature and humidity data integer or float?