Function
Website api access function
SP2000China.GetFamiliesByFamilyName — FunctionGetFamiliesByFamilyName(;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 typeGetFamiliesByFamilyNameStruct.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.abstractSP2000China.GetSpeciesByFamilyId — FunctionGetSpeciesByFamilyId(;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 typeGetSpeciesByFamilyIdStruct.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.abstractSP2000China.GetSpeciesByScientificName — FunctionGetSpeciesByScientificName(;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 typeGetSpeciesByScientificNameStruct.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.abstractSP2000China.GetSpeciesByCommonName — FunctionGetSpeciesByCommonName(;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 typeGetSpeciesByCommonNameStruct.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.abstractSP2000China.GetSpeciesByNameCode — FunctionGetSpeciesByNameCode(;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 typeGetSpeciesByNameCodeStruct.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.abstractSP2000China.GetNameByKeyword — FunctionGetNameByKeyword(;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 typeGetNameByKeywordStruct.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.abstractNetwork-related tools
SP2000China.Chinese2Latin — FunctionChinese2Latin(;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.FindUnknown — FunctionFindUnknown(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 theChinese2Latinfunction.
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)Local related tools
SP2000China.Latin2GenusSpecies — FunctionLatin2GenusSpecies(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.DfSearch — FunctionDfSearch(;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.StrSearch — FunctionStrSearch(;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.SP2000China — ModuleThe Julia package for obtaining information on the list of biological species, SP2000China.
SP2000China.GetFamiliesByFamilyNameStruct — TypeConstruct a structure to store the results of the function GetFamiliesByFamilyName.
SP2000China.GetSpeciesByFamilyIdStruct — TypeConstruct a structure to store the results of the function GetSpeciesByFamilyId.
SP2000China.GetSpeciesByScientificNameStruct — TypeConstruct a structure to store the results of the function GetSpeciesByScientificName.
SP2000China.GetSpeciesByCommonNameStruct — TypeConstruct a structure to store the results of the function GetSpeciesByCommonName.
SP2000China.GetSpeciesByNameCodeStruct — TypeConstruct a structure to store the results of the function GetSpeciesByNameCode.
SP2000China.GetNameByKeywordStruct — TypeConstruct a structure to store the results of the function GetNameByKeyword.
SP2000China.DfSearchStruct — TypeConstruct a structure to store the results of the function DfSearch.