Function

Website api access function

SP2000China.GetFamiliesByFamilyNameFunction

GetFamiliesByFamilyName(;family_name::String,api_key::String,page::Int=1)

Description

  • Query by family name and return a collection of family IDs.

Parameters

  • family_name: The family name, or a part of it, supporting both Latin and Chinese names.

  • api_key: The API service key for registered users.

  • page: The page number, an integer not less than 1. If not provided, it defaults to 1.

Results

  • result: A structure of type GetFamiliesByFamilyNameStruct.

  • result.data: Dictionary converted from JSON information.

  • result.count: Total number of matches.

  • result.page: Current data page.

  • result.limit: Number of items displayed per page.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_family_name = "Coriariaceae";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = GetFamiliesByFamilyName(family_name=your_family_name,api_key=your_api_key,page=your_page);
result.data
result.count
result.page
result.limit
result.abstract
SP2000China.GetSpeciesByFamilyIdFunction

GetSpeciesByFamilyId(;family_id::String,api_key::String,page::Int=1)

Description

  • Query species by family ID and return a list of species.

Parameters

  • family_id:The family ID, a unique value.

  • api_key:The API service key for registered users.

  • page:The page number, an integer not less than 1. Defaults to 1 if not provided.

Results

  • result: A structure of type GetSpeciesByFamilyIdStruct.

  • result.data: Dictionary converted from JSON information.

  • result.count: Total number of matches.

  • result.page: Current data page.

  • result.limit: Number of items displayed per page.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_family_id = "F20171000000291";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = GetSpeciesByFamilyId(family_id=your_family_id,api_key=your_api_key,page=your_page);
result.data
result.count
result.page
result.limit
result.abstract
SP2000China.GetSpeciesByScientificNameFunction

GetSpeciesByScientificName(;scientific_name::String,api_key::String,page::Int=1)

Description

  • Query by scientific name and return species IDs.

Parameters

  • scientific_name:The scientific name, or a part of it, supporting both Latin and Chinese names.

  • api_key: The API service key for registered users.

  • page: The page number, an integer not less than 1. If not provided, it defaults to 1.

Results

  • result: A structure of type GetSpeciesByScientificNameStruct.

  • result.data: Dictionary converted from JSON information.

  • result.count: Total number of matches.

  • result.page: Current data page.

  • result.limit: Number of items displayed per page.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_scientific_name = "Actinidia arg";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = GetSpeciesByScientificName(scientific_name=your_scientific_name,api_key=your_api_key,page=your_page);
result.data
result.count
result.page
result.limit
result.abstract
SP2000China.GetSpeciesByCommonNameFunction

GetSpeciesByCommonName(;common_name::String,api_key::String,page::Int=1)

Description

  • Query by common name and return species or subspecies information.

Parameters

  • common_name: The common name, or a part of it.

  • api_key: The API service key for registered users.

  • page: The page number, an integer not less than 1. If not provided, it defaults to 1.

Results

  • result: A structure of type GetSpeciesByCommonNameStruct.

  • result.data: Dictionary converted from JSON information.

  • result.count: Total number of matches.

  • result.page: Current data page.

  • result.limit: Number of items displayed per page.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_common_name = "土人参";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = GetSpeciesByCommonName(common_name=your_common_name,api_key=your_api_key,page=your_page);
result.data
result.count
result.page
result.limit
result.abstract
SP2000China.GetSpeciesByNameCodeFunction

GetSpeciesByNameCode(;name_code::String,api_key::String)

Description

  • Retrieve detailed information based on the species ID.

Parameters

  • name_code: The species ID.

  • api_key: The API service key for registered users.

Results

  • result: A structure of type GetSpeciesByNameCodeStruct.

  • result.data: Dictionary converted from JSON information.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_name_code = "1ac19d0d82d84dd2900d51a742fa9296";
your_api_key = "Please register an account and obtain an API key";
result = GetSpeciesByNameCode(name_code=your_name_code,api_key=your_api_key);
result.data
result.abstract
SP2000China.GetNameByKeywordFunction

GetNameByKeyword(;keyword::String,api_key::String,page::Int=1)

Description

  • Search for name information based on a keyword.

Parameters

  • keyword: The name keyword (at least 2 characters).

  • api_key: The API service key for registered users.

  • page: The page number, an integer not less than 1. If not provided, it defaults to 1.

Results

  • result: A structure of type GetNameByKeywordStruct.

  • result.data: Dictionary converted from JSON information.

  • result.count: Total number of matches.

  • result.page: Current data page.

  • result.limit: Number of items displayed per page.

  • result.abstract: Refined data frame.

Example

