Our Did You Know series brings some of Initial State’s amazing features to attention while giving tips and tricks on how to make the most of them.
Did you know that you can append data to the same dataset from anywhere? Want to be able to stop and start your script repeatedly but see all the data in the same place? Want to compare data from two (or more!) different devices? Want to run multiple scripts that all feed into the same dataset?
Well now you can, and all it takes is one more parameter:
streamer = Streamer(bucket_name="Sensor Stream", bucket_key="three_sensors", access_key="[Your Access Key Here]")
The bucket_name is what name the dataset will appear with in the shelf. It will be the name designated in the first script you run with that bucket_key, so it doesn’t matter what the bucket_name is in any scripts run with the same bucket_key afterwards. So if the script with the previous streamer statement is run first, and then a script with
streamer = Streamer(bucket_name="Temperature Sensor", bucket_key="three_sensors", access_key="[Your Access Key Here]")
and a script with
streamer = Streamer(bucket_name="Humidity Sensor", bucket_key="three_sensors", access_key="[Your Access Key Here]")
are run, data from all three scripts/devices will appear in the same bucket/dataset called “Sensor Stream”.
The access_key tells the data which account to go to, and the bucket_key tells the data which dataset to go to.
Just like that, you have even more control over how you see and interact with your data!
Want to stream data from multiple devices into one easy-to-understand visualization? Try us for free!