This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lähde: | |
Talvilintulaskenta - http://tun.fi/HR.39 [metadata], Creative Commons Nimeä | |
Aineistolataus Lajitietokeskuksesta http://tun.fi/HBF.59676 | |
id yearDecember WBC.sorbusBerriesAtCensus | |
http://tun.fi/JX.100009 1990 1 | |
http://tun.fi/JX.100131 1990 1 | |
http://tun.fi/JX.100396 1990 1 | |
http://tun.fi/JX.100605 1990 1 | |
http://tun.fi/JX.100902 1990 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code courtesy of William Morris | |
# Requires setting your personal token, and installing this: | |
# apt-get install libcurl4-openssl-dev libssl-dev | |
install.packages("finbif") | |
install.packages("ggplot2") | |
library(finbif) | |
library(ggplot2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pandas as pd | |
import datetime | |
import re | |
def get_datafile_list(directory, limit): | |
datafile_list = [] | |
objects = os.listdir(directory) | |
i = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os import listdir | |
from PIL import Image | |
# get the path/directory | |
source_dir = "images/Carpocoris_fuscispinus" | |
target_dir = "images/carp_fusc_crop" | |
limit = 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Script to download sound files from iNaturalist. | |
Mikko Heikkinen / Luomus, 2023-02-06 | |
Requires "requests" library. | |
input: iNat API URL with parameters | |
output: files divided into folders by taxon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates small maps of Finland with a dot at given coordinates. | |
import geopandas as gpd | |
import matplotlib.pyplot as plt | |
from pyproj import Proj, transform | |
# Load a GeoJSON file with outline of Finland into a GeoDataFrame | |
geojson = gpd.read_file('fin.geojson') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 13 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fid;common_name_finnish;count;unique;min;max;range;sum;mean;median;stddev;minority;majority;q1;q3;iqr | |
187;tulipäähippiäinen;1;1;255,7875214;255,79;0,00;255,79;255,79;255,79;0,00;255,79;255,7875214;255,79;255,79;0,00 | |
201;puukiipijät;1;1;235,3859253;235,39;0,00;235,39;235,39;235,39;0,00;235,39;235,3859253;235,39;235,39;0,00 | |
222;hömötiainen × lapintiainen;1;1;210,9716034;210,97;0,00;210,97;210,97;210,97;0,00;210,97;210,9716034;210,97;210,97;0,00 | |
175;pikkusieppo;29;29;79,25;303,37;224,11;5629,43;194,12;185,46;64,38;79,25;79,25;148,34;245,10;96,77 | |
180;kanahaukka (alalaji gentilis);1;1;165,2255707;165,23;0,00;165,23;165,23;165,23;0,00;165,23;165,2255707;165,23;165,23;0,00 | |
195;idänuunilintu;13;13;9,39;293,14;283,74;2079,52;159,96;175,33;79,21;9,39;9,39;104,69;209,42;104,73 | |
8;hippiäinen;376;359;0,00;354,92;354,92;54432,47;144,77;142,78;77,85;0,67;0,00;94,62;193,35;98,73 | |
82;peukaloinen;353;347;0,00;357,88;357,88;50821,14;143,97;144,19;76,40;0,02;0,00;90,73;198,19;107,46 | |
69;sirittäjä;190;188;0,00;318,41;318,41;27312,49 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Load the csv file | |
df = pd.read_csv('rows_HBF.75704.tsv', sep='\t') | |
# Remove those without a day of year | |
df = df.dropna(subset=['Gathering.Conversions.DayOfYearBegin']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from sklearn.preprocessing import MinMaxScaler | |
rarity_threshold = 100 | |
# Read datafile that has number of observations for each species | |
df = pd.read_csv('species_rarity.csv', sep='\t') |