r-hub / cranlogs.app Goto Github PK
View Code? Open in Web Editor NEWRStudio CRAN mirror downloads, web app
Home Page: http://cranlogs.r-pkg.org/
RStudio CRAN mirror downloads, web app
Home Page: http://cranlogs.r-pkg.org/
Hi,
Given the LetsEncrypt initiative, by which it is easy to obtain a valid and free SSL certificate accepted in most major browsers, would it be possible to have https://cranlogs.r-pkg.org/ ?
For https websites having access to https badges would be great.
Thank you for your work and sorry to disturb you.
Currently there are no stats for bioc packages: https://cranlogs.r-pkg.org/badges/S4vectors
Not sure if this data is available from posit/p3m bioc mirrors. Otherwise the data is available from bioc itself, e.g.:
Would it be possible to add more appropriate status codes for invalid requests to improve client error handling.
I hit a "bug" while hacking on https://github.com/devOpifex/cranlogs as I'd added some error handling of:
if resp.StatusCode != 200 {
return daily, fmt.Errorf("error getting daily downloads: %s", resp.Status)
}
but then was improperly constructing the string so it was invalid.
Checking via curl shows that there is still a 200 response along with the json { "error": "Invalid query", "info": "https://github.com/metacran/cranlogs.app" }
โฏ curl https://cranlogs.r-pkg.org/downloads/dailylast-week/dplyr -v
* Trying 104.21.58.236:443...
* Connected to cranlogs.r-pkg.org (104.21.58.236) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
* start date: Jul 5 00:00:00 2021 GMT
* expire date: Jul 4 23:59:59 2022 GMT
* subjectAltName: host "cranlogs.r-pkg.org" matched cert's "*.r-pkg.org"
* issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x148811600)
> GET /downloads/dailylast-week/dplyr HTTP/2
> Host: cranlogs.r-pkg.org
> user-agent: curl/7.77.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
< date: Fri, 21 Jan 2022 14:48:49 GMT
< x-powered-by: Express
< cf-cache-status: DYNAMIC
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=X5Vvidd5ALsPSmETV7yv%2FOMMxheEOOI9Q9cvoeXUmt8pPdTAfwVPf3ocvGaFFFUsH5PsXOdd3TZVyHGZ9%2BQUKPYgxh%2BWCHAJ3nRNSGaMuaiyUrPipE67Jl%2Bqq899FTWJ2pKxQOY%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< cf-ray: 6d11587e2e165b4c-IAD
< alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
<
* Connection #0 to host cranlogs.r-pkg.org left intact
{ "error": "Invalid query", "info": "https://github.com/metacran/cranlogs.app" }
Ideally would get like a 400, 404 or the like status code
When I create a new .Rmd file with simply the CRAN badge, and knit to html, it works:
[![](https://cranlogs.r-pkg.org/badges/rempsyc)](https://cran.r-project.org/package=rempsyc)
However, when I attempt to knit to PDF, I get the following error:
! LaTeX Error: File `https://cranlogs.r-pkg.org/badges/rempsyc' not found.
Error: LaTeX failed to compile test-cran.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test-cran.log for more info.
Execution halted
Is there any way to make this work for PDF, like automatically converting to an image during the knit? Else is there any way that this could make its way as a feature request, like requesting an image link, like https://cranlogs.r-pkg.org/badges/rempsyc.jpg
?
It appears that the badge counts are not updating. When using the cranlogs R package daily counts from 2018-01-01 and on show 0 for all packages tested. I assume these issues are the same.
As per the example, it is possible to access daily downloads over a given period. E.g., http://cranlogs.r-pkg.org/downloads/daily/2014-01-03:2014-02-03/ggplot2
My goal is to have weekly download volumes for a package over a long period.
From the result of the above request I can compute weekly volumes, but that means retrieving a lot more information than necessary. If I replace "daily" with "weekly", I get an error (invalid query). Is it at all possible to get weekly data?
Best
E.g. if the package is new.
Hi,
Currently, the badge URL gives a NOTE on winbuilder. For example, when using winbuilder on package bmlm:
Found the following (possibly) invalid URLs:
URL: http://cran.rstudio.com/web/packages/bmlm/index.html (moved to https://cran.rstudio.com/web/packages/bmlm/index.html)
From: README.md
Status: 200
Message: OK
CRAN URL not in canonical form
The badge links should probably be in the "canonical CRAN form", e.g.:
In practice at least. Only a couple of seconds, but still...
It only supports R packages. could it also show Badges for Bioconductor packages. Thank you.
I am trying to compile both html and pdf from a Rmd file.
The pdf fails with the following error:
pandoc: Unable to convert image `/var/folders/pt/061nmk8s53x4tw_j92hp4hnr0000gn/T/tex2pdf.6334/c3fd0364f0ccb172153fb6fd829150bca9077120.svgz':
Found a few helpful guides to address this issue, most of them focus on embedding svg into pdf documents (rendering Rmd files dirty for HTML output).
Would be awesome if the badge API could include a format option, much like travis does.
https://travis-ci.org/sahilseth/flowr.png?branch=master
For example:
https://cranlogs.r-pkg.org/badges/grand-total/dplyr
https://cranlogs.r-pkg.org/top/last-day/3
all give a 404
I notice that cranlogs::cran_downloads
is several days behind the CRAN logs posted here. Right now those .gz
files include one for October 4th, but:
> cran_downloads("ggplot2", from = "2016-10-01", to = "2016-10-05")
date count package
1 2016-10-01 5499 ggplot2
2 2016-10-02 5893 ggplot2
3 2016-10-03 0 ggplot2
4 2016-10-04 0 ggplot2
5 2016-10-05 0 ggplot2
And https://cranlogs.r-pkg.org/badges/last-day/ggplot2 is showing 5893. In both cases, this is the October 2nd result. Is something awry?
Something simple on Github Pages.
Hi
It looks like the API is currently down, getting 404 when trying to request data, for instance from the https://cranlogs.r-pkg.org/downloads/total/last-day endpoint. Is it an expected service interruption or something requiring intervention? If so, when can we expect API to be back online?
E.g. download counts for all packages for last day/week/month.
Maybe.
Just a curiosity - I couldn't find the update frequency anywhere, could you please write it somewhere in the README or so?
Thanks!
This is a great package. Thank you. But I really wonder how is it possible that, for example, ggplot2
is downloaded 1.4M a month as shown on https://cranlogs.r-pkg.org/?
According to RStudio package manager the monthly download of ggplot2
is about 50K. That's about dividing 1.4M by 30 days.
So actually I am thinking what the count number from cran log mean... because the number returned from each day is about on the 50K level:
cranlogs::cran_downloads("ggplot2", when = "last-month")
gives:
date count package
1 2020-11-17 74014 ggplot2
2 2020-11-18 71236 ggplot2
3 2020-11-19 70541 ggplot2
4 2020-11-20 66101 ggplot2
5 2020-11-21 53323 ggplot2
6 2020-11-22 51742 ggplot2
7 2020-11-23 67641 ggplot2
8 2020-11-24 65529 ggplot2
9 2020-11-25 51643 ggplot2
From r-hub/cranlogs#16.
Hi!
Great job with these bagdes! I'm only missing a badge to show which version that is in the masterbranch of a github package, for the useres to see fast if there is a new version. I guess this could be done using github API? Any suggestions?
I check download counts everyday, but since 7th of August data fetching has stopped.
Have a look at https://cranlogs.r-pkg.org/downloads/daily/last-month/dplyr or https://cranlogs.r-pkg.org/downloads/daily/last-month/MASS.
This applies to daily downloads but also the total counts (weekly, monthly and total).
Probably need a homepage first.
Would it be possible to use the bioconductor package listing and download stats to provide download and availability badges for packages on bioconductor?
Stats here: http://www.bioconductor.org/packages/stats/
e.g., https://github.com/hyperium/hyper#hyper
I think it would be useful to give CRAN version in a badge in README's
@gaborcsardi First, thanks for the great work on this. It is really useful for me as I get asked often how I can show that my work is getting used. I have pointed to cranlogs multiple times already!
I am having an issue with the badge in a README.md. The badge shows up fine, but the values are not updated. For instance, the values in the badge on the readme show 1896 total downloads. But when you ding the site the svg indicates 1980 downloads (as of 5/7/2015). You appear to be having the same issue on your README.md. Total downloads for Rcpp there shows 6017, but badge from cranlogs.r-pkg.org indicates 8462 (as of 5/7/2015).
Again, thanks for you work on this (and all of metacran for that matter).
Thanks for the great package. My limited understanding of CRAN is that RStudio is the only mirror that provides download stats, and that cranlogs stats are from the RStudio server only. Is this correct?
If a package has 100 downloads reported from metacran, is there any way to know what the total number of installs is?
It would be great to have a section in the README about cloning and building the project locally. I guess this would make it easier for new contributors to fix things (including myself :))
E.g., for packages that don't exist:
http://cranlogs.r-pkg.org/downloads/total/last-day/doesnotexist
[
{
start: "2015-07-07",
end: "2015-07-07",
downloads: 0,
package: "doesnotexist"
}
]
I would think a pkg that's not found would give a 404 - of course I know that package doesn't exist, but a machine doesn't know
As discussed on Slack, we are trying to standardize READMEs across the rOpenSci project. In the interest of keeping badges concise and to prevent badge proliferation, we would humbly request a combined CRAN version/status + Github version badge.
@gaborcsardi mentioned that this would require an entirely new badge. If package is not on CRAN, then badge would reflect that.
Why? This badge would allow a potential user to quickly determine whether a package is on CRAN, and if development on GitHub has progressed considerably more than the last CRAN version. ๐
Hi Gabor,
Would you consider having this app also generate svg badges for the number of downloads, in addition to the json summaries? Several of us were discussing this idea over at ropensci-archive/wishlist#14
Thanks for considering!
Carl
It could be nice to have both version availability and download statistics for bioconductor packages as well - is this in the pipeline?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.