-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch_openalex2.py
More file actions
84 lines (79 loc) · 4.43 KB
/
Copy pathsearch_openalex2.py
File metadata and controls
84 lines (79 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env python3
"""Final OpenAlex searches for NeKo-PIGNN literature gaps."""
import urllib.request
import urllib.parse
import json
import time
def search_openalex(query, per_page=20):
url = f'https://api.openalex.org/works?filter=title_and_abstract.search:{urllib.parse.quote(query)}&sort=publication_date:desc&per_page={per_page}'
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0 (research bot)'})
with urllib.request.urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode('utf-8'))
def extract_papers(data, min_year=2024):
papers = []
for r in data.get('results', []):
year = r.get('publication_year', 0)
if year < min_year:
continue
title = r.get('title', 'No title')
date = r.get('publication_date', str(year))
doi = r.get('doi', '')
authors = []
for a in r.get('authorships', []):
author = a.get('author', {})
if author:
authors.append(author.get('display_name', '?'))
loc = r.get('primary_location', {}) or {}
source = loc.get('source', {}) or {}
journal = source.get('display_name', '') or ''
is_oa = r.get('open_access', {}).get('is_oa', False) if r.get('open_access') else False
cited_by = r.get('cited_by_count', 0)
papers.append({'title': title, 'date': date, 'year': year, 'doi': doi,
'authors': authors, 'journal': journal, 'is_oa': is_oa,
'cited_by': cited_by})
return papers
def print_papers(papers, label):
print(f"\n{'='*80}")
print(f"📚 {label} ({len(papers)} papers)")
print(f"{'='*80}")
if not papers:
print(" (no results)")
return
for i, p in enumerate(papers, 1):
print(f"\n [{i}] [{p['year']}-{p['date'][5:10] if p['date'] else '??'}] {p['title'][:140]}")
print(f" Journal: {p['journal'][:70]}")
print(f" Authors: {', '.join(p['authors'][:4])}{' et al.' if len(p['authors']) > 4 else ''}")
print(f" DOI: {p['doi'][:70]}")
print(f" Cited: {p['cited_by']}")
QUERIES = [
# Wildfire detection with GOES/VIIRS + AI
("VIIRS+active+fire+deep+learning+detection+2025", "VIIRS Active Fire DL 2025+"),
("wildfire+detection+multi+spectral+satellite+deep+learning+transformer", "Multi-spectral DL Transformer Wildfire"),
("wildfire+propagation+physics+informed+neural+network+Rothermel", "PINN+Rothermel Wildfire Propagation"),
("wildfire+spread+graph+neural+network+spatiotemporal", "ST-GNN Wildfire Spread"),
("wildfire+recurrent+graph+network+prediction", "Recurrent GNN Wildfire"),
("wildfire+digital+twin+simulation+prediction+2025+2026", "Digital Twin Wildfire Simulation 2025-2026"),
("deep+koopman+operator+forecast+environmental+system", "Deep Koopman Environmental Forecasting"),
("koopman+autoencoder+environmental+monitoring", "Koopman Autoencoder Environmental"),
("wildfire+caatinga+burned+area+detection", "Caatinga Burned Area Detection"),
("cerrado+wildfire+deep+learning+detection+2025", "Cerrado Wildfire DL 2025+"),
("amazon+wildfire+deep+learning+detection+2025+2026", "Amazon Wildfire DL Detection 2025+"),
("wildfire+detection+unsupervised+anomaly+detection+GOES", "Unsupervised Anomaly Wildfire GOES"),
("physics+informed+wildfire+model+reduced+order+modeling", "Physics Informed Reduced Order Wildfire"),
("wildfire+prediction+ensemble+deep+learning+earth+observation", "Ensemble DL Earth Observation Wildfire"),
("wildfire+propagation+cellular+automata+neural+network", "Cellular Automata Neural Wildfire"),
("graph+neural+operator+wildfire+dynamics", "Graph Neural Operator Wildfire"),
("wildfire+large+language+model+monitoring+detection", "LLM Wildfire Monitoring"),
("wildfire+attention+mechanism+satellite+detection+2025", "Attention Mechanism Satellite Wildfire"),
("wildfire+spatiotemporal+neural+network+forecast+GOES", "ST Neural Net GOES Wildfire"),
("wildfire+transfer+learning+domain+adaptation+satellite", "Transfer Learning Domain Adapt Wildfire"),
]
for query, label in QUERIES:
try:
data = search_openalex(query, per_page=10)
papers = extract_papers(data, min_year=2024)
recent = [p for p in papers if p['year'] >= 2025]
print_papers(recent if recent else papers[:5], label)
time.sleep(0.4)
except Exception as e:
print(f"\n⚠️ Error for '{label}': {e}")