Commit c9b579ef authored by abuddenberg's avatar abuddenberg
Browse files

Added support for Figure 2.21

parent b97335fd
gcis-py-client
===========
==============
gcis-py-client provides a python-based abstraction of the Global Change
Information System Structured Data Server [API](http://data.globalchange.gov).
......
......@@ -22,8 +22,11 @@ whitelisted_dupes = [
'a1bd40f2-424e-4af8-8d3d-f44ba7ba36b6', #33.17 #34.13
'834f7624-40de-4a09-9ced-faaca30d4d6d', #2.27 #18.7
'eab9f2d3-6ebf-40ef-9d9b-fc7f9d62e693', #2.21 #3.5
]
def main():
hitlist_file = 'hitlist.pk1'
......
......@@ -7,8 +7,8 @@ from collections import OrderedDict
webform = WebformClient('http://resources.assessment.globalchange.gov', webform_token)
# gcis = GcisClient('http://data.gcis-dev-front.joss.ucar.edu', *gcis_dev_auth)
gcis = GcisClient('http://data-stage.globalchange.gov', *gcis_stage_auth)
gcis = GcisClient('http://data.gcis-dev-front.joss.ucar.edu', *gcis_dev_auth)
# gcis = GcisClient('http://data-stage.globalchange.gov', *gcis_stage_auth)
sync_metadata_tree = {
#Reports
......@@ -27,6 +27,7 @@ sync_metadata_tree = {
('/metadata/figures/2506', 'observed-change-in-very-heavy-precipitation'), # 2.17
('/metadata/figures/2997', 'observed-change-in-very-heavy-precipitation-2'), # 2.18
('/metadata/figures/3170', 'global-temperature-and-carbon-dioxide'), # 2.2
('/metadata/figures/3177', 'cs-trends-in-flood-magnitude'), # 2.21
('/metadata/figures/2939', 'projected-changes-in-soil-moisture-for-the-western-us'), # 2.22
('/metadata/figures/3304', 'observed-trends-in-hurricane-power-dissipation'), # 2.23
('/metadata/figures/3305', 'variation-of-storm-frequency-and-intensity-during-the-cold-season-november--march'), # 2.24
......@@ -266,14 +267,18 @@ images_with_multiple_figures = {
'8c679de0-4a6c-4fc9-bbd1-59251ffe3d7f': ['shells-dissolve-in-acidified-ocean-water', 'ocean-acidification-and-the-food-web'], #2.31 #34.21
'a1bd40f2-424e-4af8-8d3d-f44ba7ba36b6': ['human-influences-apparent-in-many-aspects-of-the-changing-climate', 'caq-human-influences-apparent-in-many-aspects-of-the-changing-climate'], #33.17 #34.13
'834f7624-40de-4a09-9ced-faaca30d4d6d': ['ice-cover-in-the-great-lakes', 'midwest-ice-cover-in-the-great-lakes'], #2.27 #18.7
'eab9f2d3-6ebf-40ef-9d9b-fc7f9d62e693': ['cs-trends-in-flood-magnitude', 'trends-in-flood-magnitude'],
}
def main():
print gcis.test_login()
# sync_dataset_metadata(gcis, webform.get_aggregated_datasets())
# sync(replace=True)
cleanup_after_replace()
sync(replace=False)
# cleanup_after_replace()
# for ds in gcis.get_dataset_list().json():
# print '-'.join(ds['identifier'].split('-')[1:-1]) + '\t' + str(ds['url'])
def sync(replace=False):
......
......@@ -592,7 +592,8 @@ class Parent(Gcisbase):
'The Myth of the 1970s Global Cooling Scientific Consensus': '10.1175/2008BAMS2370.1',
'Hurricane Sandy devestates NY/NJ-area passenger rai systems': ('web_page', '135ae7d9-56e3-4dcb-a81c-42a6f1e9b332'),
'Climate change impacts of US reactive nitrogen': '10.1073/pnas.1114243109',
'Range-wide patterns of greater sage-grouse persistence': '10.1111/j.1472-4642.2008.00502.x'
'Range-wide patterns of greater sage-grouse persistence': '10.1111/j.1472-4642.2008.00502.x',
'Monitoring and understanding changes in heat waves, cold waves, floods and droughts in the United States: State of Knowledge': '10.1175/BAMS-D-12-00066.1',
},
'book': {
......@@ -635,7 +636,9 @@ class Parent(Gcisbase):
if value in self.publication_type_map else '**MISSING**' + value
def __repr__(self):
return '{rel}: {type}: {url}'.format(rel=self.relationship, type=self.publication_type_identifier, url=self.url)
return '{rel}: {type}: {url}: {lbl}'.format(
rel=self.relationship, type=self.publication_type_identifier, url=self.url, lbl=self.label
)
def __str__(self):
return self.__repr__()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment