Returns a vector of counts for every field entry for a given neuromorpho neuron field. E.g. you can find out how many neurons there are in the neuromorpho.org repository for each species it has data on.

neuromorpho_field_counts(
  field = "species",
  neuromorpho_url = "http://neuromorpho.org",
  ...
)

Arguments

field

a valid neuron field, as returned by neuromorpho_fields

neuromorpho_url

the base URL for querying the neuromorpho database, defaults to http://neuromorpho.org

...

methods passed to neuromorpho_async_req, or in some cases, neuromorphr:::neuromorpho_fetch

Details

All the data fields, and their entries, can be seen and explored on neuromorpho.org at http://neuromorpho.org/MetaData.jsp. Counts can be seen as pie charts under the 'browse' tab at http://neuromorpho.org, for example, http://neuromorpho.org/byspecies.jsp.

Examples

if (FALSE) {
# Get counts for the number of neurons the repository has, by species
species.count = neuromorpho_field_counts(field = "species")
species.count.sorted = sort(species.count,decreasing=TRUE)
species.count.top = c(species.count.top[1:7], 
                      sum(species.count.sorted[8:length(species.count.sorted)]))
names(species.count.top)[length(species.count.top)] = "other"

# Plot
pie(x=species.count.top, labels = names(species.count.top), 
    main="neuron morphologies from different species")

}