Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volfpeter/uspto-patent-citation-graph
Graph that downloads patent citation data from USPTO's PatentsView API on-demand and stores it locally in an SQL database (and in memory) for fast access later.
https://github.com/volfpeter/uspto-patent-citation-graph
citation-network database graph patent patents patentsview patentsview-api sql sqlalchemy uspto
Last synced: 24 days ago
JSON representation
Graph that downloads patent citation data from USPTO's PatentsView API on-demand and stores it locally in an SQL database (and in memory) for fast access later.
- Host: GitHub
- URL: https://github.com/volfpeter/uspto-patent-citation-graph
- Owner: volfpeter
- License: mit
- Created: 2020-02-20T17:00:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-26T07:21:32.000Z (over 1 year ago)
- Last Synced: 2024-10-08T14:50:52.588Z (about 1 month ago)
- Topics: citation-network, database, graph, patent, patents, patentsview, patentsview-api, sql, sqlalchemy, uspto
- Language: Python
- Size: 13.7 KB
- Stars: 10
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# USPTO-patent-citation-graph
Graph that downloads patent citation data from USPTO's [PatentsView](https://www.patentsview.org) API on-demand and stores it locally in an SQL database (and in memory) for fast access later.
The project is based on the [graphscraper](https://pypi.org/project/graphscraper/) project, please see that project for the details of the graph API.
## Installation
Install the latest version of the project from the Python Package Index using `pip install uspto-patent-citation-graph`.
## Getting started
Creating a graph instance that will use a default, on-disk SQLite database:
```Python
from uspto_patent_citation_graph import USPTOPatentCitationGraphgraph = USPTOPatentCitationGraph(None)
```Loading a node that is not in the local database yet:
```Python
# `can_validate_and_load=True` tells the graph's node list that it is allowed to
# load data from the PatentsView API. Its default value is `False`, and the
# argument can be omitted if the given patent is already in the local database.
patent_number = "4733665" # Stent patent
stent_patent = graph.nodes.get_node_by_name(patent_number, can_validate_and_load=True)
```Accessing a node's neighbors (cited and cited-by patents):
```Python
print(f"Neighbors of {stent_patent.name}:")
for neighbor in stent_patent.neighbors:
print(f" - {neighbor.name}: {neighbor.external_id}")
```## Related projects
You can find related projects here:
- [graphscraper](https://github.com/volfpeter/graphscraper)
- [localclustering](https://github.com/volfpeter/localclustering)## Community guidelines
Any form of constructive contribution is welcome:
- Questions, feedback, bug reports: please open an issue in the issue tracker of the project or contact the repository owner by email, whichever you feel appropriate.
- Contribution to the software: please open an issue in the issue tracker of the project that describes the changes you would like to make to the software and open a pull request with the changes. The description of the pull request must references the corresponding issue.The following types of contribution are especially appreciated:
## License - MIT
The library is open-sourced under the conditions of the [MIT license](https://choosealicense.com/licenses/mit/).