using SP2000China;
your_keyword="柳莺";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = GetNameByKeyword(keyword=your_keyword,api_key=your_api_key,page=your_page);
result.data
result.count
result.page
result.limit
result.abstract
SP2000China.Chinese2LatinFunction

Chinese2Latin(;chinese_data::DataFrame,col_name::String,api_key::String,page::Int=1)

Description

  • Based on the species Chinese name column provided by the data frame, batch query the scientific names.

Parameters

  • chinese_data: The data frame containing the species' Chinese names.

  • col_name: The name of the column in the data frame where the Chinese names are located.

  • api_key: The API service key for registered users.

  • page: The page number, an integer not less than 1. If not provided, it defaults to 1.

Results

  • result: The data frame that summarizes the basic information after batch querying the Chinese names, with unknown displayed for content that could not be queried.

Example

using SP2000China;
using DataFrames;
chinese_names = ["黄顶菊", "匙叶合冠鼠曲", "爵床", "菖蒲", "慈姑", "野慈姑"];
sampling_point = ["西藏", "四川", "江苏", "湖北", "广东", "浙江"];
your_chinese_data = DataFrame(中文名=chinese_names, 采样点=sampling_point);
println(your_chinese_data)
your_col_name = "中文名";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
result = Chinese2Latin(chinese_data=your_chinese_data,col_name=your_col_name,api_key=your_api_key,page=your_page);
println(result)
SP2000China.FindUnknownFunction

FindUnknown(all_df::DataFrame)

Description

  • Filter out species that were not found in the search from the table.

Parameters

  • all_df: The result after processing by the Chinese2Latin function.

Results

  • result: Species that could not be matched in the database are filtered out. Considerations may need to be made for common names and other factors.

Example

using SP2000China;
using DataFrames;
chinese_names = ["黄顶菊", "匙叶合冠鼠曲", "爵床", "菖蒲", "慈姑", "野慈姑"];
sampling_point = ["西藏", "四川", "江苏", "湖北", "广东", "浙江"];
your_chinese_data = DataFrame(中文名=chinese_names, 采样点=sampling_point);
println(your_chinese_data)
your_col_name = "中文名";
your_api_key = "Please register an account and obtain an API key";
your_page = 1;
all_df = Chinese2Latin(chinese_data=your_chinese_data,col_name=your_col_name,api_key=your_api_key,page=your_page);
println(all_df)
result = FindUnknown(all_df);
println(result)
SP2000China.Latin2GenusSpeciesFunction

Latin2GenusSpecies(latin_text::String)

Description

  • Converts a Latin scientific name to an abbreviated form containing only the genus and species names.

Parameters

  • latin_text: Latin scientific name.

Results

  • genus_species: Abbreviated form containing only the genus and species names.

Example

using SP2000China;
latin_text = "Cotinus coggygria var. pubescens Engl.";
genus_species = Latin2GenusSpecies(latin_text);
println(genus_species)
SP2000China.DfSearchFunction

DfSearch(;search_data::DataFrame,search_col::String,source_data::DataFrame,source_col::String)

Description

  • Searches for species based on a local database.

Parameters

  • search_data: The DataFrame that needs to be searched.

  • search_col: The column name in the search DataFrame to look for.

  • source_data: The DataFrame of local data.

  • source_col: The column name in the local data DataFrame to look for.

Results

  • result: The merged search results.

Example

using SP2000China;
using SP2000ChinaData;
chinese_names = ["黄顶菊", "虚构植物", "爵床", "菖蒲", "慈姑", "野慈姑"];
sampling_points = ["西藏", "四川", "江苏", "湖北", "广东", "浙江"];
your_search_data = DataFrame(中文名=chinese_names, 采样点=sampling_points);
your_source_data = Plantae();
your_search_col = "中文名";
your_source_col = "物种中文名";
result = DfSearch(search_data=your_search_data,search_col=your_search_col,source_data=your_source_data,source_col=your_source_col);
println(result.matched)
println(result.unmatched)
SP2000China.StrSearchFunction

StrSearch(;search_str::String,source_data::DataFrame,source_col::String)

Description

  • Searches for species based on a local database.

Parameters

  • search_str: The string that needs to be searched.

  • source_data: The DataFrame of local data.

  • source_col: The column name in the local data DataFrame to look for.

Results

  • result: The merged search results.

Example

using SP2000China;
using SP2000ChinaData;
your_search_str = "鬼针草";
your_source_data = Plantae();
your_source_col = "物种中文名";
result = StrSearch(search_str=your_search_str,source_data=your_source_data,source_col=your_source_col);
println(result)

Other

SP2000China.SP2000ChinaModule

The Julia package for obtaining information on the list of biological species, SP2000China.