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

get location from node registry #1

Open
mbjones opened this issue Oct 18, 2017 · 1 comment
Open

get location from node registry #1

mbjones opened this issue Oct 18, 2017 · 1 comment
Assignees

Comments

@mbjones
Copy link
Member

mbjones commented Oct 18, 2017

The DataONE node registry now contains lat/lon pairs for each node, so we can get node information from a query rather than hardcoding the static csv file. Update the Rmd file to get the data that way, as illustrated by this curl command (from @datadavev ):

echo "year,label,description,lon,lat,alt,name,uri" > dataone-nodes.csv
curl -s "https://cn.dataone.org/cn/v2/node" | xml sel -T -t \
 -m "//node[(property/@key='CN_operational_status' and property='operational' or property='replicator') and identifier!='urn:node:CN']" \
 -v "substring(property[@key='CN_date_operational'],1,4)" -o ",\"" \
 -v "property[@key='CN_node_name']" -o "\",\"" \
 -v "normalize-space(description)" -o "\"," \
 -v "property[@key='CN_location_lonlat']" -o ",0," \
 -v identifier -o "," \
 -v "property[@key='CN_logo_url']" -n \
>> dataone-nodes.csv
@mbjones mbjones self-assigned this Oct 18, 2017
@mbjones mbjones changed the title get data from node registry get location from node registry Oct 18, 2017
@mbjones
Copy link
Member Author

mbjones commented Jul 14, 2018

Added the above as a shell script dataone-nodes.sh in sha 751196f as a stopgap until we decide to incorporate it into the Rmd file directly.

meg3mach added a commit that referenced this issue Nov 21, 2018
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

1 participant