Skip to main content

PyPI Downloads GitHub last commit GitHub Repo stars GitHub forks

国家自然科学基金数据查询系统

安装

pip3 install nsfc

数据下载

数据库文件较大,可通过百度网盘进行下载 (下载链接 提取码: 2nw5)

  • 下载所需的数据库文件,如project.A.sqlite3, 或全部数据project.all.sqlite3
  • 保存至nsfc的安装路径下的data目录下, 如:/path/to/site-packages/nsfc/data/project.db
  • 或者保存至HOME路径下的nsfc_data目录下,如~/nsfc_data/project.db
  • 也可以通过-d参数指定要使用的数据库文件

使用示例

本地查询

# 查看帮助
nsfc query

# 列出可用的查询字段
nsfc query -K

# 输出数量
nsfc query -C

# 按批准年份查询
nsfc query -C -s approval_year 2019

# 按批准年份+学科代码(模糊)
nsfc query -C -s approval_year 2019 -s subject_code "%A%"

# 批准年份也可以是一个区间
nsfc query -C -s approval_year 2015-2019 -s subject_code "%C01%"

# 结果输出为.jl文件
nsfc query -s approval_year 2019 -s subject_code "%C0501%" -o C0501.2019.jl

# 结果输出为xlsx文件
nsfc query -s approval_year 2019 -s subject_code "%C0501%" -o C0501.2019.xlsx -F xlsx

# 限制最大输出条数
nsfc query -L 5 -s approval_year 2019                                           

结题报告下载

nsfc report 20671004

nsfc report 20671004 -o out.pdf

其他功能

LetPub数据获取

nsfc crawl

本地数据库构建/更新

nsfc build

其他说明

  • 目前基本上只有2019年之前的数据,2020年的数据很少
  • 后续有数据时会再更新

更新记录

  • [2021-11-10] version 2.0.3
    • update base_url of Official
    • update url of Official.get_conclusion_data

Metadata

Release files for nsfc 2.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nsfc 2.0.4
File Size Uploaded
nsfc-2.0.4.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nsfc 2.0.4
File Interpreter ABI Platform
nsfc-2.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 34.4 kB

Release files / nsfc-2.0.4.tar.gz

Download URL nsfc-2.0.4.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad906217f180e56d4e2c8dcfe648e167a0cf4205a6f883500c776c241423aa0f
BLAKE2b-256 checksum
How to use checksums
83efedbb844b0ac053e43e11677e4716c2ab3a8ec9a8f32340ae0abb5cc083a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.3

Release files / nsfc-2.0.4-py3-none-any.whl

Download URL nsfc-2.0.4-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47344e7ecd60355a97d9014a2b0b26bf363c93813dc83a366b7e40a2973988d4
BLAKE2b-256 checksum
How to use checksums
01864d3a8f21af3c4bc8b1e8463044227873641ffe91d641d4111fd14b70eb85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.3

Release history Release notifications | RSS feed

This release

2.0.4 This release

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page