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

Data export in JSON and CSV #10

Closed
samperd opened this issue Mar 4, 2015 · 4 comments
Closed

Data export in JSON and CSV #10

samperd opened this issue Mar 4, 2015 · 4 comments

Comments

@samperd
Copy link

samperd commented Mar 4, 2015

User Story:

As a user
I want to export data of all resources in JSON and CSV formats
So that I can use JSON programmatically and CSV for tabular data analysis

The export feature on the main page only allows JSON export (eg. http://geohealthcheck.osgeo.org/export)

ideas:

Change URL pattern to indicate format
http://geohealthcheck.osgeo.org/json
http://geohealthcheck.osgeo.org/resource/1/json
Add a CSV export option
http://geohealthcheck.osgeo.org/csv
http://geohealthcheck.osgeo.org/resource/1/csv

Details:

Given JSON from http://geohealthcheck.osgeo.org/export
"resource_type": "OGC:CSW",
"title": "CSW interface for catalog.data.gov",
"url": "http://catalog.data.gov/csw-all"

JSON attributes to add:

"ghc_url":"http://geohealthcheck.osgeo.org/resource/1"
"ghg_json":"http://geohealthcheck.osgeo.org/resource/1/json"
"ghg_csv":"http://geohealthcheck.osgeo.org/resource/1/csv"
"last-check":" "
"status":" "
"response time":" "
"reliability":" "

This way a developer can navigate to either the report page, JSON or CSV output from the main

CSV Attributes

  • resource
  • title
  • url
  • ghc_url
  • ghc_json
  • ghc_csv
  • last-check
  • status
  • response time
  • reliability
@tomkralidis
Copy link
Member

implemented in master.

@samperd
Copy link
Author

samperd commented Mar 9, 2015

The output looks good.

One issue is that if you are running under a non-standard port such as the default port 8000 the URL's fail due to missing port.

Is it possible to add port numbers to the URL's in the CSV and JSON output if required?

@samperd
Copy link
Author

samperd commented Mar 9, 2015

The same issue applies for ports in the URL's of the CSV and JSON output for individual resources.

@samperd
Copy link
Author

samperd commented Mar 9, 2015

Fixed,

"You need to set the GHC_SITE_URL accordingly to expose this." source @tomkralidis

Thanks, this worked.

@samperd samperd closed this as completed Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants