-
Notifications
You must be signed in to change notification settings - Fork 6
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
download admin area cod (common operational dataset) for any country #5
Comments
Hi Andy, I also think that having a way to quickly get the admin-AB COD of each country would be awesome. I'm no longer working with OCHA but I can still ask them to fix some issues like wrong file formats name, zip files with sub-folder but also how to get a list of all COD. I think they maintain a list of all admin-AB COD. I will come back to you ASAP. |
Thankyou Ahmadou, |
I will also explore other options using CKAN facets in parallel to solve this issue. |
Andy, I think I now understand your approach a bit better than I did when I just emailed you about live services; I do see now how you want to read from HDX systematically and that needn't involve the live services. Sorry. Regarding the situation you discovered where the geodatabases are not arranged uniformly, that is down to me as I prepare them and I suppose I should standardize them. Which would be the preferred arrangement? Could your systems report which do not conform? |
@andysouth - does the source have to be HDX? There is a smaller subset (about 60 countries) on the COD ITOS service. My example python code to download as geojson. https://github.com/simonbjohnson/cod_topo I also convert them to topojson and standardise the attribute names |
Thanks @hayttom ! |
Thanks @SimonbJohnson |
Hi Andy, I guess we have inconsistencies in the HDX zip file arrangement for shapefiles and also for geodatabases - gulp. Fortunately this is something I can work on without disrupting the dataset URLs or even the HDX resources - just by fixing the content. I'm adding it to the checklist I'm following for my own internal audit. I'm not sure I follow about the hope for a unique COD admin boundary instances - the COD tag is not just for admin boundaries and so Mali legitimately has eight COD datasets. Are we on the same page? This not withstanding, we do encounter some cases of a country having more than one admin boundaries COD but it's not supposed to happen. The problem happens when some of my colleagues in country or regional offices get too enthusiastic. |
Hi Tom, For the tags I'd like to be able to query to just get the admin boundaries So far with my query below Is there anything I can add to the Mali query to exclude the first record below ? Or alternatively if it did have a tag for 'baseline population' that would work too. [[1]] [[2]] |
Hi Andy, Regarding "To consume from R at step 3 above it is easier if the shapefiles are not in a subfolder in the zip (i.e. following current Mali rather than Nigeria" I have re-arranged Nigeria, updated our SOP, and will work through the rest of our CODs, starting with the Dark Continent. Sincerely, Tom |
Thanks a lot @hayttom for this. |
Many thanks @hayttom, I just tried downloading the Nigeria shapefile from rhdx and directly from the HDX website and it doesn't seem to be working yet. This was the error message when I clicked the download button on the HDX website. |
@andysouth - I do recommend seeing whether the ITOS service matches your requirements, as it will save you a lot of time. Full list of supported files: Example script to download all countries(Python): Script I used to standardise attributes (also converts the format I need): Geojson library as a result: |
Many thanks @SimonbJohnson |
I think @SimonbJohnson code can be packaged into a nice R data package to serve COD-AB. |
@ALL, now that Ahmadou has made that fix and given my other tasks I won't be continuing to make the COD shapefile zipfile arrangements uniform, except in new cases or when other ad hoc adjustments are necessary. It's been a good learning lesson but our support must focus on the live services. Unfortunately all our 50 strategic counties (except Jordan) are now fulfilled so we do not expect to be expanding COD coverage in Africa. |
@andysouth I would love to collaborate on this. |
I started experimenting using the standardised Geojson boundaries created by @SimonbJohnson. R code is temporarily here Here is an atlas comparing the hdxlive boundaries for Africa to gadm (the former are likely to be more recent). |
I want to write some code allowing users to download the admin area COD for any country and admin level.
I'm coming up against a few inconsistencies in hdx tags and format that make this tricky.
I've put all this in one issue for now, in case there is a better way that you can point me to. I can break these up into individual issues if that helps.
What I'm trying to do.
Current issues (for examples see in the code below) :
Thanks.
The text was updated successfully, but these errors were encountered: