Skip to content

Commit

Permalink
update ebird api formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnost committed Jan 26, 2024
1 parent b44b0f8 commit f0db67c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions digitalconservation_ebirdapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ First, we introduce eBird. eBird is a citizen science platform for bird species

An API is a standardized, structured set of names and codes that enable the public to access platform data. Most platforms provide an API, though they differ in how much access they provide. For instance, X (formerly Twitter), has an API that allows researchers to search for tweets based on keywords, geographic location, hashtags, and more and to download these without ever actually opening the website and using its search tool.

Each platform's API is unique and what can be accessed how varies. The only way to know is to review the API documentation. eBird's is available here: https://documenter.getpostman.com/view/664302/S1ENwy59 These are often not easy to read unless you have a background in programming as well as extensive familiarity with the platform and its data.
Each platform's API is unique and what can be accessed how varies. The only way to know is to review the API documentation. eBird's is available [here](https://documenter.getpostman.com/view/664302/S1ENwy59). These are often not easy to read unless you have a background in programming as well as extensive familiarity with the platform and its data.

For our purposes, we are interested in observations, so we open the `data/obs` folder and select `Recent observations in a region`. This provides us with the general template we need to follow to access relevant eBird data. The query parameters are variables we can adjust in order to access the exact kind of data we want.

In the following cell of code, we import some code that will help us later (`requests`) and then "call up" the eBird API. Basically what we are doing is using programming to "visit" a website, one that contains the data we want, but in the JSON format. To confirm this is what's happening, try entering the url into a browser.

Note: many APIs require you to create an account first and/or get a "token" (password). This may be separate from your platform account. To access eBird's data through its API, you will need to get an API token. You can do so here: https://secure.birds.cornell.edu/cassso/login?service=https%3A%2F%2Febird.org%2Flogin%2Fcas%3Fportal%3Debird&locale=en_US
Note: many APIs require you to create an account first and/or get a "token" (password). This may be separate from your platform account. To access eBird's data through its API, you will need to get an API token. You can do so [here](https://secure.birds.cornell.edu/cassso/login?service=https%3A%2F%2Febird.org%2Flogin%2Fcas%3Fportal%3Debird&locale=en_US).

```
import requests
Expand All @@ -33,7 +33,7 @@ url = "https://api.ebird.org/v2/data/obs/KZ/recent"
payload={}
headers = {
'X-eBirdApiToken': 'hr892h2c8264' # Replace {{x-ebirdapitoken}} with your API token
'X-eBirdApiToken': '{{x-ebirdapitoken}}' # Replace {{x-ebirdapitoken}} with your API token
}
response = requests.request("GET", url, headers=headers, data=payload)
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: default
title: Welcome!

---
I research how data technologies inform environmental governance. New kinds of data-generating sensors and data-synthesizing algorithms are becoming central to everyday life and may prove transformational in policy too. A key challenge for geographers in the coming years is assessing these technologies’ promise to help society solve sustainability issues related to food security, climate change adaptation, and ecosystem services conservation. This will be done by understanding their human dimensions - their design, use, maintenance, and effects on society - alongside other governance trends such as marketization and metrification. It will involve understanding how these data systems came but also experimenting with them towards more just and equitable ends.
I research how data technologies inform environmental governance. New kinds of data-generating sensors and data-synthesizing algorithms are becoming central to everyday life and may prove transformational in policy too. A key challenge for geographers in the coming years is assessing these technologies’ promise to help society solve sustainability issues related to food security, climate change adaptation, and ecosystem services conservation. This will be done by understanding their human dimensions - their design, use, maintenance, and effects on society - alongside other governance trends such as marketization and metrification. It will involve understanding how these data systems came to be but also experimenting with them towards more just and equitable ends.

My work contributes to the field of political ecology and is currently supported by SSHRC funding. I teach undergraduate courses in nature-society geography and mapping as well as graduate courses in research methods and in Guelph's Master of Conservation Leadership program. I serve on the coordinating committee of the [Environmental Data and Governance Initiative](https://www.envirodatagov.org) (EDGI), where we [bring people together to analyze publicly available socio-environmental data](https://www.environmentalenforcementwatch.org/) and track the portrayal of climate change issues on the web.

Expand Down

0 comments on commit f0db67c

Please sign in to comment.