lightkurve-stats
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Unable to calculate vocabulary similarity
Last synced: 10 months ago
·
JSON representation
·
Repository
Basic Info
- Host: GitHub
- Owner: danhey
- Language: Python
- Default Branch: main
- Size: 3.37 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created about 3 years ago
· Last pushed 10 months ago
Metadata Files
Readme
Citation
Owner
- Name: Daniel
- Login: danhey
- Kind: user
- Location: Hawai'i
- Company: University of Hawai'i
- Website: danhey.github.io
- Repositories: 68
- Profile: https://github.com/danhey
Mostly harmless
Citation (citations.py)
import ads
import matplotlib.dates as mdates
import pandas as pd
import matplotlib.pyplot as plt
FIELDS = ['date', 'pub', 'id', 'volume', 'links_data', 'citation', 'doi',
'eid', 'keyword_schema', 'citation_count', 'data', 'data_facet',
'year', 'identifier', 'keyword_norm', 'reference', 'abstract', 'recid',
'alternate_bibcode', 'arxiv_class', 'bibcode', 'first_author_norm',
'pubdate', 'reader', 'doctype', 'doctype_facet_hier', 'title', 'pub_raw', 'property',
'author', 'email', 'orcid', 'keyword', 'author_norm',
'cite_read_boost', 'database', 'classic_factor', 'ack', 'page',
'first_author', 'reader', 'read_count', 'indexstamp', 'issue', 'keyword_facet',
'aff', 'facility', 'simbid']
qry = ads.SearchQuery(q='full:"lightkurve" AND year:2017-2050', rows=999999, fl=FIELDS)
papers = [q for q in qry ]
dates = [p.date for p in papers[::-1]]
titles = [p.title[0] for p in papers[::-1]]
years = [p.year for p in papers[::-1]]
authors = [p.first_author_norm for p in papers[::-1]]
bibcodes = [p.bibcode for p in papers[::-1]]
pubs = [p.pub for p in papers[::-1]]
cite_count = [p.citation_count for p in papers[::-1]]
df = pd.DataFrame({'year': years,
'date': pd.to_datetime(dates),
'title': titles,
'author': authors,
'bibcode': bibcodes,
'pub': pubs,
'cite_count': cite_count})
# Filter out Zenodo entries and AAS Abstracts
mask = ~df.pub.str.contains("(Zenodo)|(Abstracts)")
# Sort by date and reset index
df = df[mask].sort_values('date', ascending=False).reset_index(drop=True)
# Save raw stats
df.to_csv('stats.csv')
## Make a markdown table
most_recent = df.sort_values('date', ascending=False).head(5)
most_recent = most_recent.rename(columns={'date': 'Date', 'title': 'Title', 'author': 'Author'})
link_title = []
for index, row in most_recent.iterrows():
link_title.append(f'[{row.Title}](https://ui.adsabs.harvard.edu/abs/{row.bibcode}/abstract)')
most_recent['Title'] = link_title
most_recent['Date'] = most_recent['Date'].dt.date
recent_table = most_recent[['Date', 'Title', 'Author']].to_markdown()
readme_str = f'''
<h1>Lightkurve statistics</h1>

{recent_table}
'''
text_file = open("readme.md", "w")
n = text_file.write(readme_str)
text_file.close()
# Make a plot
x = pd.date_range('2018-01-01T00:00:00Z', df.date.max(), freq='1M')
y = [len(df[df.date < d]) for d in x]
fig, ax = plt.subplots(figsize=[9, 5])
plt.plot(x, y, marker='o', c='k')
plt.xlabel('Year', fontsize=12)
plt.ylabel("Publications", fontsize=12)
locator = mdates.AutoDateLocator(minticks=3, maxticks=7)
formatter = mdates.ConciseDateFormatter(locator)
ax.xaxis.set_major_locator(locator)
ax.xaxis.set_major_formatter(formatter)
plt.savefig("lightkurve-publications.png")
GitHub Events
Total
- Push event: 36
Last Year
- Push event: 36
Dependencies
.github/workflows/get_citations.yml
actions
- actions/checkout v2 composite
- actions/setup-python v4 composite
- ad-m/github-push-action v0.6.0 composite
