# Package statistics, Python's average package is 4x larger

**URL:** https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967
**Category:** Community
**Created:** [October 19, 2022, 1:40pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967 "2022-10-19T13:40:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [October 19, 2022, 1:40pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/1 "2022-10-19T13:40:01Z")

</div>

Average Python package is 2212.6 (average) / 507 (median) = 4.4x larger (for lines of code, as I suspected). I think that might inform discussion about e.g. documentation, if/since Julia packages are smaller, and you tend to use more and compose, rather than one of few bigger in Python. I’m not complaining (just an observation), _all else equal_, packages _should be smaller_, for code, though no min. limit on docs.

Largest Julia package is though way larger at 264,115 lines, ~~5.5x larger~~ 2.2x larger (compared to Python code in root, at 118,793 lines, see comment below). Hecke.jl is 130,560 lines ( ~~not as much autogenerated code?~~ ).

Both statistics are old, though Python’s may be 8 years old (still interesting to compare to Python of the past), so this might be way too outdated. Do we have similar statistics for Julia, as that page on Python has? And you know of good updated statistics for Python or other languages?

> **[Code, docs, and tests: what's in the General registry?](https://julialang.org/blog/2021/08/general-survey/)**
>
> Code, docs, and tests: what's in the General registry?

> **[Python Package Statistics | YSAR.NET](https://yasar11732.github.io/python/python-package-statistics.html)**
>
> Some descriptive statistics about packages on PyPI.

[Biggest doesn’t ring true, TensorFlow, PyToch etc. missing, statistics predating them?]

> Here are the biggest packages on PyPI:
> 
> ```
> b2gpopulate (36MB)
> ajenti (35MB)
> FinPy (29MB)
> django-dojo (28MB)
> QSTK (27MB)
> 
> ```
> 
> Total sizes on packages in PyPI amounted to 4.2 GB. Average package size is 161 KB and standard deviation is 1MB.  
> […]  
> Minimum and maximum lines were 2 and 47 453 respectively. Number of lines averaged to 2212.6 lines per package and standard deviation was 8729.7

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [October 19, 2022, 1:45pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/2 "2022-10-19T13:45:32Z")

</div>

> [@Palli](#):
>
> Average Python package is 2212.6 (average) / 507 (median) = 4.4x large

Because Python is bloat and you should probably use median, and exclude test code

> [@Palli](#):
>
> Largest Julia package is though way larger at 264,115 lines, 5.5x larger.

this is Julia itself, you need to exclude it

and then there’s packages like [GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically](https://github.com/root-project/root)

which has python glue code:

```julia
===============================================================================
 Language Files Lines Code Comments Blanks
===============================================================================
 Python 757 118793 82223 17006 19564

```

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [October 19, 2022, 1:52pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/3 "2022-10-19T13:52:16Z")

</div>

No, that was actually AWSSDK.jl, next-largest AWS.jl also huge (then Hecke.jl, then outdated TensorFlow.jl), I think by now they merged. Julia itself was already excluded, as not a package.

You’re right I should use median, and same for both, for Python, but that’s what I found so I pointed out inconsistency, but I’m not sure it changes much. Yes, better to exclude tests (or compare them separately, or as combined), but I think, not sure both have them in.

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [October 19, 2022, 2:01pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/4 "2022-10-19T14:01:36Z")

</div>

Those AWS packages are auto generated from the API, not really relevant for a comparison like this. They only demonstrate how ridiculously complicated AWS is.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [October 19, 2022, 2:03pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/5 "2022-10-19T14:03:20Z")

</div>

To be fair, I don’t know why AWS[SDK].jl is so huge, I suspect autogenerated code and/or comments.

And not sure either why root is so huge (I guess HEP just this complex). And if Python is only 1.6% of it (only 6th largest language, C++ largest share 78.5%) then is it 118793/0.016 = 7 million lines in total?! I updated my top post with that (Python-part) figure.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [October 19, 2022, 2:05pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/6 "2022-10-19T14:05:51Z")

</div>

Right, still Hecke.jl is or was 130,560 lines (not sure why that large, half the size), then larger then Python part of root.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [October 19, 2022, 2:12pm UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/7 "2022-10-19T14:12:23Z")

</div>

@ChrisRackauckas Do you know how large SciML is in total (lines of code, or other metric?). I suspect if we count ecosystems, then it is largest. Would be interesting to rerun the stats in the Julia blog post (should be simple, the code for that available). Any guess about the largest “umbrellas”, besides SciML?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [October 20, 2022, 5:28am UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/8 "2022-10-20T05:28:29Z")

</div>

I don’t know.

---

<div class="post-metadata">

### Author: ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)
#### Post date: [October 20, 2022, 8:01am UTC](https://discourse.julialang.org/t/package-statistics-pythons-average-package-is-4x-larger/88967/9 "2022-10-20T08:01:36Z")

</div>

> [@Palli](#):
>
> Largest Julia package is though way larger at 264,115 lines, ~~5.5x larger~~ 2.2x larger (compared to Python code in root, at 118,793 lines, see comment below). Hecke.jl is 130,560 lines (not as much autogenerated code?).

Hecke.jl does not contain auto-generated code (unless you count the CI scripts).
