BiologicalRecordsCentre / rYoutheria

Access to YouTheria through R
Other
2 stars 0 forks source link

records #1

Closed ah3881 closed 9 years ago

ah3881 commented 9 years ago

only six records download when you request data

AugustT commented 9 years ago

Can you expand on this? Do you have a reproducible example? Are you using 'head'?

ah3881 commented 9 years ago

Hi Thanks for the quick response. I wanted to download body mass for all species within a certain order (i.e. Chiroptera), when I found order was not an option I tried copying part of the script from the two available pdfs to download all body mass's, (to process in excel)-but after the first six it stops....Any script that would get it to download a decent amount of data (or even better-just an excel sheet with the data) would be greatThanks Alice

Alice C. HughesAssociate ProfessorCentre for Integrative Conservation,Xishuangbanna Tropical Botanical Garden,Chinese Academy of SciencesMenglun, Mengla, Yunnan 666303, P.R. ChinaPh: 15198676559achughes@xtbg.ac.cn

Date: Mon, 3 Nov 2014 01:49:38 -0800 From: notifications@github.com To: rYoutheria@noreply.github.com CC: dr_achughes@hotmail.co.uk Subject: Re: [rYoutheria] records (#1)

Can you expand on this? Do you have a reproducible example? Are you using 'head'?

— Reply to this email directly or view it on GitHub. =

AugustT commented 9 years ago

Hi Alice,

I imagine if you try to extract all data the system may struggle, but only getting 6 is odd. Can you share your code with me?

Tom

AugustT commented 9 years ago

I have tried this:

BM <- getMeasurementData(measurementType = 'Body Mass', silent = FALSE)

And it works fine, returning 23,732 rows of data. Let me know if this does not work for you.

Tom

ah3881 commented 9 years ago

Hi Thanks, I copied it from one of the pdfs, but can't seem to find it right now...Would there be a way of searching by order-as searching species one by one is really tedious for any big study.....at the moment I'm using the 2008 data-as I can use, sort and edit easily in excel.What code should be used to obtain data at anything higher than species level-or to download all the data for any given trait?What would really be most useful would just being able to avoid the R script and download the dataset in excel or txt form, as unless more search options for regions and higher taxonomic groups are available the data won't really be nearly as useful as it could be for studies of more than a limited number of species.....A working R script to download trait data for any given trait, or direct access to the database would be fantastic...Thanks and sorry for any bother caused Alice

Alice C. HughesAssociate ProfessorCentre for Integrative Conservation,Xishuangbanna Tropical Botanical Garden,Chinese Academy of SciencesMenglun, Mengla, Yunnan 666303, P.R. ChinaPh: 15198676559achughes@xtbg.ac.cn

Date: Mon, 3 Nov 2014 03:29:11 -0800 From: notifications@github.com To: rYoutheria@noreply.github.com CC: dr_achughes@hotmail.co.uk Subject: Re: [rYoutheria] records (#1)

Hi Alice,

I imagine if you try to extract all data the system may struggle, but only getting 6 is odd. Can you share your code with me?

Tom

— Reply to this email directly or view it on GitHub. =

ah3881 commented 9 years ago

Thanks-I will try that now, there is a chance that the firewall is doing something odd......Alice

Alice C. HughesAssociate ProfessorCentre for Integrative Conservation,Xishuangbanna Tropical Botanical Garden,Chinese Academy of SciencesMenglun, Mengla, Yunnan 666303, P.R. ChinaPh: 15198676559achughes@xtbg.ac.cn

Date: Mon, 3 Nov 2014 03:39:23 -0800 From: notifications@github.com To: rYoutheria@noreply.github.com CC: dr_achughes@hotmail.co.uk Subject: Re: [rYoutheria] records (#1)

I have tried this:

BM <- getMeasurementData(measurementType = 'Body Mass',

                     silent = FALSE)

And it works fine, returning 23,732 rows of data. Let me know if this does not work for you.

Tom

— Reply to this email directly or view it on GitHub. =

ah3881 commented 9 years ago

This is all that happened, but no data........

local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)+ if(nchar(pkg)) library(pkg, character.only=TRUE)})> BM <- getMeasurementData(measurementType = 'Body Mass',+ Retrieving trait information...completeCasting data...completeRetrieving location information...completeCombining data...complete Alice C. HughesAssociate ProfessorCentre for Integrative Conservation,Xishuangbanna Tropical Botanical Garden,Chinese Academy of SciencesMenglun, Mengla, Yunnan 666303, P.R. ChinaPh: 15198676559achughes@xtbg.ac.cn

Date: Mon, 3 Nov 2014 03:39:23 -0800 From: notifications@github.com To: rYoutheria@noreply.github.com CC: dr_achughes@hotmail.co.uk Subject: Re: [rYoutheria] records (#1)

I have tried this:

BM <- getMeasurementData(measurementType = 'Body Mass',

                     silent = FALSE)

And it works fine, returning 23,732 rows of data. Let me know if this does not work for you.

Tom

— Reply to this email directly or view it on GitHub. =

AugustT commented 9 years ago

Hi Alice,

The data should be stored in the object 'BM'.

If you are more familiar with excel files you can save your R object as a .csv file like this.

BM <- getMeasurementData(measurementType = 'Body Mass', silent = FALSE) write.csv(BM, file = 'myData.csv') # the csv will be saved in your working directory.

We don't have any plans to add searches by Order or Family at this point. You can download the data as spreadsheets from the website after signing up: http://www.utheria.org/

Tom

ah3881 commented 9 years ago

Thanks-the code worked fine! The data on the website only allows download of the 2009 data, and the application would not work when I tried it on a couple of different computers, so thank you for the code.It would be great if you could at least search by genus-as alot of people will probably want to compare traits across a genus-and so being able to extract trait data by genus would probably be a good addition, especially as the data already includes a column for genusAll the very best Alice

Alice C. HughesAssociate ProfessorCentre for Integrative Conservation,Xishuangbanna Tropical Botanical Garden,Chinese Academy of SciencesMenglun, Mengla, Yunnan 666303, P.R. ChinaPh: 15198676559achughes@xtbg.ac.cn

Date: Mon, 3 Nov 2014 04:05:03 -0800 From: notifications@github.com To: rYoutheria@noreply.github.com CC: dr_achughes@hotmail.co.uk Subject: Re: [rYoutheria] records (#1)

Hi Alice,

The data should be stored in the object 'BM'.

If you are more familiar with excel files you can save your R object as a .csv file like this.

BM <- getMeasurementData(measurementType = 'Body Mass', silent = FALSE)

write.csv(BM, file = 'myData.csv') # the csv will be saved in your working directory.

We don't have any plans to add searches by Order or Family at this point. You can download the data as spreadsheets from the website after signing up: http://www.utheria.org/

Tom

— Reply to this email directly or view it on GitHub. =

AugustT commented 9 years ago

Glad you got what you needed, thanks for your feedback, we'll add this search functionality to our 'to-do' list.

Tom