-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add usdoj blog post #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and the length is also suitable!
I suggest that @pitkant will also approve before release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks for submitting this!
It takes a while more until the blog post appears on the website, we're looking into it |
Thank you for your help!! |
Hello, @pitkant -- I saw the blog isn't up yet. Is there something I can do to help? Thanks. |
Hi @stephbuon , we have now figured out the problems with the web server rendering with University IT people. Apologies that this took so long! I tried re-rendering your blogpost from the .Rmd file and encountered the following problems:
I don't know what the warning message in question is about, but then I read documentation from usdoj API site:
For a smaller number of downloaded speeches (like 10000, 20000 etc) things worked fine so I assumed my download was getting throttled. But funnily enough when I set my location to US East Coast with a VPN I was able to download the 100K records, albeit very slowly. Maybe Usdoj discriminates against API calls from abroad? Anyway, all this may be more related to usdoj package than than the context of this blog post, let's move on...
returns the following:
So a single item. I think the intention was to return all the states with USAO attached at the end? Because of this the
If you could re-render the html file and re-upload it to this repository, we could see if things work correctly now. Thanks and sorry for the inconvenience! |
Thanks for this @pitkant ! It was meant to read from a csv file, not pull from the API in real time. Let me fix that and send it back to you. |
Hi, @pitkant -- The code that pulls 100,000 press releases should have been only for my use (not to be viewed in the blog post). I uploaded a markdown file with
|
Hi @stephbuon -- In the case of .Rmd-files, the server does not do any rendering but it just displays already-rendered html files. In the case of plain .md files it does some basic parsing to display the page but that does not allow for some more complicated blog posts, such as ones that have embedded interactive visualisations and so on. I didn't mean that you should do anything different. I was just trying to replicate the html file on my own computer to see if there is something different in the output compared to the one there is now. I don't know if this is significant but it seems that some older .html files have the yaml front matter left in them whereas yours doesn't. There are also some other minute differences. For example, compare these two: It's clearly knitting related issue but it's hard to say without being able to re-render the html file. Maybe you could try using this formatting in the front matter?
instead of this
|
I made an attempt at converting the blog post from .Rmd to an .md file and it worked, the blog post is live here: https://ropengov.org/2023/04/usdoj-cran-release/ Maybe we should still attempt to fix the .Rmd file somehow, I can't come up with any other reason than the problem being in the yaml front matter. |
I made some further changes to the website, converting some older blog posts to use standard code fences: ```r instead of this ```{% highlight r %} and updated config.toml to include our preferred syntax highlighting style, tango, instead of the Hugo default monokai. (There are some good looking alternatives as well, maybe we can consider those at some point as well https://xyproto.github.io/splash/docs/all.html) The blog post should look very similar to what it would look if it was rendered from an .Rmd file now. @stephbuon can decide if it's good enough for now. |
Thank you, @pitkant -- I really appreciate your help with this. Is it possible to remove the code before the map of the United States and just show the map of the United States? In the future I will use the method that you did to create this (instead of the .Rmd file) |
It's just my personal preference, but I think it's nice that there are some code examples along with the visualisations - even if the code examples wouldn't be fully reproducible. Maybe instead of removing it all the code chunk could be slightly modified to make it clear that it's for illustrative purposes and reproducing the example as it is presented would not work due to API limitations etc...? Something to this effect: Original:
Modified:
But if you wish that all the lines 21-57( homepage/content/post/2023-04-01-usdoj-cran-release/index.en.md Lines 21 to 57 in 29015f5
|
Hi, @pitkant ! If you think having non-reproducible code is useful, I take your word for it and am happy to keep it! Good idea adding the disclaimer on top. I'm happy to publish the blog post (including the disclaimer and code before the first visualization) if you also think it looks good enough. |
No description provided.