I am a beginner. I do not know how to get road image through jamcam. I need a step by step tututorial. Thanks!
I wrote some code - JamCam multiple historic images - #3 by theochapple - that might be a useful starter?
Thank you! But I just learned python. I don’t understand your code. Could you provide some specific steps or where can I learn the related information?
Apologize for my problems.
@nodice Have you found yourself an API key?
Do you understand how to read JSON?
https://api.tfl.gov.uk/Place/Type/JamCam returns a JSON list of all the current cams.
which is a image…
Thank you for your kind reply!
I find my API key. But I don’t know how to use it. I will learn how to read JSON. And I want to know how to get the real-time data?
You should append your app_key= to the end of any tfl.gov.uk URL you call. It’s not always necessary, but advised.
The current list of real-time data is in the https://api.tfl.gov.uk/Place/Type/JamCam call. This is the list of current live JamCams.
If you look at the JSON there is an array of objects.
Each of these contains
- The name of the camera
- The URL of an image (jpg) - taken a few minutes ago
- The URL of an video (mp4) - a few seconds taken a few minutes ago.
- The overlay text for the video feed
- The lat,long co-special (“GPS”) co-ordinate of the camera.
I’m not quite clear as to which cameras you want to view?
I just need to download the image data to make a dataset. The dataset is about urban inundation.Is only the URL of image required? By the way, is it raniy in London,rencently?
For the weather, the Met Office API is quite reliable!
So yes, you can just download all the images. From memory, quite a few will have the “camera out of action” message…
Thanks! So do I need api_key to download images from imageUrl like “https://s3-eu-west-1.amazonaws.com/jamcams.tfl.gov.uk/00002.00865.jpg”? The last question, is there any way to get images from last month or last year?
That one is easy: no. There is no archive.
No key is required for the AWS l s3 bucket link.
OK. Thank you again for your help!!!