Thank you Muhammad for your constructive guide, really appreciate the help provided! :)
-- Kind regards,
RJ
On Thursday, 21 January 2016 01:32:01 UTC, Muhammad wrote:
On Thursday, 21 January 2016 01:32:01 UTC, Muhammad wrote:
Hi Rij,I would approach it like this (though there might be alternative routes to the same results):First: Where is the data?According to your links, the various API endpoints are in the "results" list of the JSON on http://data.london.gov.uk/api/3/action/package_list To get access data from a particular dataset/endpoint, you can "generate" thus:1. Go to http://data.london.gov.uk/api/3/action/package_list and grab a dataset endpoint that interests you. I will choose the first one that comes up: 19-year-olds-qualified-to-nvq-level-3 2. "Generate" the API endpoint for this dataset by appending its URL to http://data.london.gov.uk/api/3/action/package_show?id= (as per the documentation).This will give you http://data.london.gov.uk/api/3/action/package_show?id= for this particular dataset.19-year-olds-qualified-to-nvq- level-3 3. Fetch the data from the APIThere are many tools out there, but my favorite is Python-Requests. See the docs at http://docs.python-requests.org/en/latest/ Now, in your Python program/Django models or views modules, do:import requestsurl = "http://data.london.gov.uk/api/3/action/package_show?id= "19-year-olds-qualified-to-nvq- level-3 response = requests.get(url)4. Use the data as you see fit. The "response" object you (successfully) get from the line above contains all the data you need from the dataset you chose. See the Python-Requests docsfor all the ways to extract that data. And, then pass that data onto whatever other program, package or module you want to use to analyze or graph the response data. Also see the data portal for all the ways you can interact with their API.I hope this helps. All the best.Sincerely,MuhammadOn Jan 20, 2016, at 6:04 PM, Rij K <rijen...@gmail.com> wrote:Hi all,I'm trying to implement data and graphs from "http://data.london.gov.uk/" into my website by using an API (http://data.london.gov.uk/developers/ ) provided by them but I'm not too sure where to get started?Would anyone be up for giving me a hand with this?Many thanks.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4ba0df59- .5323-4400-8f81-f71e839bd0ed% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6a6aeda1-0bd6-49dc-8c14-17b96e5a7516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment