Git Product home page Git Product logo

dcpotools's Introduction

CRAN version Travis-CI Build Status


DCPOtools

DCPOtools includes functions to help preparing panel data for Dynamic Comparative Publicion Opinion (DCPO) analyses.

The study of comparative public opinion has been hampered by data that is sparse, that is, unavailable for many countries and years; incomparable, i.e., ostensibly addressing the same issue but generated by different survey items; or, most often, both. DCPO for estimating latent public opinion from cross-national survey data to maximize the information gleaned from available sources, overcome issues of missing and incomparable data, and allow comparativists to examine the dynamics of public opinion across countries.

For a detailed description, see the working paper here.

The method is associated with an R package, DCPO, for users' convenience to apply the method. However, there are special requirements for the data format to conduct DCPO, and this is where the DCPOtools can provide help.

Installation

DCPOtools requires the package gesisdata to be successfully installed. Before gesisdata is released in CRAN, users should first install it before installing DCPOtools with the follow commands:

remotes::install_github("fsolt/gesisdata")

Then, the DCPOtools can be installed with the following commands:

remotes::install_github("fsolt/DCPOtools")

Please be aware that DCPOtools is only for data preparation. To apply DCPO, one should install the DCPO package separately. See the instruction of the DCPO package here.

dcpotools's People

Contributors

byngdeuk avatar fsolt avatar hey-ikon avatar sammo3182 avatar tyhcass avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dcpotools's Issues

Fail to use format_dcpo

@fsolt , on Mac, when running format_dcpo, the error message is : Error in manip_apply_syms(funs, syms, .tbl) :
invalid multibyte string at 'te d'Ivoire'.

On windows10, when running DCPOtools::format_dcpo, the R session is aborted directly.

Year 9999 in issp2010

In issp2010 data, 9999 is coded as "no answer" for year variable. DCPOtool takes 9999 as a real year.

data set request

@fsolt Fred, could you please add these 103 datasets to DCPO? Thanks

survey_name_in_opensource survey_name_myend survey_name_dcpo link
ZA1543 ZA1543    
ZA4231 ZA4231    
ZA1542 ZA1542    
ZA2959 ZA2959    
ZA3086 ZA3086    
ZA3171 ZA3171    
ZA3387 ZA3387    
ZA3507 ZA3507    
ZA3627 ZA3627    
ZA3639 ZA3639    
ZA3904 ZA3904    
ZA4056 ZA4056    
ZA4229 ZA4229    
ZA4411 ZA4411    
ZA4506 ZA4506    
ZA4530 ZA4530    
ZA4565 ZA4565    
ZA4819 ZA4819    
ZA4971 ZA4971    
ZA4994 ZA4994    
ZA5234 ZA5234    
ZA5449 ZA5449    
ZA5481 ZA5481    
ZA5567 ZA5567    
ZA5612 ZA5612    
ZA5685 ZA5685    
ZA5689 ZA5689    
ZA5876 ZA5876    
ZA5913 ZA5913    
ZA5928 ZA5928    
ZA5932 ZA5932    
ZA5998 ZA5998    
ZA6643 ZA6643    
ZA6694 ZA6694    
ZA6788 ZA6788    
ZA6863 ZA6863    
ZA6928 ZA6928    
ZA6963 ZA6963    
ZA7489 ZA7489    
ZA7562 ZA7562    
ZA7576 ZA7576    
ZA7601 ZA7601    
wvs7_ethiopia wvs7_ethiopia    
wvs7_iran wvs7_iran    
wvs7_kyrgyzstan wvs7_kyrgyzstan    
wvs7_myanmar wvs7_myanmar    
wvs7_nicaragua wvs7_nicaragua    
wvs7_philippines wvs7_philippines    
wvs7_tajikistan wvs7_tajikistan    
wvs7_vietnam wvs7_vietnam    
wvs7_zimbabwe wvs7_zimbabwe    
cses5 cses5    
ess_combo ess_combo    
Pew Research Center Fall 2017 Media and Politics in Western Europe pew2017_fall    
ZA3979 ZA3979    
ZA3983 ZA3983    
ZA3986 ZA3986    
ZA4246 ZA4246    
ZA3680 ZA3680    
ZA3950 ZA3950    
ZA4747 ZA4747    
ZA4850 ZA4850    
ZA5070 ZA5070    
ZA5800 ZA5800    
ZA6670 ZA6670    
ZA5695 ZA5695    
lits_wave1     https://www.ebrd.com/what-we-do/economic-research-and-data/data/lits.html
lits_wave2      
lits_wave3      
Caucasus Barometer cb2008   https://caucasusbarometer.org/en/downloads/
Caucasus Barometer cb2009    
Caucasus Barometer cb2010    
Caucasus Barometer cb2011    
Caucasus Barometer cb2012    
Caucasus Barometer cb2013    
Caucasus Barometer cb2015    
Caucasus Barometer cb2017    
Caucasus Barometer cb2019    
ZA5177 isjp_comb    
ukda6510 nbb_comb    
Values and Political Change in Postcommunist Europe vpcpce_czech   https://beta.ukdataservice.ac.uk/datacatalogue/studies/study?id=4129
Values and Political Change in Postcommunist Europe vpcpce_czechpublic    
Values and Political Change in Postcommunist Europe vpcpce_hungarian    
Values and Political Change in Postcommunist Europe vpcpce_hungarianpublic  
Values and Political Change in Postcommunist Europe vpcpce_russian    
Values and Political Change in Postcommunist Europe vpcpce_russianpublic    
Values and Political Change in Postcommunist Europe vpcpce_slovakianpublic  
Values and Political Change in Postcommunist Europe vpcpce_ukrainian    
Values and Political Change in Postcommunist Europe vpcpce_ukrainianpublic  
ZA0765 pa_w1    
ZA1188 pa_w2    
ICPSR_34608 eass_w1    
ICPSR_36277 eass_w2    
Wellcome Global Monitor 2018 wellcome2018   https://wellcome.org/reports/wellcome-global-monitor/2018
za6288 eunb_wave1    
za6289 eunb_wave2    
za6290 eunb_wave3    
za6291 eunb_wave4    
za6292 eunb_wave5    
za6293 eunb_wave6    
european vote study ees_comb   https://www.tcd.ie/Political_Science/people/michael_marsh/ees_trend_file.php
za5161 ees2014    
icpsr34423 tat2011    

get_surveys issue

@Tyhcass gets the following error when downloading, e.g., amb_argentina2010:

Error in df_parse_dta_file(spec, encoding, cols_skip, n_max, skip, name_repair = .name_repair) : The provided note is too long for the file format. The download data is not readable.

data_setup: revisit countrycode

Currently using countrycode::countrycode() with a custom dictionary. I'd like to switch to the new countrycode::countryname(). Known issues: Northern Ireland gets an NA. United States and United Kingdom get "US" and "UK", respectively (blech). OTOH, handles South Sudan correctly, which current code whiffs on. Also would be much cleaner.

data-raw: check afrob wave 7

Currently shows 33 countries. However, @Tyhcass points out that the latest version includes 34 countries in total. This might be the Sudan/South Sudan issue that has since been corrected in the latest countrycode (but not yet incorporated into DCPOtools)

Subsampling and Generating Index

Subsampling and generating index might be great things to do.
Such as gender egalitarianism between male and female citizens.
We can come back to this theme latter :)!

problem in dcpo_setup and claassen_setup

@fsolt there is something weird. I found created two all_data_demmood.csv via dcpo_setup and cls_setup didn't include asianb3 data when I checked differences in country_years between two all data. Since I am not sure whether it is my raw data problem, I also double-checked claassen_input_raw.csv and there is no asianb3 data. So, somehow asianb3 data is missing.

Error in DCPOtools

Error in DCPOtools:::claassen_setup(vars = read_csv("C:/Users/skywa/Dropbox/dcpo_dem_mood/data-raw/mood_dem.csv", :
object 'surveys_data' not found

surveys to add

Please confirm that the survey isn't already in surveys_data before starting work on it!

(ha! I knew I'd written this somewhere)

See also other national surveys listed at p29 of https://www.icmpd.org/fileadmin/ICMPD-Website/Public_attitudes_on_migration_study.pdf

NAMESPACE update

The commit bb95c5d does not include an update of the NAMESPACE. export(dcpo_config) is still in it and prevent a successful installation of the package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.