Skip to content

Commit

Permalink
update stats and code, add links
Browse files Browse the repository at this point in the history
  • Loading branch information
gvard committed Jan 21, 2024
1 parent 268ff24 commit 4ca7f59
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 65 deletions.
2 changes: 1 addition & 1 deletion cosm/launches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h1 id="header">Статистика запусков ракет: январь 2024 г.</h1>
<div class="list">
<ul>
<li>Всего орбитальных запусков: <span class="yellow">6 181</span></li>
<li>Всего орбитальных запусков: <span class="yellow">6 185</span></li>
<li>Сложно классифицируемых (запуски с Луны и пр.): <span class="yellow">78</span></li>
<li>Неудачных попыток: <span class="yellow">384</span></li>
<li>Суборбитальных пусков (апогей от 80 км): более <span class="yellow">29 825</span></li>
Expand Down
19 changes: 12 additions & 7 deletions py/mk_star_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
PICKLE_SN_FILENAME = "snstats.pickle"
HTML_FILENAME = os.path.join(os.pardir, "stars", "stats", "index.html")
SIMBAD_LST = ["objects", "identifiers", "bibliographic references",
"citations of objects in papers"]
"citations of objects in papers", "acronyms described for Simbad"]


def cds_readme_stats(url):
Expand All @@ -54,10 +54,10 @@ def get_sn_count(txt):

def get_tns(soup):
all_stat_num = soup.findAll("div", {"class": "stat-item-right"})
all_transient = int(all_stat_num[0].text)
public_transient = int(all_stat_num[1].text)
classified = int(all_stat_num[2].text)
spectra = int(all_stat_num[3].text)
all_transient = int(all_stat_num[0].text.replace(",", ""))
public_transient = int(all_stat_num[1].text.replace(",", ""))
classified = int(all_stat_num[2].text.replace(",", ""))
spectra = int(all_stat_num[3].text.replace(",", ""))
return all_transient, public_transient, classified, spectra


Expand Down Expand Up @@ -86,7 +86,7 @@ def simbad_stats(soup):
snurls.append((year, snstats_year))
snurls.append((1999, f"{SNIMAGES_URL}sn1999/snstats.html"))

