opendata

API to Database?

对着背影说爱祢 提交于 2020-02-27 12:35:12
问题 Please presume that I do not know anything about any of the things I will be mentioning because I really do not. Most OpenData sites have the possibility of exporting the presented file either in for example .csv or .json formats (Example). They also always have an API tab (Example API). I presume using the API would mean that if the data is updated you would receive the change whereas exporting it as .csv would mean the content will not be changed anymore. My questions is: how does one use

Convert xml to json to process file into Bigquery

隐身守侯 提交于 2020-01-24 19:27:06
问题 I would like process a stackexchange raw data into BigQuery, but first the data use a 7z compress format, so I uncompressed the data to port this to gz format, but the internal file is a xml. So I need convert the file from xml to json. Any ideas? I used p7zip to uncompress and xml2json to try port the xml file but not work. <?xml version="1.0" encoding="utf-8"?> <comments> <row Id="1" PostId="1" Score="3" Text="We need to all post more questions. Last time, we kinda "rushed" to get a w hole

How to enable API button for CKAN data set?

守給你的承諾、 提交于 2020-01-17 02:50:07
问题 I have successfully added a data set for the CKAN site. It enables to preview the data set as well. Below is the URL for the data set testckan.com:5000/dataset/my-data1/resource/4c2647ca-a4ab-4d20-8119-5c3da9d4ae14 By adding api/rest/ to the URL as below enables to expose data sets as a JSON service. testckan.com:5000/api/rest/dataset/my-data1/resource/4c2647ca-a4ab-4d20-8119-5c3da9d4ae14 All I want to do is add an button so that user can view the data set as a JSON rather than typing it in

How to get rdf file from sparql endpoint

余生长醉 提交于 2020-01-13 04:16:00
问题 I am new in opendata and need some help. Wikipedia have their sparql endpoint in this url: http://dbpedia.org/sparql Now I need to write webservice to get some rdf file from dbpedia. What should I send to this endpoint to get rdf file ? 回答1: Send a CONSTRUCT query. A little example: CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 10 The WHERE clause works just like that of SELECT only the values fill the CONSTRUCT block as a kind of template. It's very flexible - you can either copy

Ckan Always redirecting to localhost:5000

二次信任 提交于 2020-01-07 06:40:36
问题 I have set up a virtual machine(eg., ckan.test.com) and set up CKAN on that machine. Every thing looks fine until i try to submit any form. If i try to submit any form it will automatically redirect to localhost:5000. Ex: Login page is http://ckan.test.com/user/login. Once i enter credentials and login its redirecting to http://localhost:5000/user/logged_in. If i replace localhost:5000 with ckan.test.com it takes me to the correct home page. Can any one tell me whats going on 回答1: CKAN form

No module named celery when installing ckanext-archiver

∥☆過路亽.° 提交于 2020-01-06 01:35:29
问题 I'm using CKAN as my open data portal and am trying to install the Archiver Extension by following the instructions at https://github.com/ckan/ckanext-archiver. However I am faced with this error which I could not solve after enabling the archiver in my ckan config file. Traceback (most recent call last): File "/usr/lib/ckan/default/bin/paster", line 9, in <module> load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')() File "/usr/lib/ckan/default/local/lib/python2.7/site

How to get the historical weather for any city with BigQuery?

醉酒当歌 提交于 2019-12-20 12:30:32
问题 BigQuery has NOAA's gsod data loaded as a public dataset - starting in 1929: https://www.reddit.com/r/bigquery/comments/2ts9wo/noaa_gsod_weather_data_loaded_into_bigquery/ How can I retrieve the historical data for any city? 回答1: Update 2019: For convenience SELECT * FROM `fh-bigquery.weather_gsod.all` WHERE name='SAN FRANCISCO INTERNATIONAL A' ORDER BY date DESC Updated daily - or report here if it doesn't For example, to get the hottest days for San Francisco stations since 1980: SELECT

A continuation of… Extracting data from an API using R

懵懂的女人 提交于 2019-12-13 03:49:52
问题 I'm a super new at this and working on R for my thesis. The code in this answer finally worked for me (Extracting data from an API using R), but I can't figure out how to add a loop to it. I keep getting the first page of the API when I need all 3360. Here's the code: library(httr) library(jsonlite) r1 <- GET("http://data.riksdagen.se/dokumentlista/? sok=&doktyp=mot&rm=&from=2000-01-01&tom=2017-12- 31&ts=&bet=&tempbet=&nr=&org=&iid=&webbtv=&talare=&exakt=&planering=&sort=rel&sortorder=desc

CKAN PluginNotFoundException in Pages Extension

时光怂恿深爱的人放手 提交于 2019-12-12 04:44:33
问题 I'm using CKAN as my open data portal. It's written in Python using Pylons framework. I want to integrate ckanext-pages plugin. So I used below steps. 1. . /usr/lib/ckan/default/bin/activate 2. pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages' 3. cd /usr/lib/ckan/default/src/ckanext-pages 4. python setup.py develop Still I get below exception. Given that I tried restart CKAN and Apache server. ckan.plugins.core.PluginNotFoundException: pages But when I run the

ckan.plugins.core.PluginNotFoundException: pages

你离开我真会死。 提交于 2019-12-11 02:49:18
问题 I'm using CKAN as my open data portal. It's written in Python using Pylons framework. I just want to add a new page similar to about page to display the terms and conditions to the users. About page comes built in. So I installed ckanext-pages using pip command. What I did was below 1. # Activate your CKAN virtual environment . /usr/lib/ckan/default/bin/activate 2. # Install the pages extension. pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages' But now I end up