Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 06: getTaxonPhotos() * * Write a function to get all sizes of the default photo for each of the identified * species in the

Problem 06: getTaxonPhotos() * * Write a function to get all sizes of the default photo for each of the identified * species in the iNaturalist results data. * * When an observation has been properly identified, it will have a `taxon` * property and value. When it does, one of the properties within `taxon` is * the `default_photo` property, which will look like this: * * default_photo: { * square_url: 'https://static.inaturalist.org/photos/575727/square.jpg', * attribution: '(c) hobiecat, some rights reserved (CC BY-NC)', * flags: [], * medium_url: 'https://static.inaturalist.org/photos/575727/medium.jpg', * id: 575727, * license_code: 'cc-by-nc', * original_dimensions: { width: 1035, height: 1035 }, * url: 'https://static.inaturalist.org/photos/575727/square.jpg?1384377507' * }, * * Each image on iNatrualist is stored in various sizes: small, medium, large, * original, and square (75 x 75 pixels). This is helpful when showing the image * at different sizes, to save on bandwidth when downloading. * * Convert each observation with a `taxon` identification to an Object that looks * like this, using the `default_photo` and its `url` properties: * * { * original: 'https://static.inaturalist.org/photos/575727/original.jpg', * square: 'https://static.inaturalist.org/photos/575727/square.jpg', * small: 'https://static.inaturalist.org/photos/575727/small.jpg', * medium: 'https://static.inaturalist.org/photos/575727/medium.jpg', * large: 'https://static.inaturalist.org/photos/575727/large.jpg', * } * * The URLs all follow the same pattern: * * https://[original-photo-domain]/photos/[photo ID]/[size].jpg * * Your function should return the new Array of photo size URLs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discovering Advanced Algebra An Investigative Approach

Authors: Jerald Murdock, Ellen Kamischke, Eric Kamischke

1st edition

1559539844, 978-1604400069, 1604400064, 978-1559539845

More Books

Students also viewed these Programming questions

Question

Am I buying this in an attempt to satisfy a psychological need?

Answered: 1 week ago

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago

Question

What does non-recourse financing mean?

Answered: 1 week ago