# R script to retrieve historical data

**URL:** <https://community.purpleair.com/t/r-script-to-retrieve-historical-data/3046>\
**Category:** API\
**Created:** [December 22, 2022, 9:38pm UTC](https://community.purpleair.com/t/r-script-to-retrieve-historical-data/3046 "2022-12-22T21:38:08Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Aaron\_Lamplugh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/aaron_lamplugh/32/651_2.png) [@Aaron\_Lamplugh](https://community.purpleair.com/u/Aaron_Lamplugh)\
**Post date:** [March 1, 2023, 5:50pm UTC](https://community.purpleair.com/t/r-script-to-retrieve-historical-data/3046/11 "2023-03-01T17:50:22Z")

</div>

If people are still interested in this topic, I have recently posted a python script to download group data from a historical period through the API:

> [@Python script for downloading and organizing historical API data](https://community.purpleair.com/t/python-script-for-downloading-and-organizing-historical-api-data/3726):
>
> Hey all, I just finished this python script to access historical data through the API. It pulls data for all monitors in a registered group. It then creates a file structure where it dumps the data and compiles it into a single CSV for each monitor. It’s currently setup to download the files in a very similar format to the way the thingspeak download page used to work (primary and secondary A and B channels). I also have it making a files similar to the format that comes off the SD cards. This …

---

_[View the full topic](https://community.purpleair.com/t/r-script-to-retrieve-historical-data/3046)._
