Upload .csv file | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Upload .csv file
No permission to create posts
February 4, 2019
12:32 pm
Avatar
noequus0
New Member
Members
Forum Posts: 3
Member Since:
February 4, 2019
sp_UserOfflineSmall Offline

Newbie here. I have tried everything I can think of but have been unable to successfully upload a csv file for a channel. Perhaps someone here can help me. Here's the simple case (the column names match those in the channel):

datetime,Temp,RH,Pressure
2018-01-29T21:00:19-08:00,75.4,31,1002.4
2018-01-29T22:00:26-08:00,75.7,33,1002.4

But when I download it I get (copied from excel):

created_at entry_id field1 field2 field3 field4
2018-01-30 05:00:19 UTC 1
2018-01-30 06:00:26 UTC 2

1) not clear to me why the fields did not get ingested properly.
2) It ignored the timezone in datetime. (I had also selected the timezone in the timezone field available on the upload screen but it also was ignored).

Additionally, when I try to upload the full csv file (240 records) it fails saying the datetime values are not unique (but in fact there are no duplicate values, confirmed with excel).

So, clearly, I am missing several things...Any suggestions will be much appreciated.

February 4, 2019
5:23 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 610
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

The present upload system does not support your own field value names. Use the same ones you get from the download "created_at entry_id field1 field2 field3 field4"
That should also solve the duplicate timestamps and timezones problem, let us know if you still have trouble with the timestamps.

February 4, 2019
9:14 pm
Avatar
noequus0
New Member
Members
Forum Posts: 3
Member Since:
February 4, 2019
sp_UserOfflineSmall Offline

Thank you, cstapels--that got me started and I was able ingest the file. Much appreciated. Am I looking in the wrong place for documentation (mostly, here: https://www.mathworks.com/help/thingspeak/channel-data-import.html plus what google can find for me)?

In any case, with the successful ingest I can see the data displayed in the Channel Stats graphs. But I don't see a way to adjust the size of the temporal window. Its about 10days of hourly data but only about two days is shown and I could not figure out how to expand the window size. Is that documented somewhere? Or...is that just not what the Channel Stats are for?

Thanks for any advice.

February 5, 2019
3:17 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 610
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Yes this is the doc:
https://www.mathworks.com/help/thingspeak/index.html
Also you can find help here in the forum and sometimes out on the wild wild web, but that stuff can be outdated too.
Please please provide any feedback of what might make the doc more helpful to you. I know a guy who works on it. You can fill out the survey at the bottom of the page or submit something to the forum or even send me an email at my user name on the forum "at" mathworks.com.

Your plot is limited to 8000 points, but that should get you more than two days. Use the pencil icon on your chart to change the settings See
https://www.mathworks.com/help/thingspeak/channel-chart-settings.html

You can also use the charts API to develop custom plots
https://www.mathworks.com/help/thingspeak/createchart.html

Or MATLAB to develop custom MATLAB plots.
https://www.mathworks.com/help/thingspeak/visualize-data.html
https://www.mathworks.com/products/matlab/plot-gallery.html

Let me know if that helps!

February 5, 2019
9:09 pm
Avatar
noequus0
New Member
Members
Forum Posts: 3
Member Since:
February 4, 2019
sp_UserOfflineSmall Offline

Thanks for this--very helpful. The "results" option did display all the data; I was not able to get the "days" option to work--just resulted in an empty graph. Not clear why.

I also started playing with MATLAB visualizations a bit. These will be very useful.

Really appreciate your help. And yes, happy to provide feedback and will do so. Thanks again.

February 6, 2019
7:55 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 610
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

'Days' is elapsed time backwards from now. If you did not have recent data in your channel, or had recent data and old data, the output might not be what you hoped for. You can use the 'start' and 'end' with the charts control or 'daterange' with thingSpeakRead in MATLAB to get the most accurate date control. If the output still is confusing, please share your channel data or channel number (if public) and I can take a look at it.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

adeeeban, theweddingties, Vasant Gosai, pavithra, shivaniprakash, Akeyan

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457