How to download the most recent CSV from a link

Hi all
I was wondering if there is an approach in Julia that would allow me to download the most recent data from the link below. My understanding is that it will be updated quarterly if they just post a new csv I want to pick up the most recent. Is there a package that can do this or do I have to code it?

https://www.federalreserve.gov/econres/notes/feds-notes/FEDS-Note-2873-cie-data.csv

thanks

download("https://www.federalreserve.gov/econres/notes/feds-notes/FEDS-Note-2873-cie-data.csv")

I don’t know.

Thanks for the reply, it helps show that my question was too vague so I edited it. I can certainly take the download approach but I’d have to code for the change in the “Note-nnnn” value which seems messy to me. I’m just getting the hang of Julia and thought this is something that must crop up all the time.

not really. There’s no way to know what a “url” will give you, it might give you CSV this time, might give you a .mp4 the next time. Julia cannot possibly know what file came from what url and what “update” it should do.

Hmm, that doesn’t seem to be the case here. I am sure that this data will always be a csv and the only change I could possibly see the fed doing is to change the name by updating the “Note-nnnn” value.

I was trying to show you why it’s not a well defined task for Julia to accomplish.

Back to the practical side of the story: you’re always gonna re-download the CSV anyway, so either you replace your old CSV, or you do a “union” of rows.

Yep that’s what I was going to do but wanted to check if there was an out of the box way of doing it.
thanks again.

It looks like you should do some scraping. How you get the number of the csv file in the first place?

Hi there
it’s the url that they sent me initially. I was going to wait to see if the naming convention changed. Here is the link they sent me just in case it’s interesting to you