Closed Mikanebu closed 7 years ago
@rufuspollock please see analysis (instructions) above. We also discussed about implementation of this in front page. We can following:
<pre>
<code>
...
#Get Data Package
datapackage <- datapkg_read("https://bits.datapackaged.com/metadata/" + {{ publisher }} + "/" + {{ package }} + "/_v/latest")
...
#Open actual data in RStudio Viewer
{% for resource in dataset.resources %}
View(datapackage$data$"{{ resource.name }}")
{% endfor %}
</code>
</pre>
We also discussed about implementation of this in front page. We can following:
@Mikanebu i don't think we want this on the front page - we want it on the data showcase page for each data package (and also in the docs potentially).
User stories: As a Consumer [R user] I want to load a Data Package from R so that I can immediately start playing with it
As a Publisher I want to send a link to an R user colleague about how to use my data so that they can grab it and start using it
As a Consumer [Python user] I want to load a Data Package from Python using pandas, so that I can immediately start playing with it.
As a Publisher I want to send a link to Python user colleague about how to use my data so that they can grab it and start using it.
Acceptance Criteria
Tasks
Analysis
Instructions on using R in DataHub
In order to use Data Package in R follow instructions below:
Instructions on using Pandas in DataHub
To generate Pandas data frames based on JSON Table Schema descriptors we have to install
jsontableschema-pandas
plugin. To load resources from a data package as Pandas data frames usedatapackage.push_datapackage
function. Storage works as a container for Pandas data frames.In order to work with Data Packages in Pandas you need to install our packages:
To get Data Package run following code: