Skip to content

Commit 7f32569

Browse files
committed
updated readme with get_datafinder function
1 parent 2c668d4 commit 7f32569

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

README.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ RegCensus API defines a number of dates depending on the series. For example, th
3535

3636
There are five helper functions to retrieve information about these key components of regdata. These functions provider the following information: document types, jurisdictions, series, agencies, and dates with data. The list functions begin with __list__.
3737

38-
Each document type comprises one or more *series*. The __list_series__ function returns the list of all series when no series id is provided.
38+
Each document type comprises one or more *series*. The __list_series__ function returns the list of all series.
3939

4040
```
41-
rc.list_series(jurisdictionID = 38)
41+
rc.list_series()
4242
```
4343

4444
Listing the jurisdictions is another great place to start. If you are looking for data for a specifc jurisdiction(s), this function
@@ -59,14 +59,22 @@ Use the __get_jurisdiction__ function to return a data frame with all the jurisd
5959
rc.get_jurisdictions()
6060
```
6161

62+
### DataFinder
63+
64+
Use the __get_datafinder__ function to return a data frame for a specific jurisdiction. It returns the following attributes in the data - `['jurisdiction', 'documentType', 'year', 'series', 'document_endpoints', 'summary_endpoints', 'label_endpoints']`
65+
66+
```
67+
get_datafinder(jurisdiction = 38)
68+
```
69+
6270
### Agencies
6371

6472
The __get_agencies__ function returns a data frame of agencies with data in RegData. Either the `jurisdictionID` or `keyword` arguments must be supplied. If `jurisdictionID` is passed, the data frame will include information for all agencies in that jurisdiction. If `keyword` is supplied, the data frame will include information for all agencies whose name contains the keyword.
6573

6674
The following code snippet will return data for all agencies in the Federal United States:
6775

6876
```
69-
rc.get_agencies(jurisdiction = 38)
77+
rc.get_agencies(jurisdictionID = 38)
7078
```
7179

7280
Likewise, this code snippet will return data for all agencies (in any jurisdiction) containing the word "education" (not case sensitive):
@@ -84,38 +92,28 @@ The __get_industries__ function returns a data frame of industries with data in
8492
The following line will get you industry information for all 4-digit NAICS industries:
8593

8694
```
87-
rc.get_industries(codeLevel = 4)
95+
rc.get_industries(labellevel = 4)
8896
```
8997

90-
This line will get you information for the BEA industries:
98+
This line will get you information for the BEA industries (this function is temporarily disabled as of 1.0.0):
9199

92100
```
93-
rc.get_industries(standard = 'BEA')
101+
rc.get_industries(labelsource = 'BEA')
94102
```
95103

96-
Like the __get_agencies__ function, the `keyword` argument may also be used. The following code snippet will return information for all 6-digit NAICS industries with the word "fishing" in the name:
104+
Like the __get_agencies__ function, the `keyword` argument may also be used. The following code snippet will return information for all 6-digit NAICS industries with the word "fishing" in the name (this function is temporarily disabled as of 1.0.0):
97105

98106
```
99107
rc.get_industries(keyword = 'fishing', codeLevel = 6)
100108
```
101109

102-
### Documents
103-
104-
The __get_documents__ function returns a data frame with metadata for document-level data. The fucntion takes two parameters, jurisdictionID (required) and documentType (default value of 1, which is "all regulations").
105-
106-
The following line will get metadata for documents associated with U.S. Federal healthcare regulations.
107-
108-
```
109-
rc.get_documents(jurisdictionID = 38, documentType = 3)
110-
```
111-
112110
## Values
113111

114112
The __get_values__ function is the primary function for obtaining RegData from the RegCensus API. The function takes the following parameters:
115113

116114
* jurisdiction (required) - value or list of jurisdiction IDs
117115
* series (required) - value or list of series IDs
118-
* date (required) - value or list of years
116+
* year (required) - value or list of years
119117
* agency (optional) - value or list of agencies
120118
* industry (optional) - value of list of agencies
121119
* dateIsRange (optional) - specify if the list of years provided for the parameter years is a range. Default is True.
@@ -130,15 +128,15 @@ The __get_values__ function is the primary function for obtaining RegData from t
130128
In the example below, we are interested in the total number of restrictions and total number of words for the US (get_jurisdictions(38)) for the dates 2010 to 2019.
131129

132130
```
133-
rc.get_values(series = [1,2], jurisdiction = 38, date = [2010, 2019])
131+
rc.get_values(series = [1,2], jurisdiction = 38, year = [2010, 2019])
134132
```
135133

136134
### Get all Values for a Country
137135

138-
The `country` argument can be used to get all values for one or multiple series for a specific national jurisdiction. The following line will get you a summary of the national and state-level restriction counts for the United States from 2016 to 2019:
136+
The `country` argument can be used to get all values for one or multiple series for a specific national jurisdiction. The following line will get you a summary of the national and state-level restriction counts for the United States from 2016 to 2019 (this function is temporarily disabled as of 1.0.0):
139137

140138
```
141-
rc.get_values(series = 1, jurisdiction = 38, date = [2016, 2019], country=True)
139+
rc.get_values(series = 1, jurisdiction = 38, year = [2016, 2019], country=True)
142140
```
143141

144142
### Values by Subgroup
@@ -153,8 +151,8 @@ To obtain the restrictions for a specific agency (or agencies), the series id su
153151
# Identify all agencies
154152
rc.list_agencies(jurisdictionID)
155153
156-
# Call the get_values() for this agency and series 91
157-
rc.get_values(series = 91, jurisdiction = 38, date = [1990, 2018], agency = [81, 84])
154+
# Call the get_values() for two agencies and series 13
155+
rc.get_values(series = 13, jurisdiction = 38, year = [2000, 2018], agency = [15918, 15921])
158156
```
159157

160158
#### Values by Agency and Industry

0 commit comments

Comments
 (0)