{"id":17972406,"url":"https://github.com/wdataorg/wdata","last_synced_at":"2026-03-07T00:30:58.561Z","repository":{"id":39894170,"uuid":"503967096","full_name":"Wdataorg/Wdata","owner":"Wdataorg","description":"A database with multiple data sets that support drawing,  These data sets are: World population data set, World Carbon dioxide Concentration data set, World Number of Cities data set, China number of population data set, China number of space vehicles data set......","archived":false,"fork":false,"pushed_at":"2022-12-28T09:40:40.000Z","size":337,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T07:44:23.000Z","etag":null,"topics":["chinese","data","database","pip","pypi","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wdataorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CodeOwners","security":null,"support":null},"funding":{"custom":"https://wdataorg.github.io/Sponsor/"}},"created_at":"2022-06-16T01:01:30.000Z","updated_at":"2024-08-12T20:24:11.000Z","dependencies_parsed_at":"2023-01-31T06:15:47.169Z","dependency_job_id":null,"html_url":"https://github.com/Wdataorg/Wdata","commit_stats":null,"previous_names":[],"tags_count":10,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wdataorg%2FWdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wdataorg%2FWdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wdataorg%2FWdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wdataorg%2FWdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wdataorg","download_url":"https://codeload.github.com/Wdataorg/Wdata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245462969,"owners_count":20619586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","data","database","pip","pypi","python3"],"created_at":"2024-10-29T16:14:39.402Z","updated_at":"2026-03-07T00:30:58.484Z","avatar_url":"https://github.com/Wdataorg.png","language":"Python","funding_links":["https://wdataorg.github.io/Sponsor/"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \n\u003cimg src=\"https://raw.githubusercontent.com/Wdataorg/Wdata/main/.github/logo.svg\" height=200/\u003e\n \n[![Issues](https://img.shields.io/github/issues/Wdataorg/Wdata?style=for-the-badge\u0026color=yellogreen)](https://github.com/Wdataorg/Wdata/issues)\n[![Forks](https://img.shields.io/github/forks/Wdataorg/Wdata?style=for-the-badge\u0026color=orange)](https://github.com/Wdataorg/Wdata/network/members)\n![Stars](https://img.shields.io/github/stars/Wdataorg/Wdata?style=for-the-badge\u0026color=yellowgreen)\n[![License](https://img.shields.io/github/license/Wdataorg/Wdata?style=for-the-badge\u0026color=red)](https://shiro.apache.org/license.html) \n[![Commits](https://img.shields.io/github/commit-activity/m/Wdataorg/Wdata?label=commits\u0026style=for-the-badge\u0026color=blue)](https://github.com/Wdataorg/Wdata/commits \"Commit History\")\n [![Release version](https://img.shields.io/github/v/release/Wdataorg/Wdata?color=brightgreen\u0026label=Download\u0026style=for-the-badge)](#release-files \"Release\")\n \n [简体中文](https://github.com/Wdataorg/Wdata/tree/main/README_SimpleChinese.md)\n\n\n\u003c/div\u003e\n\n- [Function introduction](#Features)\n- [download](#Download)\n- [use](#Use)\n    - [Get data](#Get-data)\n    - [import data](#Import-data)\n    - [drawing](#Drawing)\n    - [Data save](#Data-save)\n- [Additional Features](#Additional-Features)\n    - [Cosine similarity function](#Cosine-similarity-function)\n    - [Distance formula](#Distance-formula)\n- [What data do we have](#What-data-do-we-have)\n- [Donation](#Donate)\n- [About Pypi](#About-Pypi)\n- [license](#License)\n\n# Features\n\nThis project is a dataset with multiple functions, there are many datasets in it, and it has been uploaded to Pypi.\n\n\n\n# Download\nThis project uses Pypi, so it is recommended to use Pypi to download\nThere are some dependent libraries, please paste the following code into the terminal\n\n```\npip3 install simplejson\npip3 install openpyxl\npip3 install matplotlib\npip3 install setuptools\n```\nCode: `pip3 install Wdatabase`\n\n# Use\n\nThe package name when we upload is not the same as the package name used in actual use\nWhen importing, use the following code\n\n````python\nfrom Wdata import WdataMain as main\n````\nThe main class has the following functions:\n\n| Functions | Introduction |       Syntax       | Return Type |\n|:---------:|:------------:|:------------------:|:-----------:|\n|   draw    |    Draw      |      Func()        |    None     |\n| Save_file |  Save file   | Func(filename:str, type='json', Sheet='Data', RowOrColumn=True)                 |    bool     |\n## Import Data\nWdata has a lot of data sets, here we use 200 years of population growth data as an example\n\nThe syntax of Wdata_class is as follows:\n`WdataMain(json_fname: str)`\n\n`json_fname` is the name of the dataset\n\n````python\nfrom Wdata import WdataMain as main\n\ntest = main('Population_growth')  # import population growth over 200 years\n````\n\n## Get data\nWe can use the `dict()` function to fetch the data\n\nsuch as these codes\n\n````python\nfrom Wdata import WdataMain as main\n\ntest = main('Population_growth')  # import population growth over 200 years\nprint(dict(test))\n````\n\nafter running\n```shell\n~/python test.py\n{\n    '1800': 900000000,\n    '1820': 1100000000,\n    '1840': 1200000000,\n    '1860': 1300000000,\n    '1880': 1400000000,\n    '1900': 1650000000,\n    '1920': 1800000000,\n    '1940': 2200000000,\n    '1960': 3000000000,\n    '1980': 4400000000,\n    '2000': 5900000000,\n    '2022': 7400000000\n    }\n````\n## Drawing\nDrawing functions use the `draw()` function\nas the following code\n\n````python\nfrom Wdata import WdataMain as main\n\ntest = main('Population_growth')  # import population growth over 200 years\ntest.draw()\n````\nThe result is this\n\u003cimg src=\"https://raw.githubusercontent.com/Wdataorg/Wdata/main/img/draw_pop.jpg\"\u003e\u003c/img\u003e\n\n## Data save\nYou can use the `Save_file()` function to save data\n\nThe syntax of `Save_file` is `Save_file(filename:str, type=JSON, Sheet='Data',RowOrColumn=True) -\u003e None`\n\nParameter description:\nThe `filename` 'parameter is used to describe saving a file\nThe `type` 'parameter is used to describe the file type\n`Sheet` only takes effect when saving a `.xlsx` file, representing a saved worksheet\n\n`RowOrColumn` only takes effect when saving a `.xlsx` file, indicating the saved format\nThe file types are as follows:\n\n|File Type | Usage | Description|\n|:---:|:---:|:---:|\n|Csv | Wdata.CSV | Save File ` file.csv`|\n|Json | Wdata.JSON | Save the file `file. json` as the default option|\n|XLSX|Wdata.XLSX|Save File `file.xlsx`|\n\nSuch as the following code\n\n```python\nfrom Wdata import WdataMain as main\ntest = main('Population_growth') \ntest. Save_file('Package_test') # Default option\n```\n\nSave the code for the `CSV` file\n\n```python\nfrom Wdata import WdataMain as main\nfrom Wdata import XLSX\ntest = main('Population_growth') # Population growth over the past 200 years\ntest. Save_file('Package_test', CSV) # The function automatically adds .csv suffix\n```\n\nSaving `.xlsx` files uses the `Sheet` and `RowOrColumn` parameters\n\n`Sheet` means save cell, which defaults to `Data`\n\n`RowOrColumn` means saved form, defaulting to `True`\n\n```python\nfrom Wdata import WdataMain as main\nfrom Wdata import XLSX\ntest = main('Population_growth') # Population growth over the past 200 years\ntest. Save_file('Package_test', XLSX) # This function automatically adds .xlsx suffix\n# test. Save_file('Package_test', XLSX, RowOrColumn=False) This code is saved as a column\n```\n\nWhen `RowOrColumn` is `True`, the saved form looks like this\n\n| 1820 |1840 | 1860 | 1880 | 1900 | 1920 | 1940 |1960|1980 | 2000 |2022|\n|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n|1100000000|1200000000|1300000000|1400000000|1650000000|1800000000|2200000000|3000000000|4400000000|5900000000|7400000000|\n\nOn the contrary, it is like this\n\n| 1820 | 1100000000 | \n|:---:|:---:|\n|1840 |1200000000|\n|1860|1300000000|\n|1880|1400000000|\n|1900|1650000000|\n|1920|1800000000|\n|1940|2200000000|\n|1960|3000000000|\n|1980|4400000000|\n|2000|5900000000|\n|2022|7400000000|\n# Additional Features\n## Cosine similarity function\nThe cosine similarity function can calculate the cosine similarity of two coordinates in two-dimensional space according to the cosine similarity formula\nusage method:\n```python\nfrom Wdata import mathfunc\nXy1=(2, 3) # First coordinate\nXy2=(3, 5) # Second coordinate\nResult=mathfunc.similarity (xy1, xy2) # Cosine similarity\nprint(result)\n```\n## Distance formula\nDistance formula Use Euclid distance formula to calculate the distance between two coordinates in two-dimensional space\nusage method:\n```python\nfrom Wdata import mathfunc\nxy1 = (2, 3)\nxy2 = (3, 5)\nResult=mathfunc.distance (xy1, xy2) # Distance formula\nprint(result)\n```\n\n# What data do we have\nCurrently we have the following data\n\n| name | description | unit of measure |\n|:--------------------------------:|:---------------------:|:---------:|\n| Population_growth | Population Growth 1800-2022 | People |\n| Chinese_spacecraft | 2017-2020.06 Chinese spacecraft launches | Spacecraft |\n| World_spacecraft | 2017-2020.06 World Spacecraft Launches | Spacecraft |\n\u003e 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\n\n# Donate\nDue to special reasons, the author was unable to register a `Paypal` account and was forced to use Alipay\n\nFor details, please see [Donation Instructions](https://wdataorg.github.io/Sponsor/)\n\n# About Pypi\nThe `Wdataorg` team has used `twine` to upload this library to `Pypi`\n\n[Wdataorg Pypi account](https://pypi.org/user/Lucky_Pupil/)\n\n[Wdatabase Pypi warehouse address](https://pypi.org/project/Wdatabase/)\n\n# License\nThis open source project uses `Apache License 2.0`\n\nIn the process of using this open source project, please use it strictly in accordance with the license\n\nThe final interpretation right belongs to the development team `Wdataorg`\n\n[Project License Link](https://github.com/Wdataorg/Wdata/blob/main/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdataorg%2Fwdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdataorg%2Fwdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdataorg%2Fwdata/lists"}