# Wdata **Repository Path**: Wdataorg/Wdata ## Basic Information - **Project Name**: Wdata - **Description**: 一个支持多功能的数据集 Pypi: https://pypi.org/Wdatabase github: https://github.com/Wdataorg/Wdata - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-08-07 - **Last Updated**: 2022-11-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
## Data save
You can use the `Save_file()` function to save data
The syntax of `Save_file` is `Save_file(filename:str, type=JSON) -> None`
Parameter description:
The `filename` 'parameter is used to describe saving a file
The `type` 'parameter is used to describe the file type
The file types are as follows:
|File Type | Usage | Description|
|:---:|:---:|:---:|
|Csv | Wdata. CSV | Save File ` file.csv`|
|Json | Wdata. JSON | Save the file 'file. json' as the default option|
Such as the following code
```python
from Wdata import WdataMain as main
from Wdata import CSV
test=main ('Population_growth ') # Import the Population growth in the past 200 years
test. Save_File ('Package_test ', CSV) # This function will automatically add the. csv suffix
```
# Additional Features
## Cosine similarity function
The cosine similarity function can calculate the cosine similarity of two coordinates in two-dimensional space according to the cosine similarity formula
usage method:
```python
from Wdata import mathfunc
Xy1=(2, 3) # First coordinate
Xy2=(3, 5) # Second coordinate
Result=mathfunc.similarity (xy1, xy2) # Cosine similarity
print(result)
```
## Distance formula
Distance formula Use Euclid distance formula to calculate the distance between two coordinates in two-dimensional space
usage method:
```python
from Wdata import mathfunc
xy1 = (2, 3)
xy2 = (3, 5)
Result=mathfunc.distance (xy1, xy2) # Distance formula
print(result)
```
# What data do we have
Currently we have the following data
| name | description | unit of measure |
|:--------------------------------:|:---------------------:|:---------:|
| Population_growth | Population Growth 1800-2022 | People |
| Chinese_spacecraft | 2017-2020.06 Chinese spacecraft launches | Spacecraft |
| World_spacecraft | 2017-2020.06 World Spacecraft Launches | Spacecraft |
> The above data comes from Bing and Baidu. The author cannot guarantee the accuracy of the data and should not be used for professional purposes
# Donate
Due to special reasons, the author was unable to register a `Paypal` account and was forced to use Alipay
For details, please see [Donation Instructions](https://wdataorg.github.io/Sponsor/)
# About Pypi
The `Wdataorg` team has used `twine` to upload this library to `Pypi`
[Wdataorg Pypi account](https://pypi.org/user/Lucky_Pupil/)
[Wdatabase Pypi warehouse address](https://pypi.org/project/Wdatabase/)
# License
This open source project uses `Apache License 2.0`
In the process of using this open source project, please use it strictly in accordance with the license
The final interpretation right belongs to the development team `Wdataorg`
[Project License Link](https://github.com/Wdataorg/Wdata/blob/main/LICENSE)