Documentation
¶
Overview ¶
Package ebird provides helper functions for working with eBird data.
Index ¶
Constants ¶
const PositionalAccuracy = 1000 // meters
PositionalAccuracy is the default positional accuracy in meters that we use for eBird observations. This is intended to serve as an approximation of the radius of a typical eBird hotspot.
Variables ¶
This section is empty.
Functions ¶
func DownloadMLAsset ¶
DownloadMLAsset downloads the photo or sound with the provided ML asset ID (numbers only) and returns the local filename and whether it's a photo. This file is temporary and may be deleted at any time.
Since the ML asset ID doesn't indicate whether this is a photo or sound file, we try downloading the photo file first, and if it's not there, we try downloading the sound file.
Types ¶
type ObservationID ¶
type ObservationID struct {
// Submission ID is the eBird checklist ID, including leading "S".
// Example: "S193523301"
SubmissionID string
// ScientificName examples:
// - "Struthio camelus"
// - "Cairina moschata (Domestic type)"
// - "Anas platyrhynchos x rubripes"
// - "Aythya marila/affinis"
// - "Melanitta sp."
ScientificName string
}
ObservationID identifies a unique eBird observation as a submission ID and eBird's scientific name. EBird's scientific names may differ from iNaturalist's taxa in various ways, notably for "slashes" and "spuhs".
func (ObservationID) String ¶
func (o ObservationID) String() string
func (ObservationID) Valid ¶
func (o ObservationID) Valid() bool
Valid returns whether this observation ID has all fields set.
type Record ¶
type Record struct {
Line int // line in the CSV file
SubmissionID string
CommonName string
ScientificName string
TaxonomicOrder string
Count string // "X" or integer
StateProvince string
County string
LocationID string
Location string
Latitude string
Longitude string
Date string // YYYY-MM-DD
Time string // 07:00 AM
Protocol string
DurationMin string
AllObsReported string // "1" means yes
DistanceTraveledKm string
AreaCoveredHa string
NumberOfObservers string
BreedingCode string
ObservationDetails string
ChecklistComments string
MLCatalogNumbers string
}
Record contains the fields in MyEBirdData.csv records.
func (Record) ObservationID ¶
func (r Record) ObservationID() ObservationID
func (Record) Observed ¶
Observed returns the observation time for this record. The record always includes the date but might not include the time. The date and time formats vary between users for reasons I don't understand.