Platform
Resources
Pricing
Sign in
Get started
robin-song
Workspace
Fork
Published
By
robin-song
Edited
May 20, 2022
Fork of
iNaturalist API Example #2
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
endpoint
=
(
{
description
:
'v1 Observations Species Counts'
,
method
:
'GET'
,
baseURL
:
'https://api.inaturalist.org/v1/observations/species_counts'
,
docURL
:
'https://api.inaturalist.org/v1/docs/#!/Observations/get_observations_species_counts'
,
}
)
Insert cell
// Target a 1 sec (1000 ms) delay between requests, to remain below iNaturalist's API request limits.
// For more info, see API Recommended Practices
apiRequestDelay
=
1000
Insert cell
// These are example parameter strings.
// You could also save your own set of strings here for easy future reference.
exampleParams
=
[
{
string
:
'quality_grade=needs_id&taxon_id=47126'
,
description
:
'plant observations needing ID'
}
,
{
string
:
'year=2020&verifiable=true'
,
description
:
'verifiable observations in 2020'
}
,
]
Insert cell
// Normally, actions would be triggered with each keystroke in a standard input box.
// This provides a way for the entire set of parameters to be typed in before taking any action.
// An alternative to using an input box like this would be to just set the string as a cell value.
import
{
formWithSubmit
}
from
"@forresto/form-input-with-submit"
Insert cell
// used for displaying data in a table
import
{
table
}
from
"@tmcw/tables/2"
Insert cell
// used for charts and graphs
import
{
vl
}
from
"@vega/vega-lite-api"
Insert cell
// used as the basic choropleth template
import
{
UsStateChoropleth
,
namemap
,
Legend
}
from
"@d3/state-choropleth"
Insert cell
// library used for color scale
d3
=
require
(
"d3@6"
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
arrayParams
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
input
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
apiResponse
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
key
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
simpleBar
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
resultsTable
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
endpoint
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
apiRequestDelay
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
exampleParams
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML