Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Explore the CKAN open data portal API #144

Open
stuartlynn opened this issue Sep 24, 2020 · 1 comment
Open

Feature - Explore the CKAN open data portal API #144

stuartlynn opened this issue Sep 24, 2020 · 1 comment
Assignees
Labels
frozen Intentionally not working on this for now, but might be picked up in the future

Comments

@stuartlynn
Copy link
Contributor

Currently the only open data portals that scout indexes are ones run by Socrata. We would love to extend this to other open data portals starting with CKAN.

For a given CKAN portal we need to be able to obtain a list of datasets available on that portal and then map the meta data for those datasets in to the same standard format we are using for the Socrata datasets.

The function that does this for the socrata datasets can be found in the code here:

scout/src/utils/socrata.js

Lines 179 to 220 in 86cab19

export const datasetToDB = (dataset) => {
const { resource, metadata, classification } = dataset;
const domain_metadata = classification
? classification.domain_metadata
: null;
const updatedAutomation = domain_metadata?.find(
({ key, value }) => key === 'Update_Automation' && value === 'No',
)?.value;
const updateFrequency = domain_metadata?.find(
({ key }) => key === 'Update_Update-Frequency',
)?.value;
const department = domain_metadata?.find(
({ key }) => key === 'Dataset-Information_Agency',
)?.value;
return {
id: resource.id,
name: resource.name,
portal: metadata.domain,
columns: resource.columns_name.map((c) => c.trim()),
columnFields: resource.columns_field_name.map((c) => c.trim()),
columnTypes: resource.columns_datatype,
metaDataUpdatedAt: resource.metadata_updated_at,
updatedAt: resource.data_updated_at,
createdAt: resource.createdAt,
description: resource.description,
views: resource.page_views.page_views_total,
categories: classification.categories,
domainCategory: classification.domainCategory,
tags: classification.domain_tags,
type: resource.type,
updateFrequency,
department,
permaLink: dataset.permalink,
parentDatasetID: resource.parent_fxf[0],
updatedAutomation,
owner: dataset.owner.display_name,
};
};

Some useful resources for this:

Note, it makes sense to add this to the scout-multi branch rather than the main branch

@stuartlynn stuartlynn added good first issue Good for newcomers help wanted Looking for people to participate or help labels Sep 24, 2020
@jps327 jps327 self-assigned this Mar 16, 2022
@jps327 jps327 changed the title Freature - Explore the CKAN open data portal API Feature - Explore the CKAN open data portal API Mar 16, 2022
@jps327 jps327 added blocked Blocked on something specific frozen Intentionally not working on this for now, but might be picked up in the future and removed good first issue Good for newcomers help wanted Looking for people to participate or help blocked Blocked on something specific labels Apr 22, 2022
@jps327
Copy link
Contributor

jps327 commented Apr 22, 2022

Switching to "frozen" because there are no imminent plans on scoping, but this is in the roadmap for EOY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frozen Intentionally not working on this for now, but might be picked up in the future
Projects
None yet
Development

No branches or pull requests

2 participants