for year in range(2000, 2024):
for year in range(2000, 2025):
snstats_year = f"https://rochesterastronomy.org/sn{year}/snstats.html"
snurls.append((year, snstats_year))
snurls.append(("all", f"{SNIMAGES_URL}snstatsall.html"))
Expand All @@ -102,7 +102,11 @@ def simbad_stats(soup):
years_dt = []
all_sn_count, sn_amateur_count = 0, 0
for year, snstats_url in snurls:
soup = get_soup_Request(snstats_url)
try:
soup = get_soup_Request(snstats_url)
except urllib.error.URLError:
print("break")
break
snstats[year] = get_snstats(soup)
sn_num, sn_cbat, sn_amateur, sn_13th = get_sn_count(snstats[year])
all_sn_count += sn_num
Expand Down Expand Up @@ -167,6 +171,7 @@ def simbad_stats(soup):
<li>{SIMSTAT['identifiers']} идентификаторов</li>
<li>{SIMSTAT['bibliographic references']} библиографических ссылок</li>
<li>{SIMSTAT['citations of objects in papers']} цитирований объектов в статьях</li>
<li>{SIMSTAT['acronyms described for Simbad']} сокращений, описанных в Simbad</li>
</ul>
"""

Expand Down
20 changes: 10 additions & 10 deletions solarsystem/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
<h2>Статистика тел Солнечной системы</h2>
<p><a href="https://minorplanetcenter.net/mpc/summary">Центра Малых планет</a></p>
<ul>
<li>431263379 наблюдений</li>
<li>1334150 объектов всего</li>
<li>431651758 наблюдений</li>
<li>1334153 объектов всего</li>
<li>Более 640000 <a href="https://minorplanetcenter.net/iau/lists/NumberedMPs.html">нумерованных</a> малых планет</li>
<li>689548 ненумерованных малых планет</li>
<li>4602 комет</li>
<li>4605 комет</li>
<li>Более 24593 <a href="https://minorplanetcenter.net/iau/lists/MPNames.html">малых планет с именами</a> (последнее обновление списка: 2024 Jan. 16.)</li>
<li>28 <a href="https://en.wikipedia.org/wiki/Atira_asteroid">Атир</a>, 2723 <a href="https://en.wikipedia.org/wiki/Aten_asteroid">Атонов</a>, 17501 <a href="https://en.wikipedia.org/wiki/Apollo_asteroid">Аполлонов</a>, 13874 <a href="https://en.wikipedia.org/wiki/Amor_asteroid">Амуров</a>, 28751 <a href="https://en.wikipedia.org/wiki/Hungaria_asteroid">астероидов семейства Венгрии</a>, 25945 <a href="https://en.wikipedia.org/wiki/List_of_Mars-crossing_minor_planets">пересекающих орбиту Марса</a>;</li>
<li>1239712 астероидов основного пояса, 5915 <a href="https://en.wikipedia.org/wiki/Hilda_asteroid">астероидов семейства Хильды</a>, 13521 <a href="https://en.wikipedia.org/wiki/Jupiter_trojan">троянцев Юпитера</a>, 5294 объектов за орбитой Юпитера;</li>
<li>34098 <a href="https://en.wikipedia.org/wiki/Near-Earth_object#Near-Earth_asteroids">околоземных астероидов</a>, из них 851 больше 1 км, 2393 потенциально опасных астероидов, 117 <a href="https://en.wikipedia.org/wiki/Near-Earth_object#Near-Earth_comets">околоземных комет</a>.</li>
<li>28 <a href="https://en.wikipedia.org/wiki/Atira_asteroid">Атир</a>, 2724 <a href="https://en.wikipedia.org/wiki/Aten_asteroid">Атонов</a>, 17520 <a href="https://en.wikipedia.org/wiki/Apollo_asteroid">Аполлонов</a>, 13887 <a href="https://en.wikipedia.org/wiki/Amor_asteroid">Амуров</a>, 28771 <a href="https://en.wikipedia.org/wiki/Hungaria_asteroid">астероидов семейства Венгрии</a>, 25962 <a href="https://en.wikipedia.org/wiki/List_of_Mars-crossing_minor_planets">пересекающих орбиту Марса</a>;</li>
<li>1240146 астероидов основного пояса, 5917 <a href="https://en.wikipedia.org/wiki/Hilda_asteroid">астероидов семейства Хильды</a>, 13541 <a href="https://en.wikipedia.org/wiki/Jupiter_trojan">троянцев Юпитера</a>, 5296 объектов за орбитой Юпитера;</li>
<li>34131 <a href="https://en.wikipedia.org/wiki/Near-Earth_object#Near-Earth_asteroids">околоземных астероидов</a>, из них 851 больше 1 км, 2394 потенциально опасных астероидов, 117 <a href="https://en.wikipedia.org/wiki/Near-Earth_object#Near-Earth_comets">околоземных комет</a>.</li>
</ul>
<p><b>Всего в <a href="https://cneos.jpl.nasa.gov/stats/totals.html" target="_blank" rel="noopener noreferrer">статистике околоземных астероидов</a> от 2024-Jan-19: 34098</b></p><br>
<p><b>Всего в <a href="https://cneos.jpl.nasa.gov/stats/totals.html" target="_blank" rel="noopener noreferrer">статистике околоземных астероидов</a> от 2024-Jan-20: 34131</b></p><br>
<div id="nea_size_bin_chart" style="width:600px; height:400px;"></div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cneos.jpl.nasa.gov/js/vendor/highcharts/highcharts.js"></script>
Expand All @@ -48,11 +48,11 @@ <h2>Статистика тел Солнечной системы</h2>
* Note: Long-period comets with no official designation include: 2,674 SOHO comets, 87 STEREO comets, 2 other modern comets, and 449 pre-modern comets. The pre-modern comets typically have no computed orbits.
<h2>Статистика тел Солнечной системы</h2>
<p><a href="https://ssd.jpl.nasa.gov/?body_count">группы динамики Солнечной системы</a>.
Последнее обновление: 2024-01-19 17:07:03 UTC.</p>
Последнее обновление: 2024-01-21 17:07:03 UTC.</p>
<ul>
<li>290 спутников планет (включая Луну и спутники Плутона);</li>
<li>3911 комет, 561 numbered, 3350 unnumbered;</li>
<li>1344090 астероидов, 640000 numbered, 704090 unnumbered.</li>
<li>3913 комет, 561 numbered, 3352 unnumbered;</li>
<li>1344613 астероидов, 640000 numbered, 704613 unnumbered.</li>
</ul>
<h2>Астероиды и кометы, измеренные при помощи радара</h2>
<p><a href="https://echo.jpl.nasa.gov/asteroids/">Asteroid radar research</a>, NASA Jet Propulsion Laboratory, Caltech.</p>
Expand Down
4 changes: 2 additions & 2 deletions solarsystem/stats/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ <h1 id="header"></h1>
<ul>
<li>В Солнечной системе <span class="yellow">8</span> планет</li>
<li><span class="yellow">290</span> спутников планет</li>
<li>Более <span class="yellow">602</span> комет</li>
<li>Более <span class="yellow">273 800</span> астероидов</li>
<li>Более <span class="yellow">605</span> комет</li>
<li>Более <span class="yellow">274 300</span> астероидов</li>
<li>Только <span class="yellow">24 593</span> имеют имена</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit 4ca7f59

Please sign in to comment.