Open tobybatch opened 7 years ago
Here an example of a csv file that should work.
The geocoding UI was built on the premise that should be embedded into an existing system. That's way the current API implementation is pretty basic and was done just for demoing purpose, You can see the import method code at api/server.js file, it is just sending the file directly to csvtojson library (https://github.com/Keyang/node-csvtojson)
You can also take a look to project-data.json https://github.com/devgateway/open-aid-geocoder/blob/master/api/data/project-data.json which is at the end the way the data is structured once imported.
project_id,country.iso2,country.name,title,long_description
P-TD-KA0-002,TD,Chad,Economic Rehabilitation and Recovery Program, En coordination avec les Institutions de Bretton Woods notamment la Banque mondiale le PAS IV a pour principaux objectifs la lutte contre la pauvret?? le renforcement de la bonne gouvernance et le d??veloppement du secteur priv??.
P-SN-KZ0-001,SN,Senegal,Economic Rehabilitation and Recovery Program,Le programme a pour objectif sectoriel de contribuer ?? l'am??lioration de l'information socio-??conomique en vue d'une d??cision efficiente des acteurs publics et priv??s et d'un meilleur suivi de la mise en oeuvre des programmes de lutte contre la pauvret??.Plus sp??cifiquement le projet vise ??: i) contribuer au renforcement des capacit??s de coordination de production et de diffusion de l'information soci-??conomique de la Direction de la Pr??vision et de la Statistique ii) contribuer au renforcement du processus de suivi-??valuyation du DSRP iii) renforcer la Cellule d'ex??cution du projet. Plus sp??cifiquement le projet vise ?? : (i) contribuer au renforcement des capacit??s de coordination des activit??s de production et de diffusion de l'information socio-??conomique de la Direction de la Pr??vision et de la Statistique
P-SL-KA0-006,SL,Sierra Leone,Economic Rehabilitation and Recovery Program, The proposed EERP-III with resources in the amount of UA 10.7 million will assist government in implementing policies designed to promote good governance while at the same time helping to close Sierra Leone's external financing gap. As indicated in Annex Table V the current account deficit (excluding official transfers) widened from 12.1 percent in 2002 to 17.7 percent in 2004 and while it is expected to narrow to 13.6 percent in 2005 it remains high at 10.4 percent by 2007. The grant will help narrow the deficit. It will also help reduce the inflationary pressures in the economy.
P-AO-A00-002,AO,Angola,Artisanal Fisheries Development Project,The proposed project aims at increasing the incomes of artisanal fishers by providing the necessary support and enabling environment to improve food security while contributing to the reduction of poverty on a sustainbable basis.
P-AO-KF0-002,AO,Angola,Artisanal Fisheries Development Project, la consolidation des r??formes des finances publiques en mati??re de gestion du patrimoine de l'Etat et du syst??me de contr??le interne
P-NG-HAB-009,NG,Nigeria,Nigeria - Guaranty Trust Bank Plc,To provide GTB with foreign currency liquidity to underpin the financing of ongoing projects in key sectors and boost productive capacity
P-MZ-E00-005,MZ,Mozambique,National Rural Water and Sanitation Progam Awf Funding, The proposed NRWSSP will create the conditions to improve the sustainability of the rural water supply and sanitation sub-sector through a better policy implementation that will enhance community ownership of facilities as well as the impact that access to clean water and safe sanitation on the well-being of the rural population of Mozambique. The development of the national Rural Water Supply and Sanitation Program will provide clear guidelines and priorities and will attract increased water sector investment in the country. It will assist GoM in leveraging resources for RWSS services provision and to lobby for resources from development partners in order to speed up implementation as well as improve service delivery.
P-CG-K00-007,CG,Congo,Artisanal Fisheries Development Project, L'objectif principal du projet est d'aider le Gouvernement ?? mener ?? bien ses r??formes en mati??re de gouvernance de mani??re ?? cr??er un cadre global efficace pour g??n??rer une croissance durable. Le projet a par ailleurs l'objectif d'aider le pays ?? se doter d'un capital humain stable en mati??re d'??laboration et d'ex??cution des mesures et pratiques de bonne gouvernance seuls ?? m??me d'ancrer les r??formes pour la lutte contre la pauvret?? dans la dur??e. Les objectifs sp??cifiques du projet sont : i) rationnaliser la gestion budg??taire
P-NG-HAA-002,NG,Nigeria,Nigeria - Domestic-oriented SME Financing Program,
P-Z1-EAZ-011,Z1,Multinational,Economic Rehabilitation and Recovery Program, Les objectifs sp??cifiques du projet sont : i)R??habilitation un minimum de stations hydrologiques et mettre en route une phase pilote du projet Congo-HYCOS ?? travers le mise en place de stations d'observation hydrologiques dans le bassin du Congo
P-EG-FAA-013,EG,Egypt,Abu Qir 1300 Mw Steam Power Project, The objective of the project is to increase the generation capacity of the Unified Power System (UPS) by about 4% in the year 2012 to meet the electricity demand on the UPS in the short-to-medium term. The project when completed would contribute towards making available sufficient and reliable power to the various consumers including the households agriculture business and industries
P-TD-IBE-001,TD,Chad,Economic Rehabilitation and Recovery Program, Les objectifs sp??cifiques sont les suivants : i) renforcer d'urgence la mobilisation sociale autour des activit??s de vaccination et ii) renforcer d'urgence les capacit??s techniques et mat??rielles du dispositif de vaccination.
P-Z1-EAZ-045,Z1,Multinational,Economic Rehabilitation and Recovery Program, Les objectifs sp??cifiques sont les suivants : i) renforcer d'urgence la mobilisation sociale autour des activit??s de vaccination et ii) renforcer d'urgence les capacit??s techniques et mat??rielles du dispositif de vaccination.
P-MA-IAD-001,MA,Morocco,Economic Rehabilitation and Recovery Program, Les objectifs sp??cifiques sont les suivants : i) renforcer d'urgence la mobilisation sociale autour des activit??s de vaccination et ii) renforcer d'urgence les capacit??s techniques et mat??rielles du dispositif de vaccination.
I'm trying to import data into a running instance of the geo coder and I get a red screen of death:
https://gist.github.com/tobybatch/6fbafd64ade3ea11fa1a45c058f3c160
The CSV I'm importing looks like this:
project_id,title,long_description 1,magna a tortor.,Lorem ipsum dolor sit amet consectetuer adipiscing elit. Curabitur sed tortor. 2,est mauris rhoncus,Lorem ipsum dolor sit amet consectetuer adipiscing elit. Curabitur sed 3,Nunc mauris sapien,Lorem ipsum dolor sit amet consectetuer adipiscing elit. Curabitur sed tortor. Integer aliquam adipiscing lacus. Ut nec urna et arcu imperdiet ullamcorper. Duis 4,porttitor interdum. Sed,Lorem ipsum dolor sit amet consectetuer adipiscing elit. Curabitur 5,quam elementum at,Lorem ipsum dolor sit amet consectetuer adipiscing elit. Curabitur sed tortor. Integer aliquam adipiscing lacus. Ut nec urna
What is wrong?