Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example get data script #9

Open
kgarwoodsdzwa opened this issue Jul 5, 2023 · 0 comments
Open

Example get data script #9

kgarwoodsdzwa opened this issue Jul 5, 2023 · 0 comments
Assignees

Comments

@kgarwoodsdzwa
Copy link
Collaborator

As we are logging data to Earthranger, such as with the temperature sensors, we need to have a way to access that data in a way that is useful. Currently, there are two active temperature sensors on the BDR. They are ideally sending updates every 20 minutes. The data is contained in Observations (if you're looking at the map, it's the historical data) for each temperature sensor, so you'll have to perform an http request get for all that info. Your task would be to create an example script that allows a user to get the last weeks worth of temperature sensor data from all of their temperature sensors with timestamps. There is a lot of unecessary information included in the "get" so you'll need to parse through the resulting json and specifically call for certain parts of it. It would be good if the data was output into a csv.

Somewhat of a higher level goal, for now you can just try and tackle this ^^, but if you have extra time or finish, it would be nice if this script could also check for missing pings of data. They're meant to receive pings every 20 minutes, but this doesn't always happen. It would be nice if this script could check and see that each observation was in fact 20 minutes after each other, and if not, have it noted somehow in the csv. Two ways I can think of doing this are getting the last week's date range of temperature readings and checking if you have the correct amount, or checking the time between readings and ensure it's incrementing by no more than 20 minutes (you might want to convert the time into a different format for this).

This script should be created in a new branch specifically to address this issue, and the code should pass flake8 and pylint linting protocols.

@oimahawong oimahawong self-assigned this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants