Skip to content

How to add a new city

mark padgham edited this page Oct 12, 2017 · 7 revisions

Adding new cities to the package currently requires the following steps:

  1. Modify all necessary src/ files and write the appropriate routine in bikedata-files.R.
  2. Add city to R/utils.R/convert_city_names.
  3. Add entry to R/database-stats.R/bike_demographic_data.
  4. Update R/storebikedata.R/get_bike_cities and ../get_flist_city.
  5. Add entry to R/bikedata-files.R/get_bike_files.
  6. Potentially change R/data-time-functions.R/convert_dates_to_filenames.
  7. Potentially add city-specific function to R/stations.R
  8. Put new data in test data (can be done later)

Test data are created with this script:

bike_write_test_data (tempdir ())
bikedb <- file.path (getwd (), "testdb.sqlite")│
store_bikedata (data_dir = tempdir (), bikedb = bikedb)
index_bikedata_db (bikedb = bikedb)

Then the bikedb is moved manually to /inst/data.

Clone this wiki locally